Public bug reported: Background: With all recent versions of GCC on GNU/Linux systems like Ubuntu, when you use the math library, you have to explicitly link to it.
I am currently using Xenial 16.04 and did a recompile of source package libgphoto2. Then I got warnings fromdpkg-shlibdeps. make[1]: Entering directory '/home/ubuntu-xenial/user/Downloads/Launchpad/libgphoto2/libgphoto2-2.5.9' dh_shlibdeps -ldebian/libgphoto2-6/usr/lib/:debian/libgphoto2-port12/usr/lib/ dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/ptp2.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: 2 other similar warnings have been skipped (use -v to see them all) dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/stv0680.so contains an unresolvable reference to symbol pow: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/sonix.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/jl2005c.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/digigr8.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/mars.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/sierra.so contains an unresolvable reference to symbol roundf: it's probably a plugin make[1]: Leaving directory '/home/ubuntu-xenial/user/Downloads/Launchpad/libgphoto2/libgphoto2-2.5.9' I am quite sure that sqrt is the square root function from the math library. Usually, at least with GCC version newer than ~ 2013 you have to append a -lm to link against the math library. Obviously this isn't the case: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../libgphoto2_port -I../libgphoto2_port -D_GPHOTO2_INTERNAL_CODE -DLOCALEDIR=\"/usr/share/locale\" -DCAMLIBS=\"/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9\" -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/libexif -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wmissing-declarations -Wmissing-prototypes -c gphoto2-filesys.c -fPIC -DPIC -o .libs/libgphoto2_la-gphoto2-filesys.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../libgphoto2_port -I../libgphoto2_port -D_GPHOTO2_INTERNAL_CODE -DLOCALEDIR=\"/usr/share/locale\" -DCAMLIBS=\"/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9\" -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/libexif -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wmissing-declarations -Wmissing-prototypes -c gphoto2-filesys.c -fPIE -o libgphoto2_la-gphoto2-filesys.o >/dev/null 2>&1 at the end we should see -c gphoto2-filesys.c -fPIE -lm -o libgphoto2_la-gphoto2-filesys.o >/dev/null 2>&1 I did check in the official Ubuntu repository and you did get the same warnings: dh_shlibdeps -ldebian/libgphoto2-6/usr/lib/:debian/libgphoto2-port12/usr/lib/ dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/jl2005c.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/sierra.so contains an unresolvable reference to symbol roundf: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/ptp2.so contains an unresolvable reference to symbol log2: it's probably a plugin dpkg-shlibdeps: warning: 2 other similar warnings have been skipped (use -v to see them all) dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/digigr8.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/mars.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/sonix.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.9/stv0680.so contains an unresolvable reference to symbol pow: it's probably a plugin make[1]: Leaving directory '/«PKGBUILDDIR»' It looks like the switch from GCC to NOT automatically link the math library was never dealt with, even in the latest Ubuntu releases ... I am no a configure.ac specialist and don't know exactly what to do in debian/rules to correct the problem. Either way may be upstream developers should be warned of the problem since they are in charge of maintaining the configure.ac file ... Here is some hint about what to do: https://www.gnu.org/software/automake/manual/html_node/Linking.html There is still the pow function ... and I don't know exactly if it's part of the math library ? But it should be coming from another library if so which as well should be linked. Besides it's still the same in the latest version of gphoto2 PROPOSED for Bionic 18.04: amd64 build of libgphoto2 2.5.16-2 in ubuntu bionic PROPOSED https://launchpad.net/ubuntu/+source/libgphoto2/2.5.16-2/+build/14176152 dh_shlibdeps -ldebian/libgphoto2-6/usr/lib/:debian/libgphoto2-port12/usr/lib/ dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.16/ptp2.so contains an unresolvable reference to symbol log2: it's probably a plugin dpkg-shlibdeps: warning: 2 other similar warnings have been skipped (use -v to see them all) dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.16/digigr8.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.16/konica_qm150.so contains an unresolvable reference to symbol exif_data_unref: it's probably a plugin dpkg-shlibdeps: warning: 1 similar warning has been skipped (use -v to see it) dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.16/mars.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.16/sierra.so contains an unresolvable reference to symbol roundf: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.16/jl2005c.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.16/sonix.so contains an unresolvable reference to symbol sqrt: it's probably a plugin dpkg-shlibdeps: warning: debian/libgphoto2-6/usr/lib/x86_64-linux-gnu/libgphoto2/2.5.16/stv0680.so contains an unresolvable reference to symbol pow: it's probably a plugin make[1]: Leaving directory '/<<PKGBUILDDIR>>' It seems you have even more math functions ignored like log2 ... I know for sure that Ubuntu only copy these builds from Debian ... However it's urgent not to overlook GCC evolution impacts on basic packages ... ** Affects: mtpaint (Ubuntu) Importance: Undecided Status: New ** Tags: linking -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1802674 Title: libgphoto2 builds lacks a link to the math library in all Ubuntu releases since at least Xenial 16.04 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mtpaint/+bug/1802674/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs