MINGW-packages: mingw-w64-x86_64-zig: `zig` fails to start, `libLLVM.dll` is missing
I updated MSYS2 an hour ago, and installed zig
package:
$ pacman -S mingw64/mingw-w64-x86_64-zig
...
$ pacman -Q mingw-w64-x86_64-zig
mingw-w64-x86_64-zig 0.7.1-2
$ zig
bash: zig: command not found
$ PATH=$PATH:/mingw64/bin
$ zig
C:/msys64/mingw64/bin/zig.exe: error while loading shared libraries: libwinpthread-1.dll: cannot open shared object file: No such file or directory
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 18 (7 by maintainers)
master
branch of Zig depends on LLVM 14, however I am actively working to merge thellvm15
branch of Zig as soon as upgrade issues are solved. This will be done within a few days.Upcoming Zig version (0.10.0) has a release date of 2022-11-01 and will link against LLVM 15.
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:
posix_spawn
instead offork
.A lot of stuff here!
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
__emutls_get_address
errors@sskras This case the bug is only in zig because it has no link to libgcc or compiler-rt or any mingw-specific lib. Perhaps the only viable alternative would be to try compiling with the official zig build itself instead of mingw’s clang/gcc. Because the old-version available in msys2/mingw is broken to compile under windows-gnu.
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.