chung-leong / zigar

Enable the use of Zig code in JavaScript project
https://chung-leong.github.io/zigar/
MIT License
177 stars 2 forks source link

Use of fread() lead to compile error on 64-bit Windows when optimize = ReleaseSafe #419

Open chung-leong opened 2 months ago

chung-leong commented 2 months ago
install
+- WriteFile
   +- zig build-lib call-fread ReleaseSafe x86_64-windows 1 errors
error: lld-link: undefined symbol: __mingw_call_fread
    note: referenced by C:\Users\Chung Leong\zigar\zigar-compiler\zig\exporter.zig:502
    note:               C:\Users\CHUNGL~1\AppData\Local\Temp\zigar-build\call-fread-317d5bfc\.zig-cache\o\77f1aa5234a7d36b63b890d6db2e2a0c\call-fread.dll.obj:(exporter.createThunk__anon_8781.ns_regular.invokeFunction)
error: the following command failed with 1 compilation errors:
C:\Users\Chung Leong\.zvm\0.13.0\zig.exe build-lib -OReleaseSafe -target x86_64-windows -mcpu baseline --dep module -Mroot=C:\Users\Chung Leong\zigar\zigar-compiler\zig\stub-c.zig -I C:\Users\Chung Leong\zigar\zigar-compiler\test\integration\function-calling -Mmodule=C:\Users\Chung Leong\zigar\zigar-compiler\test\integration\function-calling\call-fread.zig -lc --cache-dir C:\Users\CHUNGL~1\AppData\Local\Temp\zigar-build\call-fread-317d5bfc\.zig-cache --global-cache-dir C:\Users\Chung Leong\AppData\Local\zig --name call-fread -dynamic --listen=-
Build Summary: 0/3 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
+- WriteFile transitive failure
   +- zig build-lib call-fread ReleaseSafe x86_64-windows 1 errors
   +- zig build-lib call-fread ReleaseSafe x86_64-windows (reused)
error: the following build command failed with exit code 1:
C:\Users\CHUNGL~1\AppData\Local\Temp\zigar-build\call-fread-317d5bfc\.zig-cache\o\718dd4753efae1853b8f7a8babc57d24\build.exe C:\Users\Chung Leong\.zvm\0.13.0\zig.exe C:\Users\CHUNGL~1\AppData\Local\Temp\zigar-build\call-fread-317d5bfc C:\Users\CHUNGL~1\AppData\Local\Temp\zigar-build\call-fread-317d5bfc\.zig-cache C:\Users\Chung Leong\AppData\Local\zig --seed 0xf641cc2b -Z84abd6d9050203ce -Doptimize=ReleaseSafe -Dtarget=x86_64-windows