Closed kassane closed 10 months ago
cause: --mtriple=x86_64-windows-gnu
on commands (not changing windows abi)
https://github.com/kassane/sokol-d/blob/1b0c50b0150f40ed63242db19d6f9c35490c3fd2/build.zig#L187-L189
New targets commands from zig toolchain :roll_eyes:
new target structures: https://github.com/ziglang/zig/blob/42389cb9c58cfe71db055142eb7b8cc15193ddf9/lib/std/Build.zig#L2238-L2245
/// A pair of target query and fully resolved target.
/// This type is generally required by build system API that need to be given a
/// target. The query is kept because the Zig toolchain needs to know which parts
/// of the target are "native". This can apply to the CPU, the OS, or even the ABI.
pub const ResolvedTarget = struct {
query: Target.Query,
result: Target,
};
After, try fix windows target...
lld-link: warning: sokol.lib(sokol_log.obj): locally defined symbol imported: __acrt_iob_func (defined in libucrtd.lib(_file.obj)) [LNK4217]
lld-link: warning: sokol.lib(sokol_app.obj): locally defined symbol imported: __acrt_iob_func (defined in libucrtd.lib(_file.obj)) [LNK4217]
lld-link: warning: sokol.lib(sokol_app.obj): locally defined symbol imported: freopen_s (defined in libucrtd.lib(freopen.obj)) [LNK4217]
lld-link: error: undefined symbol: __declspec(dllimport) _assert
>>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:11186
>>> sokol.lib(sokol_app.obj):(sapp_run)
>>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:2874
>>> sokol.lib(sokol_app.obj):(_sapp_clear)
>>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:11288
>>> sokol.lib(sokol_app.obj):(sapp_egl_get_display)
>>> referenced 793 more times
lld-link: error: undefined symbol: __mingw_vsnprintf
>>> referenced by C:\hostedtoolcache\windows\zig\master\x64\lib\libc\include\any-windows-any\stdio.h:469
>>> sokol.lib(sokol_debugtext.obj):(vsnprintf)
[...]
lld-link: error: undefined symbol: __declspec(dllimport) freopen_s
>>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:7651
>>> sokol.lib(sokol_app.obj):(_sapp_win32_init_console)
>>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:7653
>>> sokol.lib(sokol_app.obj):(_sapp_win32_init_console)
New errors
lld-link: warning: sokol.lib(sokol_log.obj): locally defined symbol imported: __acrt_iob_func (defined in libucrtd.lib(_file.obj)) [LNK4217] lld-link: warning: sokol.lib(sokol_app.obj): locally defined symbol imported: __acrt_iob_func (defined in libucrtd.lib(_file.obj)) [LNK4217] lld-link: warning: sokol.lib(sokol_app.obj): locally defined symbol imported: freopen_s (defined in libucrtd.lib(freopen.obj)) [LNK4217] lld-link: error: undefined symbol: __declspec(dllimport) _assert >>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:11186 >>> sokol.lib(sokol_app.obj):(sapp_run) >>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:2874 >>> sokol.lib(sokol_app.obj):(_sapp_clear) >>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:11288 >>> sokol.lib(sokol_app.obj):(sapp_egl_get_display) >>> referenced 793 more times lld-link: error: undefined symbol: __mingw_vsnprintf >>> referenced by C:\hostedtoolcache\windows\zig\master\x64\lib\libc\include\any-windows-any\stdio.h:469 >>> sokol.lib(sokol_debugtext.obj):(vsnprintf) [...] lld-link: error: undefined symbol: __declspec(dllimport) freopen_s >>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:7651 >>> sokol.lib(sokol_app.obj):(_sapp_win32_init_console) >>> referenced by D:\a\sokol-d\sokol-d\src\sokol\c\sokol_app.h:7653 >>> sokol.lib(sokol_app.obj):(_sapp_win32_init_console)
https://github.com/kassane/sokol-d/actions/runs/7433191327/job/20225900501#step:6:15
debug flags: zig cc /NOLOGO /DEBUG /OPT:REF /OPT:NOICF /DEFAULTLIB:libcmt /DEFAULTLIB:libvcruntime /OUT:D:\a\sokol-d\sokol-d\zig-out\bin\debugtext_print.exe D:\a\sokol-d\sokol-d\zig-cache\o\8441520852fd3bf30fcee699975c9b06\debugtext_print.obj C:/hostedtoolcache/windows/dc/ldc2-530d41be/x64/ldc2-530d41be-windows-multilib/bin/../lib64\ldc_rt.builtins.lib /LIBPATH:D:\a\sokol-d\sokol-d\zig-out\lib sokol.lib kernel32.lib user32.lib gdi32.lib ole32.lib d3d11.lib dxgi.lib /LIBPATH:C:/hostedtoolcache/windows/dc/ldc2-530d41be/x64/ldc2-530d41be-windows-multilib/bin/../lib64 kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib oldnames.lib legacy_stdio_definitions.lib -target native-native-msvc
lld-link: warning: sokol.lib(sokol_log.obj): locally defined symbol imported: __acrt_iob_func (defined in libucrtd.lib(_file.obj)) [LNK4217]
zigcc
wrapper had used -target native-native-msvc
!!
Need zig downgrade? :roll_eyes:
zig (v0.12.0/master) changes broken windows-build
commit: https://github.com/kassane/sokol-d/commit/c8f10530339fcd16cee7e927f7177255877f9f06 | https://github.com/kassane/sokol-d/actions/runs/7425932473/job/20208599249#step:6:1
previous (no error): https://github.com/kassane/sokol-d/actions/runs/7401550409/job/20137535727#step:6:1 (
0.12.0-dev.1879+e19219fa0
)Errors
verbose output: https://github.com/kassane/sokol-d/actions/runs/7432883556/job/20225206794#step:6:40
BetterC
_D4core8internal5array11duplication__T8_dupCtfeTxaTaZQpFNaNbNiNfMAxaZAa
:pure nothrow @nogc @trusted immutable(char)[] core.internal.array.duplication._dup!(char, immutable(char))._dup(scope char[])
verbose output: https://github.com/kassane/sokol-d/actions/runs/7432883556/job/20225206794#step:6:119