title: undefined references when using fftw3.3.6 with threads and float enabled
body: <p>I installed fftw3.3.6 on my Ubuntu 16.04 to test the performance of using this library with thread and float enabled.</p>
  
  <h2>Step 1 :</h2>
  
  <p>Installed the library with thread and float and SIMD instructions enabled:`</p>
  
  <pre><code>sudo ./configure --enable-float --enable-generic-simd128 --enable-generic-simd256 --enable-threads
  make
  make install
  </code></pre>
  
  <h2>Step 2 :</h2>
  
  <p>I wrote this code (basing on the manual and tutorial) to compute an fft of 1024 points using 4 threads (complex to complex):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;fftw3.h&gt;
  
  #include "input.h"
  
  #define         NUMBER_OF_ELEMENTS              1024
  #define         NUM_THREADS                     4
  
  void Load_inputs(fftwf_complex* data)
  {
     int i;
  
     for(i=0;i&lt;NUMBER_OF_ELEMENTS;i++)
     {
        data[i][0] = input_data[2 * i];
        data[i][1] = input_data[2 * i + 1];
     }
  }
  
  
  int main()
  {
     fftwf_complex array[NUMBER_OF_ELEMENTS];
     fftwf_plan p;
     int i;
  
     fftwf_init_threads();
     fftwf_plan_with_nthreads(NUM_THREADS);
     p = fftwf_plan_dft(1,NUMBER_OF_ELEMENTS,array,array,FFTW_FORWARD,FFTW_EXHAUSTIVE);
     Load_inputs(array); //function to load input data from input.h file to array[]
     fftwf_execute(p);
     FILE* res = NULL;
     res = fopen("result.txt", "w");
     for ( i = 0; i &lt;1024; i++ )
     {
         fprintf(res,"RE = %f \t IM  = %f\n",array[i][0], array[i][1] );
     }
     fclose(res);
     fftwf_destroy_plan(p);
     fftwf_cleanup_threads();
  }
  </code></pre>
  
  <p>And then, I compiled this program with this makefile.</p>
  
  <pre><code>CC=gcc
  CFLAGS=-g3 -c -Wall -O0 -mavx -mfma -ffast-math 
  
  SOURCES=$ test.c
  OBJECTS=$(SOURCES:.c=.o)
  
  EXECUTABLE=test
  
  
  all: $(TASKMAP) $(SOURCES) $(EXECUTABLE)
  
  $(EXECUTABLE): $(OBJECTS) 
       $(CC) $(OBJECTS) -o $@ -L -lfftw3f_threads -lfftw3f 
  
  .c.o:
       $(CC) $(CFLAGS) $&lt; -lm -o $@
  
  clean: 
       rm -fr $(OBJECTS) $(EXECUTABLE)
  </code></pre>
  
  <h2>Compilation errors :</h2>
  
  <p>After compilation I've got these errors:</p>
  
  <pre><code>gcc test.o -o test -L -lfftw3f_threads -lfftw3f 
  //usr/local/lib/libfftw3f.a(mapflags.o): In function `fftwf_mapflags':
  mapflags.c:(.text+0x346): undefined reference to `__log_finite'
  Makefile:13: recipe for target 'test' failed
  //usr/local/lib/libfftw3f.a(trig.o): In function `cexpl_sincos':
  trig.c:(.text+0x2c1): undefined reference to `sincos'
  //usr/local/lib/libfftw3f.a(trig.o): In function `fftwf_mktriggen':
  trig.c:(.text+0x50b): undefined reference to `sincos'
  trig.c:(.text+0x653): undefined reference to `sincos'
  test.o: In function `main':
  /home/anouar/workspace/Thread_example//test.c:27: undefined reference to `fftwf_init_threads'
  /home/anouar/workspace/Thread_example//test.c:28: undefined reference to `fftwf_plan_with_nthreads'
  /home/anouar/workspace/Thread_example//test.c:40: undefined reference to `fftwf_cleanup_threads'
   collect2: error: ld returned 1 exit status
   make: *** [test] Error 1
  </code></pre>
  
  <p>Is there something missing, or something wrong that I have did during installation and compilation?</p>