I'm cross-compiling a gentoo system for MIPSel, but was unable to compile busybox because it returned an error: error: 'UBI_DEV_NUM_AUTO' undeclared (and more related to UBI_). Reproducible: Always Steps to Reproduce: 1.Use crossdev to create a cross-compilation system for mipsel 2.Try to generate a base system with emerge-mipsel-unknown-linux-gnu system Actual Results: Fails to build Busybox Expected Results: It should compile fine I created a patch that fixes it: diff --git a/busybox-1.23.2.ebuild b/busybox-1.23.2.ebuild index 66fea44..d54cc2d 100644 --- a/busybox-1.23.2.ebuild +++ b/busybox-1.23.2.ebuild @@ -120,6 +120,12 @@ src_configure() { busybox_config_option n START_STOP_DAEMON busybox_config_option n USE_PORTABLE_CODE busybox_config_option n WERROR + busybox_config_option n UBIATTACH + busybox_config_option n UBIDETACH + busybox_config_option n UBIMKVOL + busybox_config_option n UBIRMVOL + busybox_config_option n UBIRSVOL + busybox_config_option n UBIUPDATEVOL # If these are not set and we are using a uclibc/busybox setup # all calls to system() will fail.
Created attachment 407104 [details, diff] Fixes the build when it fails due to UBIfs options
my guess is your kernel headers are too old. that define was added to the kernel headers back in 2.6.25. busybox itself requires at least 2.6.39. why don't your kernel headers have it ? miscutils/ubi_tools.c clearly does: #include <mtd/ubi-user.h>