Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/qrtr: fix static build
@ 2026-10-21  8:47 Igor Opaniuk via buildroot
  2026-10-21 18:53 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Igor Opaniuk via buildroot @ 2026-10-21  8:47 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Fiona Klute, Thomas Petazzoni, Sumit Garg,
	Jorge Ramirez-Ortiz, Igor Opaniuk

qrtr 1.2 declares libqrtr with shared_library(), so it builds a shared
library even when Buildroot asks meson for static ones only
(-Ddefault_library=static). With BR2_STATIC_LIBS=y the tools are then
linked with -static against libqrtr.so, which fails:

ld: attempted static link of dynamic object `lib/libqrtr.so.1.2'

Backport the upstream commit that declares it with library(), so
default_library decides. It is not part of a qrtr release yet.

Fixes:
https://autobuild.buildroot.org/results/d5f669f99f72ee68433bc8a1b1197594f46e8882

Fixes: 81bec84bfce986a49b799384c3d0c540fda5367c ("package/qrtr: new package")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
---
 ...ib-meson.build-Don-t-force-shared-libqrtr.patch | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/package/qrtr/0001-lib-meson.build-Don-t-force-shared-libqrtr.patch b/package/qrtr/0001-lib-meson.build-Don-t-force-shared-libqrtr.patch
new file mode 100644
index 0000000000..05cf46faf7
--- /dev/null
+++ b/package/qrtr/0001-lib-meson.build-Don-t-force-shared-libqrtr.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Luca Weiss <luca.weiss@fairphone.com>
+Date: Thu, 16 Apr 2026 09:08:41 +0200
+Subject: [PATCH] lib: meson.build: Don't force shared libqrtr
+
+Allow the build system to build a static version of libqrtr when the
+user requests it.
+
+As per meson manual:
+> You should use this [library()] instead of shared_library(),
+> static_library() or both_libraries() most of the time.
+
+Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
+Upstream: https://github.com/linux-msm/qrtr/commit/f83bb6c1a87a4a030e36796b4ca9240b0321e15d
+---
+ lib/meson.build | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/meson.build b/lib/meson.build
+index aab46cb..faaf7d1 100644
+--- a/lib/meson.build
++++ b/lib/meson.build
+@@ -3,10 +3,10 @@
+ pkg = import('pkgconfig')
+ 
+ libqrtr_srcs = ['logging.c', 'qmi.c', 'qrtr.c']
+-libqrtr = shared_library('qrtr',
+-                         libqrtr_srcs,
+-                         version: meson.project_version(),
+-                         include_directories : inc,
+-                         install: true)
++libqrtr = library('qrtr',
++                  libqrtr_srcs,
++                  version: meson.project_version(),
++                  include_directories : inc,
++                  install: true)
+ 
+ pkg.generate(libqrtr)
+-- 
+2.53.0
+

---
base-commit: 4b65f6274e5e70e7101277a6580929abb39e8ef0
change-id: 20261021-b4-qrtr-static-462f5273a5f9

Best regards,
--  
Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-21 18:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21  8:47 [Buildroot] [PATCH] package/qrtr: fix static build Igor Opaniuk via buildroot
2026-10-21 18:53 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox