Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 575210

Summary: sci-libs/fftw-3.3.4 - ...work/fftw-3.3.4/simd-support/simd-avx.h:39:2: error: #error "compiling simd-avx.h without -mavx"
Product: Gentoo Linux Reporter: Arnaud Vallette d'Osia <arnaudv6>
Component: [OLD] LibraryAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED OBSOLETE    
Severity: normal CC: arnaudv6
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge info
build.log
environment

Description Arnaud Vallette d'Osia 2016-02-20 09:56:27 UTC
Created attachment 425972 [details]
emerge info

I can't seem to build sci-libs/fftw-3.3.4
here are the attachements.

I have hit bugs for a long years on my machine with fftw,
which incline me to think it has to do with my USE flags ?
maybe -fortran ? Which impacts GCC... fftw has fortran bindings I know.

Thanks for the help !
Arnaudv6
Comment 1 Arnaud Vallette d'Osia 2016-02-20 09:57:07 UTC
Created attachment 425974 [details]
build.log
Comment 2 Arnaud Vallette d'Osia 2016-02-20 09:57:33 UTC
Created attachment 425976 [details]
environment
Comment 3 Arnaud Vallette d'Osia 2016-02-20 11:12:10 UTC
Hello Jeroen Roovers 
and thanks for working on this !
actually reading how you renamed the PB, I'd like to precise : I run a sandyBridge i7 2600k,
thus I filled /etc/make.conf with :
CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
(none of which are recalled in USE.
Hope this can help
with regards
Arnaudv6
Comment 4 Marius Brehler 2016-02-20 11:24:47 UTC
Your 'emerge info' tells that you've set

CFLAGS="-march=native -O2 -pipe -mno-avx"
CXXFLAGS="-march=native -O2 -pipe -mno-avx"

On the other hand avx is included in CPU_FLAGS_X86 and your using -march=native, whereas the Core i7-2600k supports AVX. Therefore, fftw is configured with '--enable-avx' (see build.log). Passing -mno-avx afterwards will cause trouble and I am not sure if we can handle this within the fftw ebuild.
Comment 5 Arnaud Vallette d'Osia 2016-02-20 11:47:41 UTC
Right : I never looked at it again,
but I had to set 
CFLAGS="-march=native -O2 -pipe -mno-avx"
due to a bug in gcc :
https://forums.gentoo.org/viewtopic-t-878955-start-0.html

I should get back to 
CFLAGS="-O2 -pipe"
or
CFLAGS="-march=native -O2 -pipe"
shouldn't I ?

Thanks Jeroen
Comment 6 Arnaud Vallette d'Osia 2016-02-20 12:30:08 UTC
Well I did, and compilation worked flawlessly,
I will recompile gcc (and ffmpeg which I features lots of optimisations) :
if I get no problem, I will leave it this way.
Thanks !
Don't bother changing the ebuild.