Failure building tests with gcc 7.2.1, missing libm
Submitted by Tristan Van Berkom
Assigned to Spice Bug List
Link to original bug (#103694)
Description
When building spice-gtk with modern gcc, the tests fail to build with the following error below.
I've tried various combinations and modifications to the tests/Makefile.am to explicitly add -lm
to LDADD, AM_LDADD, AM_LIBS, etc, and was still unable to come up with a working patch, not sure what's going on here.
libtool: link: gcc -g -O2 -o test-file-transfer file-transfer.o -L/usr/lib ../src/.libs/libspice-client-glib-2.0.a -L/usr/lib/x86_64-linux-gnu/mit-krb5 /usr/lib/libgthread-2.0.so -lopus -ljpeg -lpixman-1 -lssl -lcrypto -lpulse-mainloop-glib -lpulse -lsasl2 /usr/lib/libphodav-2.0.so /usr/lib/libsoup-2.4.so -lxml2 /usr/lib/x86_64-linux-gnu/libsqlite3.so -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err /usr/lib/libgio-2.0.so /usr/lib/libgmodule-2.0.so -ldl -lz -lselinux -lresolv /usr/lib/libgobject-2.0.so -lffi /usr/lib/libglib-2.0.so -lpcre -lpthread -pthread
libtool: link: gcc -g -O2 -o test-pipe pipe.o -L/usr/lib ../src/.libs/libspice-client-glib-2.0.a -L/usr/lib/x86_64-linux-gnu/mit-krb5 /usr/lib/libgthread-2.0.so -lopus -ljpeg -lpixman-1 -lssl -lcrypto -lpulse-mainloop-glib -lpulse -lsasl2 /usr/lib/libphodav-2.0.so /usr/lib/libsoup-2.4.so -lxml2 /usr/lib/x86_64-linux-gnu/libsqlite3.so -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err /usr/lib/libgio-2.0.so /usr/lib/libgmodule-2.0.so -ldl -lz -lselinux -lresolv /usr/lib/libgobject-2.0.so -lffi /usr/lib/libglib-2.0.so -lpcre -lpthread -pthread
/usr/bin/ld: ../src/.libs/libspice-client-glib-2.0.a(lines.o): undefined reference to symbol 'hypot@@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