Prefix toolchain does not compile on macOS
Description
The prefix toolchain build fails when building libstdc++ with his error:
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
Environment info
- Operating system: macOS 10.13.6
-
Darwin Alex-PC.fritz.box 17.7.0 Darwin Kernel Version 17.7.0: Wed Oct 10 23:06:14 PDT 2018; root:xnu-4570.71.13~1/RELEASE_X86_64 x86_64
: -
rustc 1.32.0-nightly (15d770400 2018-11-06)
: -
1e90ea8ceb64972c91c9bc5145ad965681832b2f
:
Steps to reproduce
brew install coreutils findutils nasm pkg-config cmake wget
ln -s /usr/local/bin/gsha512sum /usr/local/bin/sha512sum
ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum
git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
cd redox
make pull
make prefix
Behavior
- Expected behavior: The prefix tool chain build successfully completes.
-
Actual behavior:
The build fails during the configure step of
make all-target-libstdc++-v3
inside the$(PREFIX)/gcc-install
make target with this error:
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
What it basically says it that it failed to create simple binary with the just created toolchain. It seems to be missing symbols inside the c library. This is my config.log file that is outputted by configure where you can see more details: https://pastebin.com/0QekxzDe .
This is an extract:
configure:3973: /Users/alex/Developer/redox/prefix/gcc-build/./gcc/xgcc -B/Users/alex/Developer/redox/prefix/gcc-build/./gcc/ -B/Users/alex/Developer/redox/prefix/gcc-install/x86_64-unknown-redox/bin/ -B/Users/alex/Developer/redox/prefix/gcc-install/x86_64-unknown-redox/lib/ -isystem /Users/alex/Developer/redox/prefix/gcc-install/x86_64-unknown-redox/include -isystem /Users/alex/Developer/redox/prefix/gcc-install/x86_64-unknown-redox/sys-include -o conftest -g -O2 conftest.c >&5
/Users/alex/Developer/redox/prefix/relibc-install/usr/lib/libc.a(c-fc39f1e1d52db6b7.c.efb21g47-cgu.5.rcgu.o): In function `aligned_alloc':
c.efb21g47-cgu.5:(.text.aligned_alloc+0x16): undefined reference to `dlmemalign'
/Users/alex/Developer/redox/prefix/relibc-install/usr/lib/libc.a(c-fc39f1e1d52db6b7.c.efb21g47-cgu.5.rcgu.o): In function `calloc':
c.efb21g47-cgu.5:(.text.calloc+0x12): undefined reference to `dlmalloc'
/Users/alex/Developer/redox/prefix/relibc-install/usr/lib/libc.a(c-fc39f1e1d52db6b7.c.efb21g47-cgu.5.rcgu.o): In function `free':
c.efb21g47-cgu.5:(.text.free+0x6): undefined reference to `dlfree'
/Users/alex/Developer/redox/prefix/relibc-install/usr/lib/libc.a(c-fc39f1e1d52db6b7.c.efb21g47-cgu.5.rcgu.o): In function `malloc':
c.efb21g47-cgu.5:(.text.malloc+0x6): undefined reference to `dlmalloc'
/Users/alex/Developer/redox/prefix/relibc-install/usr/lib/libc.a(c-fc39f1e1d52db6b7.c.efb21g47-cgu.5.rcgu.o): In function `memalign':
c.efb21g47-cgu.5:(.text.memalign+0x6): undefined reference to `dlmemalign'
- Proposed solution: I am puzzled what is the problem here. Must I compile the initial stage1 toolchain with another compiler than clang?