On 07/18/2016 07:41 AM, John Stoffel wrote:
"Andy" == Andy Stewart <kb1oiq@mval.net> writes:
Andy> On 07/16/2016 04:48 PM, John Stoffel wrote:
John> So what if you just putt the following into the src/Makefile.am file:
John> AM_LDFLAGS = \ John> -lm
HI John, I just got back from vacation and started work on this again. I think I did exactly what you noted in your instructions (below), and it still is not working for me. Is there any chance you could setup an Ubuntu 16.04 test in a VM to confirm that I'm not insane?
John> I put it after the AM_CPPFLAGS definition up top. Seemed to do what I John> needed, but I haven't setup an Ubuntu 16.04 test VM yet to confirm.
So I spun up a droplet on Digital Oceon running Ubuntu 16.04 and with the above change, and the following steps, I got it to compile....
# apt-get update # apt-get install gcc libhamlib-dev make libgtk-dev libgtkextra-dev libglib2.0-dev libgtk2.0-dev # wget http://download.savannah.gnu.org/releases/xlog/xlog-2.0.14beta.tar.gz # tar xzf xlog-2.0.14beta.tar.gz # cd xlog-2.0.14beta/ # vi src/Makefile.am
- added in AM_LDFLAGS = -lm
# ./configure # make
The error I am seeing is this one: /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 collect2: error: ld returned 1 exit status Makefile:514: recipe for target 'xlog' failed This makes sense since the trunc function is needed by gui_gtkprintdialog.o. The link command is this one: gcc -g -O2 -Wall -Wno-unused-but-set-variable -Werror -lm -o xlog [many *.o files snipped] logfile/liblogfile.a -lgtk- x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject- 2.0 -lglib-2.0 -lfontconfig -lfreetype -L/usr/local/lib -lhamlib Notice where it put the "-lm". It should be right after -lhamlib but it isn't. When I cut / paste the link command and manually make that modification, the link is successful. I tried a different modification. I took out the AM_LDFLAGS entirely in src/Makefile.am, and then I modified the following line by appending "-lm". This worked(!) for me. xlog_LDADD = logfile/liblogfile.a \ @GTK_LIBS@ @HAMLIB_LIBS@ -lm Can you confirm that this fix also works for you? Thanks!! Andy -- Andy Stewart (KB1OIQ) Founder: Worcester Linux Users' Group Founder: Chelmsford Linux Meetup Group President: PART of Westford, MA (WB1GOF)