On Tue, Jan 28, 2020 at 8:07 PM Andre McCurdy <[email protected]> wrote: > > On Tue, Jan 28, 2020 at 4:48 AM Alex Kiernan <[email protected]> wrote: > > > > Let me have a look at that - what got me here was trying to get a > > static busybox so I could OSTree's tests to pass, which all turned out > > to be way harder than I expected; this was just one of the things I > > tripped over. > > Busybox shouldn't need to link with libxcrypt if USE_BB_CRYPT is > enabled (which it is in OE's default Busybox defconfig). > > There's a long standing bug in Busybox whereby crypt.h gets included > unconditionally (instead of being guarded by #if ENABLE_USE_BB_CRYPT > etc) so the Busybox recipe still needs to depend on virtual/crypt but > it's only a compile time dependency.
It looks like that might've been fixed: 4767a5375e66 libbb: include <crypt.h> only if necessary If I drop virtual/crypt, I still get the same link time failure to find crypt, which I think we're getting because this test https://git.busybox.net/busybox/tree/Makefile.flags#n149 passes: CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c) Not quite sure how that can pass tbh... This ugly hack avoids needing a static crypt: diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 1a82f23b0f3a..7335a846038f 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -18,7 +18,7 @@ BUSYBOX_SPLIT_SUID ?= "1" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" -EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'" +EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}' CRYPT_AVAILABLE=n" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" Not sure how to get that integrated nicely... -- Alex Kiernan -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
