crypt.h: No such file or directory

Andre McCurdy armccurdy at gmail.com
Sat Jul 13 16:52:05 UTC 2019


On Fri, Jul 12, 2019 at 3:37 PM Xabier Oneca -- xOneca <xoneca at gmail.com> wrote:
>
> Hello Doug,
>
> > libbb/pw_encrypt.c:9:10: fatal error: crypt.h: No such file or directory
> >  #include <crypt.h>
> >           ^~~~~~~~~
> > compilation terminated.
> > make[1]: *** [libbb/pw_encrypt.o] Error 1
> > make: *** [libbb] Error 2
> >
> > CROSS_COMPILER_PREFIX = arm-poky-linux-gnueabi-
> > SYSROOT = /opt/arm/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi
> > EXTRA_CFLAGS = -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7
> >
> > Indeed, there is no crypt.h in the include path. I even tried turning on USE_PORTABLE_CODE to no avail.
>
> I have crypt.h in /usr/include, provided by libxcrypt-devel package.
> That package name is from OpenSUSE, not sure how it's named in Yocto.

That header used to be part of glibc but got moved into a separate
library (libxcrypt) in recent versions. Maybe try adding libxcrypt to
your Yocto toolchain?

Actually it looks like Busybox is a little buggy too... the #include
<crypt.h> in pw_encrypt.c should probably by guarded by #if
!ENABLE_USE_BB_CRYPT, which would remove the dependency on a toolchain
crypt.h if the Busybox internal crypt support is being used.


More information about the busybox mailing list