dslm4515 / Musl-LFS

Linux From Scratch using Musl as Libc
GNU General Public License v3.0
167 stars 21 forks source link

File-5.34 : Build ends with error #3

Closed dslm4515 closed 5 years ago

dslm4515 commented 5 years ago

File will compile with errors:

Making all in magic
make[2]: Entering directory '/home/builder/sources/file-5.34/magic'
../src/file -C -m magic
make[2]: *** [Makefile:807: magic.mgc] Bad system call
make[2]: Leaving directory '/home/builder/sources/file-5.34/magic'
make[1]: *** [Makefile:399: all-recursive] Error 1
make[1]: Leaving directory '/home/builder/sources/file-5.34'
make: *** [Makefile:331: all] Error 2

But I can still complete build with make -k and make -k install. If i try to use the newly built file binary, it exits with Bad system call

Host system is a MLFS build (stable-2.01) and it cannot seem to build file from source... but the system installed file does work. I first thought it was the introduction of gcc-8.2.0 but host has gcc-7.3.0 and still cannot compile file

dslm4515 commented 5 years ago

Just checked the binary:

If working a file binary checks itself: $ file /usr/bin/file /usr/bin/file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-i386.so.1, stripped

But if I try it on the newly built one, I get: ELF 32-bit LSB pie executable Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-i386.so.1, BuildID[sha1]=9c6f535870f528577adb4c297ee5c179725e97fc, with debug_info, not stripped

dslm4515 commented 5 years ago

Add "--disable-libseccomp" to configure:

./configure --prefix=/cross-tools --disable-libseccomp

Now, build succeeds!