New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Solved) x86_64-linux-musl cannot compile because of wrong c++ std lib #152
Comments
Hello guys, after a long time of hard work. Using ubuntu 23.04 for building may work. Steps:
your
Installing llvm & clang is not recommended, as zig-bootstrap contains the src itself
The next steps require your working directory changed to zig-bootstrap-0.11.0-dev.3334
I recommend to redirect all the outputs and errors to a log file, because the whole building job may cost several hours depending on your hardware, you may go to drink coffee and back a moment later. If the building failed somewhere, your terminal will display tons of errors which makes debugging hard. |
Although my issue solved, I prefer to keep this issue open until official docs come out the build steps in detail. I added Solved in the title so anyone who quering may see this. |
Issue #17018 as Zig bootstrapping bug should be fixed with ziglang/zig@3cf7158. Suggestion to close or provide further information. |
Sorry to reply too late, since it's solved, I will try it later, thks |
env:
centos 8 + gcc 12 / clang 14(with no libc++ installed)
build cmd
(use build.log because the error message is too large to scroll on my terminal/screen)
the building of LLVM libs is ok but after that it complained:
(rootdir is /root/work/zig-build/zig-bootstrap)
As I see, all the undefined symbol is gcc internal defined in libstdc++ while clang/zig's libc++ doesn't have.
Seems that the LLVM libs are compiled using libstdc++ headers but will be linked by libc++ in 'Building stage3'
When I try to force all to use libstdc++ ( I know it is not recommended) I saw zig force using libc++ in the code.
So I doubt whether the build script ever worked.
If true, please give some details for how to build the dep env(I guess a custom clang with libc++ is used).
If not, can anyone help to figure out how to make it work?
The text was updated successfully, but these errors were encountered: