Fails to build with -Wl,-z,defs
Version: 1.8.18
The Debian package is built with LDFLAGS=-Wl,-z,defs
After the update to 1.8.18, I get the following build failure:
make all-recursive
make[1]: Entering directory '/home/michael/git/network-manager-openvpn'
Making all in .
make[2]: Entering directory '/home/michael/git/network-manager-openvpn'
/bin/bash ./libtool --tag=CC --mode=link gcc -fdata-sections -ffunction-sections -Wl,--gc-sections -Wall -std=gnu99 -Werror -Wextra -Wdeclaration-after-statement -Wfloat-equal -Wimplicit-fallthrough -Wimplicit-function-declaration -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wundef -Wno-duplicate-decl-specifier -Wno-format-truncation -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-unused-but-set-variable -Wno-unused-parameter -g -O2 -Warray-bounds -Wunused-value -Wno-missing-braces -avoid-version -Wl,--version-script=./properties/libnm-vpn-plugin-openvpn.ver -Wl,-z,defs -o properties/libnm-vpn-plugin-openvpn.la -rpath /usr/local/lib/NetworkManager properties/libnm-vpn-plugin-openvpn-core.la -ldl
libtool: link: gcc -shared -fPIC -DPIC -Wl,--whole-archive properties/.libs/libnm-vpn-plugin-openvpn-core.a -Wl,--no-whole-archive -lnm -lgio-2.0 -lgobject-2.0 -lglib-2.0 -ldl -Wl,--gc-sections -g -O2 -Wl,--version-script=./properties/libnm-vpn-plugin-openvpn.ver -Wl,-z -Wl,defs -Wl,-soname -Wl,libnm-vpn-plugin-openvpn.so -o properties/.libs/libnm-vpn-plugin-openvpn.so
/usr/bin/ld: properties/.libs/libnm-vpn-plugin-openvpn-core.a(libnm_vpn_plugin_openvpn_core_la-nm-openvpn-editor-plugin.o): in function `get_editor':
/home/michael/git/network-manager-openvpn/properties/nm-openvpn-editor-plugin.c:137: undefined reference to `g_module_open'
/usr/bin/ld: /home/michael/git/network-manager-openvpn/properties/nm-openvpn-editor-plugin.c:138: undefined reference to `g_module_symbol'
/usr/bin/ld: /home/michael/git/network-manager-openvpn/properties/nm-openvpn-editor-plugin.c:139: undefined reference to `g_module_close'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1452: properties/libnm-vpn-plugin-openvpn.la] Error 1
make[2]: Leaving directory '/home/michael/git/network-manager-openvpn'
make[1]: *** [Makefile:1914: all-recursive] Error 1
make[1]: Leaving directory '/home/michael/git/network-manager-openvpn'
make: *** [Makefile:1210: all] Error 2
As can be seen above, libnm-vpn-plugin-openvpn-core.la is not explicitly linked against gmodule-2.0 but apparently requires it.
git bisect shows ef6900c9 as the first faulty commit
Edited by Michael Biebl