Build seems to fail for TARGET = x86_64-linux-musl
brainstorm opened this issue · comments
--- config.mak.dist 2020-03-16 05:41:49.588029927 +0000
+++ config.mak 2020-03-16 05:43:37.621750064 +0000
@@ -8,7 +8,7 @@
# command line. Some examples:
# TARGET = i486-linux-musl
-# TARGET = x86_64-linux-musl
+TARGET = x86_64-linux-musl
# TARGET = arm-linux-musleabi
# TARGET = arm-linux-musleabihf
# TARGET = sh2eb-linux-muslfdpic
@@ -19,7 +19,7 @@
# To install directly to a specific location, set it here. Multiple targets
# can safely be installed in the same location. Some examples:
-# OUTPUT = /opt/cross
+OUTPUT = /usr/local/muslcross
# OUTPUT = /usr/local
# By default, latest supported release versions of musl and the toolchain
Fails while running on a 48 core machine running FROM rustembedded/cross:x86_64-unknown-linux-musl
docker container, running with gcc:
# gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# uname -a
Linux 02c39c528e71 3.10.0-693.2.2.el7.x86_64 #1 SMP Sat Sep 9 03:55:24 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
# make -j48
(...)
libtool: link: ranlib .libs/libgmp.a
libtool: link: rm -fr .libs/libgmp.lax
libtool: link: ( cd ".libs" && rm -f "libgmp.la" && ln -s "../libgmp.la" "libgmp.la" )
make[5]: Leaving directory '/root/musl-cross-make/build/local/x86_64-linux-musl/obj_gcc/gmp'
make[4]: Leaving directory '/root/musl-cross-make/build/local/x86_64-linux-musl/obj_gcc/gmp'
make[3]: Leaving directory '/root/musl-cross-make/build/local/x86_64-linux-musl/obj_gcc/gmp'
make[2]: Leaving directory '/root/musl-cross-make/build/local/x86_64-linux-musl/obj_gcc'
Makefile:222: recipe for target 'obj_gcc/gcc/.lc_built' failed
make[1]: *** [obj_gcc/gcc/.lc_built] Error 2
make[1]: Leaving directory '/root/musl-cross-make/build/local/x86_64-linux-musl'
Makefile:181: recipe for target 'all' failed
make: *** [all] Error 2
Most of the toolchain seems to be there though:
# ls /usr/local/muslcross/x86_64-linux-musl/bin/
ar as ld ld.bfd nm objcopy objdump ranlib readelf strip
# ldd /usr/local/muslcross/x86_64-linux-musl/bin/nm
linux-vdso.so.1 (0x00007ffdb5cea000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f66291aa000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6628db9000)
/lib64/ld-linux-x86-64.so.2 (0x0000560c9869e000)
we're not seeing the first "error:" in your log.
Sorry, here's the full log: error.log
Looks like:
configure: error: C++ compiler missing or inoperational
Do you not have the g++ package or c++ dev packages installed?
Thanks @richfelker and sorry to waste your time, it was definitely a PEBKAC issue... apt-get build-essential
and works a treat ;)