Skip to contentSkip to conversation

package/modem-manager: fix static build

PATCH In review Fabrice Fontaine 2 participants 3 messages Feb 19, 2023 – Feb 20, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/modem-manager: fix static build

Commit d769cfc13f6c2544f8bc5b6339d23763319a2383 was incomplete as plugins/meson.build still unconditionally calls shared_module. So disable plugins to fix the following static build failure raised since bump to version 1.20.2 in commit b95334b71fbdde0f7621b58ed35fa98df9e0966d:

[238/417] Linking target plugins/libmm-shared-telit.so
FAILED: plugins/libmm-shared-telit.so

Plugins could be enabled back through builtin_plugins as soon as
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/1c4da332ee6e0d948f85a63f74cb27e89075c011
lands in a stable release

Fixes:
- http://autobuild.buildroot.org/results/deb2a752accb021392bb9dc3d06b2b1bf151535c

---
 package/modem-manager/modem-manager.mk | 44 ++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
package/modem-manager/modem-manager.mk +44 -0
index 979a80a8e9..824b9eda5a 100644
@@ -80,6 +80,50 @@ else
 MODEM_MANAGER_CONF_OPTS += -Dbash_completion=false
 endif
 
+ifeq ($(BR2_STATIC_LIBS),y)
+MODEM_MANAGER_CONF_OPTS += \
+	-Dplugin_generic=disabled \
+	-Dplugin_altair_lte=disabled \
+	-Dplugin_anydata=disabled \
+	-Dplugin_broadmobi=disabled \
+	-Dplugin_cinterion=disabled \
+	-Dplugin_dell=disabled \
+	-Dplugin_dlink=disabled \
+	-Dplugin_fibocom=disabled \
+	-Dplugin_foxconn=disabled \
+	-Dplugin_gosuncn=disabled \
+	-Dplugin_haier=disabled \
+	-Dplugin_huawei=disabled \
+	-Dplugin_intel=disabled \
+	-Dplugin_iridium=disabled \
+	-Dplugin_linktop=disabled \
+	-Dplugin_longcheer=disabled \
+	-Dplugin_mbm=disabled \
+	-Dplugin_motorola=disabled \
+	-Dplugin_mtk=disabled \
+	-Dplugin_nokia=disabled \
+	-Dplugin_nokia_icera=disabled \
+	-Dplugin_novatel=disabled \
+	-Dplugin_novatel_lte=disabled \
+	-Dplugin_option=disabled \
+	-Dplugin_option_hso=disabled \
+	-Dplugin_pantech=disabled \
+	-Dplugin_qcom_soc=disabled \
+	-Dplugin_quectel=disabled \
+	-Dplugin_samsung=disabled \
+	-Dplugin_sierra_legacy=disabled \
+	-Dplugin_sierra=disabled \
+	-Dplugin_simtech=disabled \
+	-Dplugin_telit=disabled \
+	-Dplugin_thuraya=disabled \
+	-Dplugin_tplink=disabled \
+	-Dplugin_ublox=disabled \
+	-Dplugin_via=disabled \
+	-Dplugin_wavecom=disabled \
+	-Dplugin_x22x=disabled \
+	-Dplugin_zte=disabled
+endif
+
 define MODEM_MANAGER_INSTALL_INIT_SYSV
 	$(INSTALL) -m 0755 -D package/modem-manager/S44modem-manager \
 		$(TARGET_DIR)/etc/init.d/S44modem-manager
Signature · 6 lines
2.39.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hey,

Quoted 64 lines · Fabrice Fontaine

Commit d769cfc13f6c2544f8bc5b6339d23763319a2383 was incomplete as plugins/meson.build still unconditionally calls shared_module. So disable plugins to fix the following static build failure raised since bump to version 1.20.2 in commit b95334b71fbdde0f7621b58ed35fa98df9e0966d:

[238/417] Linking target plugins/libmm-shared-telit.so
FAILED: plugins/libmm-shared-telit.so

Plugins could be enabled back through builtin_plugins as soon as
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/1c4da332ee6e0d948f85a63f74cb27e89075c011
lands in a stable release

Fixes:
- http://autobuild.buildroot.org/results/deb2a752accb021392bb9dc3d06b2b1bf151535c

---
 package/modem-manager/modem-manager.mk | 44 ++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
package/modem-manager/modem-manager.mk +34 -0
index 979a80a8e9..824b9eda5a 100644
@@ -80,6 +80,50 @@ else
 MODEM_MANAGER_CONF_OPTS += -Dbash_completion=false
 endif
 
+ifeq ($(BR2_STATIC_LIBS),y)
+MODEM_MANAGER_CONF_OPTS += \
+       -Dplugin_generic=disabled \
+       -Dplugin_altair_lte=disabled \
+       -Dplugin_anydata=disabled \
+       -Dplugin_broadmobi=disabled \
+       -Dplugin_cinterion=disabled \
+       -Dplugin_dell=disabled \
+       -Dplugin_dlink=disabled \
+       -Dplugin_fibocom=disabled \
+       -Dplugin_foxconn=disabled \
+       -Dplugin_gosuncn=disabled \
+       -Dplugin_haier=disabled \
+       -Dplugin_huawei=disabled \
+       -Dplugin_intel=disabled \
+       -Dplugin_iridium=disabled \
+       -Dplugin_linktop=disabled \
+       -Dplugin_longcheer=disabled \
+       -Dplugin_mbm=disabled \
+       -Dplugin_motorola=disabled \
+       -Dplugin_mtk=disabled \
+       -Dplugin_nokia=disabled \
+       -Dplugin_nokia_icera=disabled \
+       -Dplugin_novatel=disabled \
+       -Dplugin_novatel_lte=disabled \
+       -Dplugin_option=disabled \
+       -Dplugin_option_hso=disabled \
+       -Dplugin_pantech=disabled \
+       -Dplugin_qcom_soc=disabled \
+       -Dplugin_quectel=disabled \
+       -Dplugin_samsung=disabled \
+       -Dplugin_sierra_legacy=disabled \
+       -Dplugin_sierra=disabled \
+       -Dplugin_simtech=disabled \

