math/fftw3 - Variable CFLAGS is recursive.

break19

Active Member

Reaction score: 24
Messages: 127

Output from make -V (while not in the fftw3 directory):
Code:
# make -V CFLAGS
-O2 -fno-strict-aliasing -pipe -march=opteron
However, any make command issued from inside /usr/ports/math/fftw3/ returns:
Code:
# make -V CFLAGS
Variable CFLAGS is recursive.
And therefore, math/fftw3 is unable to be processed.
 

kpa

Beastie's Twin

Reaction score: 1,805
Messages: 6,318

Can you post the exact commands you're using to build the port and the important parts of the output when things go wrong.
 
OP
OP
break19

break19

Active Member

Reaction score: 24
Messages: 127

sure:
Code:
cd /usr/ports/math/fftw3
make install clean
which outputs
Code:
Variable CFLAGS is recursive.
 

kpa

Beastie's Twin

Reaction score: 1,805
Messages: 6,318

Do you have anything related to CFLAGS in /etc/make.conf?
 
OP
OP
break19

break19

Active Member

Reaction score: 24
Messages: 127

Yep.. it's in the first post, but I will say it again.
Code:
# make -V CFLAGS
-O2 -fno-strict-aliasing -pipe -march=opteron
And, for the record, that was set in make.conf before I installed fftw3 the -first- time on this system. The latest update to ports appears to have broken something for me.
 
OP
OP
break19

break19

Active Member

Reaction score: 24
Messages: 127

if you want the actual lines in my make.conf:

Code:
CPUTYPE?=opteron
CFLAGS= -O2 -fno-strict-aliasing -pipe
 

kpa

Beastie's Twin

Reaction score: 1,805
Messages: 6,318

The port has an option OPTIMIZED_CFLAGS that should do the same, set that and try again without the CFLAGS line in /etc/make.conf. In general, avoid setting CFLAGS in /etc/make.conf, especially as a global override.

# cd /usr/ports/math/fftw3
# make config
# make install clean
 
OP
OP
break19

break19

Active Member

Reaction score: 24
Messages: 127

if the port now fails to build because of having -anything- set in CFLAGS, when it compiled fine at one time, with the exact same options, that is indicative of a problem with the port's makefile.

Besides, when I comment out CFLAGS, it still fails to build, with the exact same error.. I must also comment out "CPUTYPE" in order to get it to build.

This needs to be fixed in the port, since it appears to be the only one with this issue. Why should I therefore make a change that affects every other port on my system, as a workaround for one broken one?
 
OP
OP
break19

break19

Active Member

Reaction score: 24
Messages: 127

After much fiddling with the Makefile for fftw3, I think I've found the offending lines, by commenting out the following line:

Code:
#CFLAGS+=       ${CFLAGS_3DNOW}
This, however, disables some of the optimizations for 3Dnow..
 
OP
OP
break19

break19

Active Member

Reaction score: 24
Messages: 127

Ok.. I think I fixed it now.
I changed the above offending line to be:
Code:
CFLAGS:=        ${CFLAGS_3DNOW}
And now the Makefile is correctly parsed, with all optimizations seeming to be correctly applied, without modifying my /etc/make.conf.
 

tbyte

Active Member

Reaction score: 2
Messages: 119

Same here. Thanks for the fix I'll test it right away :) . Btw contact the porter and let him know about this.

Regards.
 

luchesar

New Member


Messages: 1

IMHO the problem is not with conflicting CFLAGS in /etc/make.conf, but has rather been caused by this commit from PR ports/157936, which, indeed, unintentionally introduced a recursion in the Makefile of math/fftw3:
Code:
CFLAGS_3DNOW=   ${CFLAGS:N-O:N-O*} [I][color="Gray"][...snip...][/color][/I]
[I][color="Gray"][...snip...][/color][/I]
CFLAGS+=        ${CFLAGS_3DNOW}
Unsurprisingly, the two slave ports, math/fftw3-float & math/fftw3-long, have also been affected. I've submitted a followup to the PR.
 
Top