GNOME Bugzilla – Bug 734062
NetworkManager-0.9.10.0 fails to build when passing --disable-concheck
Last modified: 2014-07-31 20:23:24 UTC
./configure --disable-concheck [...] checking for LIBSOUP... yes [...] Features: concheck: no [...] libtool: link: x86_64-pc-linux-gnu-ranlib .libs/libNetworkManager.a libtool: link: rm -fr .libs/libNetworkManager.lax libtool: link: ( cd ".libs" && rm -f "libNetworkManager.la" && ln -s "../libNetworkManager.la" "libNetworkManager.la" ) x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../libgsystem -I../libnm-util -I../libnm-util -I../callouts -DG_LOG_DOMAIN=\""NetworkManager"\" -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE -I../src/./ -I../src/config/ -I../src/devices/ -I../src/dhcp-manager/ -I../src/dns-manager/ -I../src/dnsmasq-manager/ -I../src/firewall-manager/ -I../src/logging/ -I../src/platform/ -I../src/platform/wifi/ -I../src/posix-signals/ -I../src/ppp-manager/ -I../src/rdisc/ -I../src/settings/ -I../src/settings/plugins/keyfile/ -I../src/supplicant-manager/ -I../src/vpn-manager/ -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -I/usr/include/gudev-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libnl3 -pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/polkit-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DBINDIR=\"/usr/bin\" -DDATADIR=\"/usr/share\" -DLIBEXECDIR=\"/usr/libexec\" -DLOCALSTATEDIR=\"/var\" -DSBINDIR=\"/usr/sbin\" -DSYSCONFDIR=\"/etc\" -DRUNDIR=\"/var/run/NetworkManager\" -DNMCONFDIR=\"/etc/NetworkManager\" -DNMLOCALEDIR=\"/usr/share/locale\" -DNMPLUGINDIR=\"/usr/lib64/NetworkManager\" -DNMRUNDIR=\"/var/run/NetworkManager\" -DNMSTATEDIR=\"/var/lib/NetworkManager\" -DDHCLIENT_PATH=\"/sbin/dhclient\" -DDHCPCD_PATH=\"/sbin/dhcpcd\" -DPPPD_PLUGIN_DIR=\"/usr/lib64/pppd/2.4.5\" -march=native -pipe -O2 -c main.c /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -march=native -pipe -O2 -rdynamic -o NetworkManager main.o libNetworkManager.la ../libgsystem.la -lndp -lreadline libtool: link: x86_64-pc-linux-gnu-gcc -march=native -pipe -O2 -rdynamic -o .libs/NetworkManager main.o ./.libs/libNetworkManager.a -L/usr/lib64 /var/tmp/paludis/build/net-apps-NetworkManager-0.9.10.0/work/NetworkManager-0.9.10.0/libnm-util/.libs/libnm-util.so -L/usr/lib64/nss /usr/lib64/libuuid.so -lssl3 -lsmime3 -lnss3 -lnssutil3 -lsoftokn3 -lplds4 -lplc4 -lnspr4 /usr/lib64/libdbus-glib-1.so /usr/lib64/libdbus-1.so /usr/lib64/libgudev-1.0.so /usr/lib64/libudev.so /usr/lib64/libnl-route-3.so /usr/lib64/libnl-genl-3.so /usr/lib64/libnl-3.so /usr/lib64/libpolkit-gobject-1.so /usr/lib64/libsystemd.so -lrt /usr/lib64/liblzma.so -ldw -lm ../.libs/libgsystem.a /usr/lib64/libgio-2.0.so -lz -lresolv /usr/lib64/libgobject-2.0.so /usr/lib64/libffi.so /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libglib-2.0.so -lpthread /usr/lib64/libndp.so -lreadline -pthread Error: * In program cave perform install --hooks --managed-output --output-exclusivity with-others =net-apps/NetworkManager-0.9.10.0:0::desktop --destination installed --replacing =net-apps/NetworkManager-0.9.10.0:0::installed --x-of-y 1 of 1: * When installing 'net-apps/NetworkManager-0.9.10.0:0::desktop' replacing { 'net-apps/NetworkManager-0.9.10.0:0::installed' }: * When running an ebuild command on 'net-apps/NetworkManager-0.9.10.0:0::desktop': * Install failed for 'net-apps/NetworkManager-0.9.10.0:0::desktop' (paludis::ActionFailedError) Makefile:997: recipe for target 'NetworkManager' failed make[4]: Leaving directory '/var/tmp/paludis/build/net-apps-NetworkManager-0.9.10.0/work/NetworkManager-0.9.10.0/src' Makefile:1592: recipe for target 'all-recursive' failed make[3]: Leaving directory '/var/tmp/paludis/build/net-apps-NetworkManager-0.9.10.0/work/NetworkManager-0.9.10.0/src' Makefile:898: recipe for target 'all' failed make[2]: Leaving directory '/var/tmp/paludis/build/net-apps-NetworkManager-0.9.10.0/work/NetworkManager-0.9.10.0/src' Makefile:849: recipe for target 'all-recursive' failed make[1]: Leaving directory '/var/tmp/paludis/build/net-apps-NetworkManager-0.9.10.0/work/NetworkManager-0.9.10.0' Makefile:643: recipe for target 'all' failed ./.libs/libNetworkManager.a(nm-dns-manager.o): In function `merge_one_ip4_config': nm-dns-manager.c:(.text+0x1ee): undefined reference to `soup_tld_domain_is_public_suffix' nm-dns-manager.c:(.text+0x246): undefined reference to `soup_tld_domain_is_public_suffix' ./.libs/libNetworkManager.a(nm-dns-manager.o): In function `merge_one_ip6_config.isra.1': nm-dns-manager.c:(.text+0x3fe): undefined reference to `soup_tld_domain_is_public_suffix' nm-dns-manager.c:(.text+0x456): undefined reference to `soup_tld_domain_is_public_suffix' ./.libs/libNetworkManager.a(nm-dns-manager.o): In function `update_dns': nm-dns-manager.c:(.text+0x13c8): undefined reference to `soup_tld_domain_is_public_suffix' ./.libs/libNetworkManager.a(nm-dns-manager.o):nm-dns-manager.c:(.text+0x13ee): more undefined references to `soup_tld_domain_is_public_suffix' follow collect2: error: ld returned 1 exit status make[4]: *** [NetworkManager] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Installed libsoup version is 2.46.0 and building with --enable-concheck works fine.
Created attachment 282195 [details] [review] build: fix linker error with --disable-concheck When building with --disable-concheck, configure might still detect libsoup (setting HAVE_LIBSOUP). But without connection checking, we don't link against the library, resulting in a linker error. We should only make use of libsoup if we both HAVE_LIBSOUP *and* WITH_CONCHECK together. https://bugzilla.gnome.org/show_bug.cgi?id=734062 Signed-off-by: Thomas Haller <thaller@redhat.com>
Comment on attachment 282195 [details] [review] build: fix linker error with --disable-concheck >We should only make use of libsoup if we both HAVE_LIBSOUP *and* >WITH_CONCHECK together. Nope; there's non-concheck-related code that uses libsoup. So we need to add LIBSOUP_LIBS whenever we HAVE_LIBSOUP. (And even having --disable-concheck is weird... We don't allow disabling other random features. If you have libsoup, you should get concheck really...)
I added an option --with-libsoap. --disable-concheck still exists, but we will now link against libsoup if we have it (unless --without-libsoup). master: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=833ea6944d5abeb05d9fd36cf5176fd6ce1bde7a nm-0-9-10: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=c720d560b13657381dfee7c3166b41fc06248340