Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/mpd: explicitly disable features to avoid collision with host packages
@ 2022-03-31 13:22 Andreas Ziegler
  2022-04-04 17:38 ` Arnout Vandecappelle
  0 siblings, 1 reply; 20+ messages in thread
From: Andreas Ziegler @ 2022-03-31 13:22 UTC (permalink / raw)
  To: buildroot; +Cc: Andreas Ziegler, Jörg Krause

Background
During configuration, the meson build system tries to determine the 
availability of optional dependencies using (host) pkgconfig and cmake in that
order. If a library does not exist on the target, pkg-config will fail, but
cmake sometimes finds and reports libraries that exist as host packages. This
has been observed for host-expat (cmake dependency) and host-zlib. The link 
step subsequently fails, because necessary files are not present in the target 
architecture.

Unconditionally disable optional features often found in host binaries and
modify the menu selection processing in mpd.mk to re-enable them where
necessary. Currently this concerns expat and zlib only. 

This fixes the following build errors:

[expat]
/home/data/buildroot.x86_64/host/lib/gcc/x86_64-buildroot-linux-uclibc/11.2.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: warning: libc.so.6, needed by /home/data/buildroot.x86_64/host/lib/libexpat.so.1.8.7, not found (try using -rpath or -rpath-link)
/home/data/buildroot.x86_64/host/lib/gcc/x86_64-buildroot-linux-uclibc/11.2.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: /home/data/buildroot.x86_64/host/lib/libexpat.so.1.8.7: undefined reference to `__errno_location@GLIBC_2.2.5'

[zlib]
http://autobuild.buildroot.net/results/f0a/f0a9e719114f19dc9d20622ed85dd4f8e968c20f/

Signed-off-by: Andreas Ziegler <br015@umbiko.net>
---
 package/mpd/mpd.mk | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/package/mpd/mpd.mk b/package/mpd/mpd.mk
index 12da36098f..4e67c9428c 100644
--- a/package/mpd/mpd.mk
+++ b/package/mpd/mpd.mk
@@ -14,6 +14,7 @@ MPD_LICENSE_FILES = COPYING
 # these refer to the FreeBSD PPP daemon
 MPD_IGNORE_CVES = CVE-2020-7465 CVE-2020-7466
 MPD_SELINUX_MODULES = mpd
+# These features are either unwanted or not selectable via the Buildroot menu
 MPD_CONF_OPTS = \
 	-Daudiofile=disabled \
 	-Ddocumentation=disabled \
@@ -21,6 +22,12 @@ MPD_CONF_OPTS = \
 	-Dpipewire=disabled \
 	-Dsnapcast=false
 
+# Explicitly disable features where meson's dependency detection picks up host
+# libraries. These settings can be overridden through menu options later
+MPD_CONF_OPTS += \
+	-Dexpat=disabled \
+	-Dzlib=disabled
+
 # Zeroconf support depends on libdns_sd from avahi.
 ifeq ($(BR2_PACKAGE_MPD_AVAHI_SUPPORT),y)
 MPD_DEPENDENCIES += avahi
@@ -300,11 +307,11 @@ ifeq ($(BR2_PACKAGE_MPD_UPNP_PUPNP),y)
 MPD_DEPENDENCIES += \
 	expat \
 	libupnp
-MPD_CONF_OPTS += -Dupnp=pupnp
+MPD_CONF_OPTS += -Dupnp=pupnp -Dexpat=enabled
 else ifeq ($(BR2_PACKAGE_MPD_UPNP_NPUPNP),y)
 MPD_DEPENDENCIES += \
 	libnpupnp
-MPD_CONF_OPTS += -Dupnp=npupnp
+MPD_CONF_OPTS += -Dupnp=npupnp -Dexpat=enabled
 else ifeq ($(BR2_PACKAGE_MPD_UPNP_DISABLED),y)
 MPD_CONF_OPTS += -Dupnp=disabled
 endif
-- 
2.34.1

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

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

end of thread, other threads:[~2023-09-11  7:23 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-31 13:22 [Buildroot] [PATCH 1/1] package/mpd: explicitly disable features to avoid collision with host packages Andreas Ziegler
2022-04-04 17:38 ` Arnout Vandecappelle
2022-04-08 13:22   ` Andreas Ziegler
2022-04-09 15:41     ` [Buildroot] User-visible Config.in feature sub-options [was: Re: [PATCH 1/1] package/mpd: explicitly disable features to avoid collision with host packages] Arnout Vandecappelle
2022-04-09 16:09       ` Yann E. MORIN
2022-04-10  5:44         ` Andreas Ziegler
2022-04-21 14:45         ` Andreas Ziegler
2022-10-05  9:10         ` [Buildroot] [PATCH v2 0/4] User-visible Config.in feature sub-options Andreas Ziegler
2022-10-05  9:10         ` [Buildroot] [PATCH v2 1/4] package/mpd: fix reversed logic in tcp disable Andreas Ziegler
2023-08-06 19:42           ` Thomas Petazzoni via buildroot
2023-09-11  7:22             ` Peter Korsgaard
2022-10-05  9:10         ` [Buildroot] [PATCH v2 2/4] package/mpd: add/enhance (kconfig + code) comments Andreas Ziegler
2023-08-06 19:45           ` Thomas Petazzoni via buildroot
2023-08-08  8:14             ` Andreas Ziegler
2022-10-05  9:10         ` [Buildroot] [PATCH v2 3/4] package/mpd: introduce id3tag feature dependency Andreas Ziegler
2023-08-06 19:46           ` Thomas Petazzoni via buildroot
2023-09-11  7:23           ` Peter Korsgaard
2022-10-05  9:10         ` [Buildroot] [PATCH v2 4/4] package/mpd: introduce sub-options for expat and yajl Andreas Ziegler
2023-08-06 20:45           ` Thomas Petazzoni via buildroot
2023-09-11  7:23             ` Peter Korsgaard

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