# Configure fails to spot fftw3 lib on macosx 10.5

**URL:** <https://root-forum.cern.ch/t/configure-fails-to-spot-fftw3-lib-on-macosx-10-5/13076>\
**Category:** ROOT\
**Created:** [September 14, 2011, 7:43pm UTC](https://root-forum.cern.ch/t/configure-fails-to-spot-fftw3-lib-on-macosx-10-5/13076 "2011-09-14T19:43:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![asartim](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@asartim](https://root-forum.cern.ch/u/asartim)\
**Post date:** [September 14, 2011, 7:43pm UTC](https://root-forum.cern.ch/t/configure-fails-to-spot-fftw3-lib-on-macosx-10-5/13076/1 "2011-09-14T19:43:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rdm](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rdm/32/11082_2.png) [@rdm](https://root-forum.cern.ch/u/rdm)\
**Post date:** [September 28, 2011, 11:06am UTC](https://root-forum.cern.ch/t/configure-fails-to-spot-fftw3-lib-on-macosx-10-5/13076/2 "2011-09-28T11:06:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![asartim](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@asartim](https://root-forum.cern.ch/u/asartim)\
**Post date:** [September 28, 2011, 1:27pm UTC](https://root-forum.cern.ch/t/configure-fails-to-spot-fftw3-lib-on-macosx-10-5/13076/3 "2011-09-28T13:27:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rdm](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rdm/32/11082_2.png) [@rdm](https://root-forum.cern.ch/u/rdm)\
**Post date:** [September 28, 2011, 1:31pm UTC](https://root-forum.cern.ch/t/configure-fails-to-spot-fftw3-lib-on-macosx-10-5/13076/4 "2011-09-28T13:31:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bernast0](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/f475e1/32.png) [@bernast0](https://root-forum.cern.ch/u/bernast0)\
**Post date:** [October 4, 2011, 7:30am UTC](https://root-forum.cern.ch/t/configure-fails-to-spot-fftw3-lib-on-macosx-10-5/13076/5 "2011-10-04T07:30:55Z")

</div>

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

```auto
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

```auto
$ 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

---

<div class="post-metadata">

**Author:** ![rdm](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rdm/32/11082_2.png) [@rdm](https://root-forum.cern.ch/u/rdm)\
**Post date:** [October 4, 2011, 2:08pm UTC](https://root-forum.cern.ch/t/configure-fails-to-spot-fftw3-lib-on-macosx-10-5/13076/6 "2011-10-04T14:08:40Z")

</div>

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.
