0

I am using Ubuntu 14.04. I am trying to compile this project OpenFP. Issue is when after I run "configure" shell and use "make" to compile it I receive following error.

/usr/bin/ld: openfp_extract-fft.o: undefined reference to symbol 'cos@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: *** [openfp_extract] Error 1 make[1]: Leaving directory `/home/murtaza/Desktop/openfp-1.3.2' make: *** [all] Error 2

The problem I believe is compiler unable to implicitly linking to "libm", but I really don't understand where to append -lm to make it work. I've tried on different locations in "makefile.am". But each time after configuration I get the same results. Any help will be appreciated.

sergico
  • 2,595
  • 2
  • 29
  • 40
Murtaza Zaidi
  • 599
  • 3
  • 14
  • 1
    The error seems a missing symbol in your glibc: **undefined reference to symbol 'cos@@GLIBC_2.2.5'** why do you thing it's a linking issue related to libm? It might be that the OpenFP project was meant to be linked with a different (older?) version of the glibc – sergico Jun 04 '14 at 21:06
  • 1
    It was the same error as I explained. glibc doesn't implicitly link to libm. and also order of placing -lm is important. You should place it in the very end. After configuration when it produced the Makefile, I appended -lm flag in LDFLAG variable. It worked. – Murtaza Zaidi Jun 04 '14 at 21:39

1 Answers1

1

It was the same error as I explained. glibc doesn't implicitly link to libm. and also order of placing -lm is important. You should place it in the very end. After configuration when it produced the Makefile, I appended -lm flag in LDFLAG variable. It worked

Murtaza Zaidi
  • 599
  • 3
  • 14