firasuke / mussel

The shortest and fastest script to build working cross compilers targeting musl libc
ISC License
88 stars 12 forks source link

Check.sh on ubuntu jammy doesn't find libc6. #12

Closed PWills2013 closed 12 months ago

PWills2013 commented 1 year ago

Running on WLS2, check runs:

p@LT:~$ ~/mussel/check.sh 
bash:      5.1.16(1)-release
bc:        1.07.1
binutils:  Binutils for Ubuntu) 2.38
bison:     3.8.2
bzip2:     1.0.8
ccache:    4.5.1
coreutils: 8.32
diffutils: 3.8
findutils: 4.8.0
g++:       11.3.0-1ubuntu1~22.04)
gawk:      5.1.0
gcc:       11.3.0-1ubuntu1~22.04)
git:       2.34.1
glibc:     /home/pwills/mussel/check.sh: 52: /lib/libc.so.6: not found
grep:      3.7
gzip:      1.10
linux:     5.10.102.1-microsoft-standard-WSL2
lzip:      1.23
m4:        1.4.18
make:      4.3
perl:      5.34.0
rsync:     3.2.3
sed:       4.8
tar:       1.34
texinfo:   6.8
xz:        5.2.5
zstd:      v1.4.8

This happens because /lib/libc.so.6 doesn't exist on ubuntu jammy with an up to date apt install libc6.

I'm not sure if this is the cause of the mussel script completing yet having an empty toolchain/arm-linux-musleabihf/include directory. Here is the file for that run of mussel.sh.

In an attempted workaround, I symlinked /lib/x86_64-linux-gnu/libc.so.6 to /lib/libc.so.6

This sort of fixed the check, but got the same empty include dir for the target. The simple workaround for this is just to copy the files from sources/musl/musl-${version}/include into the toolchain/arm-linux-musleabihf/include directory.

Note: the target examples I'm using are for mussel.sh armv7.

firasuke commented 1 year ago

@PWills2013 is this still an issue?