package/mpd: disable expat explicitly unless target package exists
PATCH 1/1 package/mpd: disable expat explicitly unless target package exists
Background:
During configuration, mpd tries to determine the availability of optional dependencies using (host) pkgconfig and CMake. If host and target architecture are identical, it locates host-libexpat (CMake dependency) and tries to incorporate it into the build process. The link step fails subsequently, because some dependencies of host binaries come from the build machine, and are not present on the target.
This results in the following build error:/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'
The link step fails, because libexpat was built against the build machine's C library.
The optional expat dependency is disabled, unless the expat target package is selected. This is in line with BR2_PACKAGE_MPD_UPNP_* handling logic, which selects the target package and needs to enable the expat option. The grey area of expat present on the target for other reasons, but not explicitly needed for mpd, is accepted to avoid making the logic too complicated.
--- package/mpd/mpd.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/mpd/mpd.mk +5 -0
@@ -21,6 +21,11 @@ MPD_CONF_OPTS = \ -Dpipewire=disabled \ -Dsnapcast=false +# Disable expat explicitly, unless the target package is selected +ifneq ($(BR2_PACKAGE_EXPAT),y) +MPD_CONF_OPTS += -Dexpat=disabled +endif + # Zeroconf support depends on libdns_sd from avahi. ifeq ($(BR2_PACKAGE_MPD_AVAHI_SUPPORT),y) MPD_DEPENDENCIES += avahi
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
I marked this patch as obsolete. A variant of this failure has come up, and this approach is not feasible anymore.
Kind regards,
Andreas
Quoted 49 lines · Andreas Ziegler
Background:
During configuration, mpd tries to determine the availability of optional dependencies using (host) pkgconfig and CMake. If host and target architecture are identical, it locates host-libexpat (CMake dependency) and tries to incorporate it into the build process. The link step fails subsequently, because
some dependencies of host binaries come from the build machine, and are not present on the target.This results in the following build error:
/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'The link step fails, because libexpat was built against the build machine's C library.
The optional expat dependency is disabled, unless the expat target package is selected. This is in line with BR2_PACKAGE_MPD_UPNP_* handling logic, which selects the target package and needs to enable the expat option. The grey area of expat present on the target for other reasons, but not explicitly needed for mpd, is accepted to avoid making the logic too complicated.
Signed-off-by Andreas Ziegler <[email protected]>--- package/mpd/mpd.mk | 5 +++++ 1 file changed, 5 insertions(+)package/mpd/mpd.mk +5
-1@@ -21,6 +21,11 @@ MPD_CONF_OPTS = \ -Dpipewire=disabled \ -Dsnapcast=false +# Disable expat explicitly, unless the target package is selected +ifneq ($(BR2_PACKAGE_EXPAT),y) +MPD_CONF_OPTS += -Dexpat=disabled +endif + # Zeroconf support depends on libdns_sd from avahi. ifeq ($(BR2_PACKAGE_MPD_AVAHI_SUPPORT),y) MPD_DEPENDENCIES += avahi --
Quoted 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot