Fails to build with LTO enabled
There is an attempt in Debian to enable LTO system wide https://wiki.debian.org/ToolChain/LTO
As part of this effort, network-manager was rebuilt with LTO enabled and this caused a build failure and a corresponding bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015556 The full build log is available at http://qa-logs.debian.net/2022/06/09/dpkglto/network-manager_1.38.0-2_unstable_dpkglto.log
The relevant parts from the build log are
>>linker script "./src/libnm-client-impl/libnm.ver" contains symbols that are not exported by library "./src/libnm-client-impl/.libs/libnm.so":
1 nm_access_point_get_last_seen@libnm_1_0_6
2 nm_device_get_metered@libnm_1_0_6
3 nm_device_wifi_request_scan_options@libnm_1_0_6
4 nm_device_wifi_request_scan_options_async@libnm_1_0_6
5 nm_ip_address_dup@libnm_1_30_8
6 nm_ip_route_dup@libnm_1_30_8
7 nm_metered_get_type@libnm_1_0_6
8 nm_setting_connection_autoconnect_slaves_get_type@libnm_1_0_4
9 nm_setting_connection_get_autoconnect_slaves@libnm_1_0_4
10 nm_setting_connection_get_mdns@libnm_1_10_14
11 nm_setting_connection_get_metered@libnm_1_0_6
12 nm_setting_connection_mdns_get_type@libnm_1_10_14
13 nm_setting_ip_config_get_dns_priority@libnm_1_2_4
14 nm_setting_ip_config_get_required_timeout@libnm_1_30_8
15 nm_setting_wired_get_wake_on_lan@libnm_1_0_6
16 nm_setting_wired_get_wake_on_lan_password@libnm_1_0_6
17 nm_setting_wired_wake_on_lan_get_type@libnm_1_0_6
18 nm_utils_enum_from_str@libnm_1_0_6
19 nm_utils_enum_to_str@libnm_1_0_6
20 nm_utils_wifi_2ghz_freqs@libnm_1_0_6
21 nm_utils_wifi_5ghz_freqs@libnm_1_0_6
make[4]: *** [Makefile:21307: check-local-exports-libnm] Error 1
Looking at src/libnm-client-impl/libnm.ver, the missing symbols are
libnm_1_0_4 {
#nm_setting_connection_autoconnect_slaves_get_type@libnm_1_0_4;
#nm_setting_connection_get_autoconnect_slaves@libnm_1_0_4;
} libnm_1_0_0;
libnm_1_0_6 {
#nm_access_point_get_last_seen@libnm_1_0_6;
#nm_device_get_metered@libnm_1_0_6;
#nm_device_wifi_request_scan_options@libnm_1_0_6;
#nm_device_wifi_request_scan_options_async@libnm_1_0_6;
#nm_metered_get_type@libnm_1_0_6;
#nm_setting_connection_get_metered@libnm_1_0_6;
#nm_setting_wired_get_wake_on_lan@libnm_1_0_6;
#nm_setting_wired_get_wake_on_lan_password@libnm_1_0_6;
#nm_setting_wired_wake_on_lan_get_type@libnm_1_0_6;
#nm_utils_enum_from_str@libnm_1_0_6;
#nm_utils_enum_to_str@libnm_1_0_6;
#nm_utils_wifi_2ghz_freqs@libnm_1_0_6;
#nm_utils_wifi_5ghz_freqs@libnm_1_0_6;
} libnm_1_0_4;
libnm_1_2_4 {
#nm_setting_ip_config_get_dns_priority@libnm_1_2_4;
} libnm_1_2_0;
libnm_1_10_14 {
#nm_setting_connection_get_mdns@libnm_1_10_14;
#nm_setting_connection_mdns_get_type@libnm_1_10_14;
} libnm_1_10_2;
libnm_1_30_8 {
#nm_ip_address_dup@libnm_1_30_8;
#nm_ip_route_dup@libnm_1_30_8;
#nm_setting_ip_config_get_required_timeout@libnm_1_30_8;
} libnm_1_30_0;
I notice, that all of them are "commented out", i.e. have a '#'. I've never seen this syntax before. Is this a bug in the libnm.ver script or a toolchain issue?