Configure fails to spot fftw3 lib on macosx 10.5

Dear all.
I am trying to install fftw support on latest root (5.30).
I have installes the fftw3 libs manually AND trough fink.
I have the libs under
/sw/lib
and in a local package
/usr/local/lib
but when I run configure (either with or without specifing
–with-fftw3-libdir=/sw/lib --with-fftw3-incdir=/sw/include
or
–with-fftw3-libdir=/usr/local/lib --with-fftw3-incdir=/usr/local/include
the result is alwyas:
Checking for fftw3.h … /sw/include
Checking for libfftw3, or libfftw3-3 … no

so… the .h is found BUT not the lib!

Of course I checked that the libs are there( see below).

Any advice?
Alessio

[21:42:29][asarti@kagome:/Users/Shared/Packages/root]$l /sw/lib/fftw3
-rw-r–r-- 1 root admin 28288 24 Lug 16:34 /sw/lib/libfftw3_threads.a
-rwxr-xr-x 1 root admin 29356 24 Lug 16:34 /sw/lib/libfftw3_threads.3.dylib
-rw-r–r-- 1 root admin 1632800 24 Lug 16:34 /sw/lib/libfftw3.a
-rwxr-xr-x 1 root admin 1145600 24 Lug 16:34 /sw/lib/libfftw3.3.dylib
-rw-r–r-- 1 root admin 28424 24 Lug 16:36 /sw/lib/libfftw3f_threads.a
-rwxr-xr-x 1 root admin 29404 24 Lug 16:36 /sw/lib/libfftw3f_threads.3.dylib
-rw-r–r-- 1 root admin 1592472 24 Lug 16:36 /sw/lib/libfftw3f.a
-rwxr-xr-x 1 root admin 1113364 24 Lug 16:36 /sw/lib/libfftw3f.3.dylib
lrwxr-xr-x 1 root admin 25 24 Lug 16:36 /sw/lib/libfftw3f_threads.dylib -> libfftw3f_threads.3.dylib
lrwxr-xr-x 1 root admin 17 24 Lug 16:36 /sw/lib/libfftw3f.dylib -> libfftw3f.3.dylib
lrwxr-xr-x 1 root admin 24 24 Lug 16:36 /sw/lib/libfftw3_threads.dylib -> libfftw3_threads.3.dylib
lrwxr-xr-x 1 root admin 16 24 Lug 16:36 /sw/lib/libfftw3.dylib -> libfftw3.3.dylib
-rwxr-xr-x 1 root admin 981 24 Lug 16:36 /sw/lib/libfftw3f_threads.la
-rwxr-xr-x 1 root admin 933 24 Lug 16:36 /sw/lib/libfftw3f.la
-rwxr-xr-x 1 root admin 975 24 Lug 16:36 /sw/lib/libfftw3_threads.la
-rwxr-xr-x 1 root admin 927 24 Lug 16:36 /sw/lib/libfftw3.la

Are you sure the Fink version is compatible with the architecture for which you configure? If macosx64 is used the library must be 64-bit.

Cheers, Fons.

Yeah. I have checked.
I am configuring with macosx…
./configure macosx --with-fftw3-libdir=/sw/lib --with-fftw3-incdir=/sw/include --enable-roofit

BUT what puzzle me most is the fact that the .h is found in /sw/include, while the lib is not found!

Checking for fftw3.h … /sw/include
Checking for libfftw3, or libfftw3-3 … no

alessio

The lib might not be found/accepted if it is not compatible with the chosen architecture. Otherwise put some

set -x

set +x

to see what goes on in your case. First time I see a problem with this so it must be something with your setup.

Cheers, Fons.

Hello,

I had the same problem on OS 10.6 64-bit and recently solved it.

In the config.log, I was getting the following error

Checking if /sw/lib/libfftw3.a contains compatible code
 file -L /sw/lib/libfftw3.a | grep 'x86_64'
 result: 0

Checking manually, the command was telling me

$ file -L libfftw3.a libfftw3.a: current ar archive random library

But using otool or lipo

$ lipo -info libfftw3.a
input file libfftw3.a is not a fat file
Non-fat file: libfftw3.a is architecture: x86_64

$ otool -hv libfftw3.a
Archive : libfftw3.a
libfftw3.a(align.o):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00      OBJECT     3        336 SUBSECTIONS_VIA_SYMBOLS

I modified the configure file so he could check the architecture using the lipo command and recompiled root.
Everything is working for me, now.

Hope, it’ll help you.

Cheers

Hi,

this test was already added in the trunk (but using “ar x|file” for .a’s). I’ve now changed to lipo -info as per your suggestion.

Cheers, Fons.