I've just seen the following after changing the default system linker from bfd to gold:
libtool: link: x86_64-pc-linux-gnu-gcc -o /tmp/osm-gps-map-0.7.3/src/tmp-introspecti5Eacz/.libs/OsmGpsMap-1.0 -O2 tmp-introspecti5Eacz/tmp/osm-gps-map-0.7.3/src/tmp-introspecti5Eacz/OsmGpsMap-1.0.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic -Wl,--as-needed -L. ./.libs/libosmgpsmap.so -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lfontconfig -lfreetype -lcairo -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread
./.libs/libosmgpsmap.so: error: undefined reference to 'sin'
./.libs/libosmgpsmap.so: error: undefined reference to 'atanh'
./.libs/libosmgpsmap.so: error: undefined reference to 'exp'
./.libs/libosmgpsmap.so: error: undefined reference to 'tanh'
./.libs/libosmgpsmap.so: error: undefined reference to 'asin'
./.libs/libosmgpsmap.so: error: undefined reference to 'logf'
./.libs/libosmgpsmap.so: error: undefined reference to 'pow'
./.libs/libosmgpsmap.so: error: undefined reference to 'sincos'
./.libs/libosmgpsmap.so: error: undefined reference to 'floorf'
./.libs/libosmgpsmap.so: error: undefined reference to 'cos'
collect2: error: ld returned 1 exit status
From what I can tell this is because gold is more strict than bfd when it comes to implicit linking of libraries and configure does not add -lm to linker options - even though it should because some libm functions are indeed used in the code.
I've just seen the following after changing the default system linker from bfd to gold:
libtool: link: x86_64-pc-linux-gnu-gcc -o /tmp/osm-gps-map-0.7.3/src/tmp-introspecti5Eacz/.libs/OsmGpsMap-1.0 -O2 tmp-introspecti5Eacz/tmp/osm-gps-map-0.7.3/src/tmp-introspecti5Eacz/OsmGpsMap-1.0.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic -Wl,--as-needed -L. ./.libs/libosmgpsmap.so -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lfontconfig -lfreetype -lcairo -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread ./.libs/libosmgpsmap.so: error: undefined reference to 'sin' ./.libs/libosmgpsmap.so: error: undefined reference to 'atanh' ./.libs/libosmgpsmap.so: error: undefined reference to 'exp' ./.libs/libosmgpsmap.so: error: undefined reference to 'tanh' ./.libs/libosmgpsmap.so: error: undefined reference to 'asin' ./.libs/libosmgpsmap.so: error: undefined reference to 'logf' ./.libs/libosmgpsmap.so: error: undefined reference to 'pow' ./.libs/libosmgpsmap.so: error: undefined reference to 'sincos' ./.libs/libosmgpsmap.so: error: undefined reference to 'floorf' ./.libs/libosmgpsmap.so: error: undefined reference to 'cos' collect2: error: ld returned 1 exit status
From what I can tell this is because gold is more strict than bfd when it comes to implicit linking of libraries and configure does not add -lm to linker options - even though it should because some libm functions are indeed used in the code.