GNOME Bugzilla – Bug 769328
networkmanager-1.2.2: underlinking issue with gold linker
Last modified: 2016-08-01 15:07:11 UTC
With gold linker build fails with: g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC x86_64-pc-linux-gnu-gcc -o /ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm/tmp-introspectPb5Gkb/NM-1.0 -export-dynamic -march=native -O2 -pipe -Wl,-O1 -Wno-error -Wl,--as-needed tmp-introspectPb5Gkb/ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm/tmp-introspectPb5Gkb/NM-1.0.o -L. libnm.la -Wl,--export-dynamic -lgmodule-2.0 -pthread -lgio-2.0 -lgudev-1.0 -lgobject-2.0 -lglib-2.0 libtool: link: x86_64-pc-linux-gnu-gcc -o /ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm/tmp-introspectPb5Gkb/.libs/NM-1.0 -march=native -O2 -pipe -Wl,-O1 -Wno-error tmp-introspectPb5Gkb/ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm/tmp-introspectPb5Gkb/NM-1.0.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic -Wl,--as-needed -L. ./.libs/libnm.so -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -luuid -lgmodule-2.0 -lgio-2.0 -lgudev-1.0 -lgobject-2.0 -lglib-2.0 -pthread ./.libs/libnm.so: error: undefined reference to 'dlopen' ./.libs/libnm.so: error: undefined reference to 'dlsym' ./.libs/libnm.so: error: undefined reference to 'dlerror' ./.libs/libnm.so: error: undefined reference to 'dlclose' collect2: error: ld returned 1 exit status linking of temporary binary failed: Command '['/bin/sh', '../libtool', '--mode=link', '--tag=CC', 'x86_64-pc-linux-gnu-gcc', '-o', '/ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm/tmp-introspectPb5Gkb/NM-1.0', '-export-dynamic', '-march=native', '-O2', '-pipe', '-Wl,-O1', '-Wno-error', '-Wl,--as-needed', 'tmp-introspectPb5Gkb/ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm/tmp-introspectPb5Gkb/NM-1.0.o', '-L.', 'libnm.la', '-Wl,--export-dynamic', '-lgmodule-2.0', '-pthread', '-lgio-2.0', '-lgudev-1.0', '-lgobject-2.0', '-lglib-2.0']' returned non-zero exit status 1 /usr/share/gobject-introspection-1.0/Makefile.introspection:155: recipe for target 'NM-1.0.gir' failed make[4]: *** [NM-1.0.gir] Error 1 make[4]: Leaving directory '/ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm' Makefile:1083: recipe for target 'all-recursive' failed make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory '/ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm' Makefile:843: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64/libnm' Makefile:645: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/ubuntu/var/tmp/portage/net-misc/networkmanager-1.2.2/work/NetworkManager-1.2.2-abi_x86_64.amd64' Makefile:554: recipe for target 'all' failed make: *** [all] Error 2 This patch from downstream report fixes the problem: https://bugs.gentoo.org/show_bug.cgi?id=588474 diff -urN NetworkManager-1.2.2/libnm/Makefile.in NetworkManager-1.2.2-patched/libnm/Makefile.in --- NetworkManager-1.2.2/libnm/Makefile.in 2016-05-11 20:54:18.000000000 +0930 +++ NetworkManager-1.2.2-patched/libnm/Makefile.in 2016-07-11 07:50:54.372966460 +0930 @@ -913,7 +913,7 @@ } libnm.la: $(libnm_la_OBJECTS) $(libnm_la_DEPENDENCIES) $(EXTRA_libnm_la_DEPENDENCIES) - $(AM_V_CCLD)$(libnm_la_LINK) -rpath $(libdir) $(libnm_la_OBJECTS) $(libnm_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libnm_la_LINK) -rpath $(libdir) $(libnm_la_OBJECTS) $(libnm_la_LIBADD) $(LIBS) $(LIBDL) mostlyclean-compile: -rm -f *.$(OBJEXT)
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version. Thank you. Will be fixed in 1.2.4.