Opened 11 years ago

Closed 11 years ago

#11 closed defect (invalid)

Failing to link to FFT

Reported by: twiggjohn@hotmail.com Owned by: Paul Brossier
Priority: normal Milestone: 0.3.3
Component: corelib Version: 0.3.2
Severity: normal Keywords:
Cc:

Description

Sorry to bug you directly but I couldn't find a forum to post this too.

I'm getting this link error when running Make.


John@Samsung ~/Externals/aubio/aubio-0.3.2 $ make Making all in src make[1]: Entering directory `/home/John/Externals/aubio/aubio-0.3.2/src' make all-am make[2]: Entering directory `/home/John/Externals/aubio/aubio-0.3.2/src' /bin/sh ../libtool --mode=link gcc -Wall -Wextra -I/usr/local/include -I/usr/l ocal/include -g -O2 -no-undefined -o libaubio.la -rpath /usr/local/lib -versi on-info 3:1:1 phasevoc.lo mathutils.lo fft.lo sample.lo hist.lo scale.lo resampl e.lo onsetdetection.lo tss.lo peakpick.lo biquad.lo pitchdetection.lo pitchmcomb .lo pitchyin.lo pitchschmitt.lo pitchfcomb.lo pitchyinfft.lo beattracking.lo ons et.lo tempo.lo filter.lo -L/usr/local/lib -lfftw3 -lm -L/usr/local/lib -lsampl erate -lpthread

* Warning: This system can not link to static lib archive /usr/local/lib/libff tw3.la. * I have the capability to make that library automatically link in when * you link to this library. But I can only do this if you have a * shared version of the library, which you do not appear to have. rm -fr .libs/libaubio.dll.a expr: syntax error expr: syntax error gcc -shared .libs/phasevoc.o .libs/mathutils.o .libs/fft.o .libs/sample.o .libs /hist.o .libs/scale.o .libs/resample.o .libs/onsetdetection.o .libs/tss.o .libs/ peakpick.o .libs/biquad.o .libs/pitchdetection.o .libs/pitchmcomb.o .libs/pitchy in.o .libs/pitchschmitt.o .libs/pitchfcomb.o .libs/pitchyinfft.o .libs/beattrack ing.o .libs/onset.o .libs/tempo.o .libs/filter.o -L/usr/local/lib /usr/local/li b/libsamplerate.dll.a -lpthread -o .libs/cygaubio-2.dll -Wl,--enable-auto-image -base -Xlinker --out-implib -Xlinker .libs/libaubio.dll.a Creating library file: .libs/libaubio.dll.a .libs/mathutils.o: In function `aubio_cleanup': /home/John/Externals/aubio/aubio-0.3.2/src/mathutils.c:460: undefined reference to `_fftw_cleanup' .libs/fft.o: In function `aubio_fft_rdo': /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:95: undefined reference to `_ff tw_execute' .libs/fft.o: In function `aubio_fft_do': /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:84: undefined reference to `_ff tw_execute' .libs/fft.o: In function `del_aubio_fft': /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:71: undefined reference to `_ff tw_destroy_plan' /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:72: undefined reference to `_ff tw_destroy_plan' /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:73: undefined reference to `_ff tw_free' .libs/fft.o: In function `new_aubio_fft': /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:57: undefined reference to `_ff tw_malloc' /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:63: undefined reference to `_ff tw_plan_r2r_1d' /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:64: undefined reference to `_ff tw_plan_r2r_1d' .libs/fft.o: In function `aubio_fft_rdo': /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:95: undefined reference to `_ff tw_execute' .libs/fft.o: In function `aubio_fft_do': /home/John/Externals/aubio/aubio-0.3.2/src/fft.c:84: undefined reference to `_ff tw_execute' collect2: ld returned 1 exit status make[2]: * [libaubio.la] Error 1 make[2]: Leaving directory `/home/John/Externals/aubio/aubio-0.3.2/src' make[1]: * [all] Error 2 make[1]: Leaving directory `/home/John/Externals/aubio/aubio-0.3.2/src' make: * [all-recursive] Error 1


I've built FFTW successfully but and installed it. Running Configure on aubio seems to find it.

However it fails to link in the static lib and then proceeds to fail altogether.

Have you seen this error before? Am I to create a shared fftw lib like the error message suggests? Any ideas how to do that?

Change History (1)

comment:1 Changed 11 years ago by Paul Brossier

Resolution: invalid
Status: newclosed

As explained on the aubio-users mailing list, the problem is that you did not build fftw as a shared library. you have to pass --enable-shared to fftw for that.

Thanks, piem

Note: See TracTickets for help on using tickets.