Linker error: DSO missing from command line
Hi Everybody, I have received a few reports indicating that xlog will not compile without error from the source tarball. Since I'm the xlog maintainer, I get to fix it, but so far, I've been unsuccessful. The error looks like this, and I've easily reproduced it on Ubuntu 16.04 LTS: /usr/bin/ld: gui_gtkprintdialog.o: undefined reference to symbol 'trunc@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line I've traced this to recently modified behavior of gcc, where all libraries needed to properly link the executable must be included on the command line. In this case, "-lm" is not explicitly on the command line, and thus the error. I have succeeded in making it work in this way, but it is just a workaround: ./configure LIBS="-lm" make make install It seems that automake 1.15 is needed to help get around this issue, and that version is part of Ubuntu 16.04. However, I'm stuck, trying to figure out the "right way" to fix this. I've googled for a couple of hours, trying to figure out what needs to go into configure.ac and/or Makefile.am, to no avail. I tried this in configure.ac: LT_LIB_M (nope) I tried this in Makefile.am: LIBS=-lm (nope) I also tried this in Makefile.am: LDFLAGS = -lm (nope) In each case, I reran autoconf, automake, and then ./configure, but the linker error persists. I must be missing something easy. Any helpful hints would surely be appreciated. Thanks, and 73, Andy -- Andy Stewart (KB1OIQ) Founder: Worcester Linux Users' Group Founder: Chelmsford Linux Meetup Group President: PART of Westford, MA (WB1GOF)
participants (1)
-
Andy Stewart