Search code examples
ckinectgesture

How to build FFTW in Ubuntu?


I have been working on Gesture recognition project. I use XKin gesture recogntion library https://github.com/fpeder/XKin. To compile Xkin i had to install fftw (http://www.fftw.org/download.html) I build fftw successfully with

./configure  
make  
make install

But when i build Xkin i got this Error

/usr/bin/ld: /usr/local/lib/libfftw3.a(lt4-problem.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

/usr/local/lib/libfftw3.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status
make[2]: * [lib/posture/libposture.so] Error 1
make[1]: *
[lib/posture/CMakeFiles/posture.dir/all] Error 2
make: *** [all] Error 2`


Solution

  • do this

    ./configure --enable-shared
    sudo make CFLAGS=-fPIC
    sudo make install

    This will solve your problem.