-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
mingw-w64-x86_64-zig: zig
fails to start, libLLVM.dll
is missing
#10596
Comments
Investigation steps:
The similarly named DLL seems to be around:
Symlinking the missing name to one I found results in exception and the message box during
|
#9791 - zig was not rebuilt against LLVM 13, because it wasn't possible to do so. |
Yes, but now the stable version is 0.9.0. Which seems to use LLVM 13 already:
|
Hi @sskras So far I stopped updating the mingw package waiting to fix zig0 and its high memory consumption during build causing the error process to stop in some cases. And also because there was a bug during the binary linking generating conflict between mingw/msvc. [ 98%] Linking CXX executable zig0.exe
D:/M/msys64/mingw64/lib\liblldELF.a(InputFiles.cpp.obj): duplicate section `.rdata$_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits[_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits]' has different size
D:/M/msys64/mingw64/lib\liblldELF.a(InputSection.cpp.obj): duplicate section `.rdata$_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits[_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits]' has different size
D:/M/msys64/mingw64/lib\liblldCOFF.a(InputFiles.cpp.obj): duplicate section `.rdata$_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits[_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits]' has different size
D:/M/msys64/mingw64/lib\liblldWasm.a(Writer.cpp.obj): duplicate section `.rdata$_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits[_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits]' has different size
D:/M/msys64/mingw64/lib\liblldWasm.a(WriterUtils.cpp.obj): duplicate section `.rdata$_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits[_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits]' has different size
[ 98%] Built target zig0
[ 99%] Building self-hosted component C:/_/mingw-w64-zig/src/zig-0.9.0/build-x86_64-w64-mingw32/zig1.o
allocation failed
make[2]: *** [CMakeFiles/zig.dir/build.make:347: zig1.o] Error 3 |
Thanks for the pointer. I guess one way is just to sit and wait, as @andrewrk commented on Oct 4, 2020 in ziglang/zig/issues/6485:
But I guess I will also try rebuilding the PKGBUILD file and see myself. |
OK, I did it just now, same errors and then some more:
@kassane, what do you think: is this bug in Zig itself, in the used gcc suite (linker or compiler) or maybe in the upstream LLVM code? |
@sskras |
The new undefined references are due to us needing to disable some targets in LLVM 13 to avoid hitting an intrinsic limit of 65535 exported symbols from a DLL. Zig does not support building against an LLVM that was not built with all targets enabled. I tried hacking out targets in msys2/MINGW-packages-dev#16 but still hit the out-of-memory or |
Thank you both. @jeremyd2019, as you suggested in #8272, should we try adding Not sure what else would be needed, like adding |
By the way, in https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html Andrew says: Zig's compiler-rt is not yet complete. However, completing it is a prerequisite for releasing Zig version 1.0.0. |
@kassane: thanks for the pointers. Looks like their progress with missing compiler-rt functions is blocked by:
A lot of stuff here! |
@jeremyd2019 commented on Jan 22:
Wow, that's a big discovery to me! The search query for future reference:
Without knowing what symbol names (related to any target) make it into the export table, this sounds fair enough. But after reading pages from the search above, my guess is that maybe the export table is being filled with all possible symbols from particular lib, not just the necessary ones. Eg: This leaves me interested in whether
Thanks. Should we transfer further investigation and discussion here? |
#12550 might help here |
I guess the next step would be make a clang13/llvm13 or 14 package like in Arch: https://archlinux.org/packages/community/x86_64/zig/ We would need something similar for python-llvmlite too |
@lazka commented 20 days ago:
I guess so. Tried rebuilding Zig-0.9.1, it fails for LLVM being too new:
|
FWIW upcoming Zig version will support LLVM 14 but we are moving to LLVM 15 already... |
Upcoming Zig version (0.10.0) has a release date of 2022-11-01 and will link against LLVM 15. |
Cool, feel free to ping me if you have problems with mingw-w64 targets. |
I updated MSYS2 an hour ago, and installed
zig
package:The text was updated successfully, but these errors were encountered: