From 873e66a03e2ba92c17f6b48ff8fbb3709688f3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Thu, 4 Apr 2024 08:51:02 +0200 Subject: [PATCH] meson: use shared_library for target used by linker Meson has shared_library and shared_module. The latter should be used only for shared plugins loaded by dlopen, not for shared libraries linked by the linker. The target `nm_wwan` was defined as shared_module probably because it is a library for loadable plugins only, andcontains references to symbols from the main executable that cannot be resolved at link time. Do as the deprecation message suggest and convert it to shared_library with b_lundef=false: DEPRECATION: target nm-device-plugin-wwan links against shared module nm-wwan, which is incorrect. This will be an error in the future, so please use shared_library() for nm-wwan instead. If shared_module() was used for nm-wwan because it has references to undefined symbols, use shared_library() with `override_options: ['b_lundef=false']` instead. --- src/core/devices/wwan/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/devices/wwan/meson.build b/src/core/devices/wwan/meson.build index 37ef738c48..acccb5fd6e 100644 --- a/src/core/devices/wwan/meson.build +++ b/src/core/devices/wwan/meson.build @@ -4,7 +4,7 @@ wwan_inc = include_directories('.') linker_script = join_paths(meson.current_source_dir(), 'libnm-wwan.ver') -libnm_wwan = shared_module( +libnm_wwan = shared_library( 'nm-wwan', sources: files( 'nm-service-providers.c', @@ -21,6 +21,7 @@ libnm_wwan = shared_module( link_depends: linker_script, install: true, install_dir: nm_plugindir, + override_options: ['b_lundef=false'], ) libnm_wwan_dep = declare_dependency(