litex-hub / linux-on-litex-rocket

Run 64-bit Linux on LiteX + RocketChip
BSD 2-Clause "Simplified" License
181 stars 18 forks source link

build busybox : fatal error:crypt.h No such file #38

Closed LYM-cat closed 1 month ago

LYM-cat commented 9 months ago

Hi,I I followed the readme to building busybox, but said I was missing this library , what should I do? image image

LYM-cat commented 9 months ago

I copy the from /uer/include to /opt/riscv64-linux/sysroot/usr/include 。Then make it ,show undefined reference to crypt'undefined reference tocrypt' undefined reference to `crypt' where should I wirte it? image

gsomlo commented 9 months ago

I think both the crypt.h header file and whatever library it represents (probably libcrypt.so.*) should come as part of your cross-compiler toolchain, e.g. http://www.contrib.andrew.cmu.edu/~somlo/BTCP/RISCV-toolchain.tar.xz

(see how to install it in the prerequisites section of the readme).

Copying from elsewhere on your computer to wherever the cross-compiled busybox is looking for it is unlikely to be very useful.

HTH, --Gabriel

gsomlo commented 1 month ago

glibc removed crypt, so it's no longer part of the cross-compiler toolchain.

The new/updated (as of commit b9b92a5bf79334f100ad808df7827f1f326307c1) has an updated busybox config file that works around this issue.

Closing, please comment/reopen if that doesn't take care of it.