Fails to build with -Wl,-z,defs
Version: 1.2.10
The Debian package is built with LDFLAGS=-Wl,-z,defs
After the update to 1.2.10, I get the following build failure:
make all-recursive
make[1]: Entering directory '/home/michael/git/network-manager-pptp'
Making all in .
make[2]: Entering directory '/home/michael/git/network-manager-pptp'
/bin/bash ./libtool --tag=CC --mode=link gcc -pthread -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_34 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_34 -pthread -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2 -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2 -Wall -std=gnu99 -Werror -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -Wno-duplicate-decl-specifier -Wstrict-prototypes -Wno-unused-but-set-variable -Wundef -Wimplicit-function-declaration -Wpointer-arith -Winit-self -Wmissing-include-dirs -Wno-pragmas -g -O2 -Warray-bounds -Wunused-value -avoid-version -Wl,--version-script="./properties/libnm-vpn-plugin-pptp.ver" -Wl,-z,defs -o properties/libnm-vpn-plugin-pptp.la -rpath /usr/local/lib/NetworkManager shared/nm-utils/properties_libnm_vpn_plugin_pptp_la-nm-vpn-plugin-utils.lo properties/libnm_vpn_plugin_pptp_la-nm-pptp-editor-plugin.lo -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lnm -lgio-2.0 -lgobject-2.0 -lglib-2.0 -ldl
libtool: link: gcc -shared -fPIC -DPIC shared/nm-utils/.libs/properties_libnm_vpn_plugin_pptp_la-nm-vpn-plugin-utils.o properties/.libs/libnm_vpn_plugin_pptp_la-nm-pptp-editor-plugin.o -lnm -lgio-2.0 -lgobject-2.0 -lglib-2.0 -ldl -pthread -pthread -g -O2 -Wl,--version-script=./properties/libnm-vpn-plugin-pptp.ver -Wl,-z -Wl,defs -pthread -Wl,-soname -Wl,libnm-vpn-plugin-pptp.so -o properties/.libs/libnm-vpn-plugin-pptp.so
/usr/bin/ld: properties/.libs/libnm_vpn_plugin_pptp_la-nm-pptp-editor-plugin.o: in function `get_editor':
/home/michael/git/network-manager-pptp/properties/nm-pptp-editor-plugin.c:161: undefined reference to `g_module_open'
/usr/bin/ld: /home/michael/git/network-manager-pptp/properties/nm-pptp-editor-plugin.c:162: undefined reference to `g_module_symbol'
/usr/bin/ld: /home/michael/git/network-manager-pptp/properties/nm-pptp-editor-plugin.c:163: undefined reference to `g_module_close'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1132: properties/libnm-vpn-plugin-pptp.la] Error 1
make[2]: Leaving directory '/home/michael/git/network-manager-pptp'
make[1]: *** [Makefile:1512: all-recursive] Error 1
make[1]: Leaving directory '/home/michael/git/network-manager-pptp'
make: *** [Makefile:868: all] Error 2
As can be seen above, nm-pptp-editor-plugin.c is not explicitly linked against gmodule-2.0 but apparently requires it.
git bisect shows 66c72361 as the first faulty commit