package/modem-manager/modem-manager.mk else · line 126

Quoted 10 lines
package/modem-manager/modem-manager.mk +10 -0
+       -Dplugin_telit=disabled \
+       -Dplugin_thuraya=disabled \
+       -Dplugin_tplink=disabled \
+       -Dplugin_ublox=disabled \
+       -Dplugin_via=disabled \
+       -Dplugin_wavecom=disabled \
+       -Dplugin_x22x=disabled \
+       -Dplugin_zte=disabled
+endif
+

You can disable all plugins altogether with "-Dauto_features=disabled"; it is the recommended way to do so in MM 1.20.
But I wonder, is it only to have the build with static libs pass? MM 1.20 without plugins will not be usable at all, at least one plugin is required, so not sure how useful that is.

In MM 1.22 (or git main) there is the new "-Dbuiltin_plugins=true" option that will embed all selected plugins within the ModemManager daemon binary itself.

Cheers!
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw

Hi,

Quoted 80 lines · Aleksander Morgado

Hey,

Quoted 7 lines · Fabrice Fontaine

Commit d769cfc13f6c2544f8bc5b6339d23763319a2383 was incomplete as plugins/meson.build still unconditionally calls shared_module. So disable plugins to fix the following static build failure raised since bump to version 1.20.2 in commit b95334b71fbdde0f7621b58ed35fa98df9e0966d:

Quoted 5 lines

[238/417] Linking target plugins/libmm-shared-telit.so
FAILED: plugins/libmm-shared-telit.so

Plugins could be enabled back through builtin_plugins as soon as

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/1c4da332ee6e0d948f85a63f74cb27e89075c011

Quoted 4 lines

lands in a stable release

Fixes:
-

http://autobuild.buildroot.org/results/deb2a752accb021392bb9dc3d06b2b1bf151535c

Review

Quoted 7 lines
---
 package/modem-manager/modem-manager.mk | 44 ++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
(quoted diff) +0 -0

b/package/modem-manager/modem-manager.mk

Quoted 50 lines

index 979a80a8e9..824b9eda5a 100644

package/modem-manager/modem-manager.mk +43 -0
@@ -80,6 +80,50 @@ else
 MODEM_MANAGER_CONF_OPTS += -Dbash_completion=false
 endif
 
+ifeq ($(BR2_STATIC_LIBS),y)
+MODEM_MANAGER_CONF_OPTS += \
+       -Dplugin_generic=disabled \
+       -Dplugin_altair_lte=disabled \
+       -Dplugin_anydata=disabled \
+       -Dplugin_broadmobi=disabled \
+       -Dplugin_cinterion=disabled \
+       -Dplugin_dell=disabled \
+       -Dplugin_dlink=disabled \
+       -Dplugin_fibocom=disabled \
+       -Dplugin_foxconn=disabled \
+       -Dplugin_gosuncn=disabled \
+       -Dplugin_haier=disabled \
+       -Dplugin_huawei=disabled \
+       -Dplugin_intel=disabled \
+       -Dplugin_iridium=disabled \
+       -Dplugin_linktop=disabled \
+       -Dplugin_longcheer=disabled \
+       -Dplugin_mbm=disabled \
+       -Dplugin_motorola=disabled \
+       -Dplugin_mtk=disabled \
+       -Dplugin_nokia=disabled \
+       -Dplugin_nokia_icera=disabled \
+       -Dplugin_novatel=disabled \
+       -Dplugin_novatel_lte=disabled \
+       -Dplugin_option=disabled \
+       -Dplugin_option_hso=disabled \
+       -Dplugin_pantech=disabled \
+       -Dplugin_qcom_soc=disabled \
+       -Dplugin_quectel=disabled \
+       -Dplugin_samsung=disabled \
+       -Dplugin_sierra_legacy=disabled \
+       -Dplugin_sierra=disabled \
+       -Dplugin_simtech=disabled \
+       -Dplugin_telit=disabled \
+       -Dplugin_thuraya=disabled \
+       -Dplugin_tplink=disabled \
+       -Dplugin_ublox=disabled \
+       -Dplugin_via=disabled \
+       -Dplugin_wavecom=disabled \
+       -Dplugin_x22x=disabled \
+       -Dplugin_zte=disabled
+endif
Quoted 9 lines

package/modem-manager/modem-manager.mk else · line 126

Quoted 1 line
package/modem-manager/modem-manager.mk +1 -0
+

You can disable all plugins altogether with "-Dauto_features=disabled"; it is the recommended way to do so in MM 1.20.
But I wonder, is it only to have the build with static libs pass? MM 1.20 without plugins will not be usable at all, at least one plugin is required, so not sure how useful that is.

Thanks for your review, I'll send a v2 that disables building statically modem-manager 1.20.

Quoted 7 lines

In MM 1.22 (or git main) there is the new "-Dbuiltin_plugins=true" option that will embed all selected plugins within the ModemManager daemon binary itself.

Cheers!

Best Regards,

Fabrice

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot