Skip to content
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

ztracy build failed #601

Closed
Luna1996 opened this issue May 20, 2024 · 3 comments
Closed

ztracy build failed #601

Luna1996 opened this issue May 20, 2024 · 3 comments
Labels
bug Something isn't working incoming Issue relating to Zig changes ahead of our pinned version
Milestone

Comments

@Luna1996
Copy link

zig build test
test
└─ run ztracy-tests
└─ zig test ztracy-tests Debug native
└─ zig build-lib tracy Debug native 2 errors
:12:9: error: '_WIN32_WINNT' macro redefined
:496:2: note: in file included from :496:
:9:9: note: previous definition is here
C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev\libs\ztracy\libs\tracy/client/TracyProfiler.cpp:285:5: error: use of undeclared identifier '__cpuidex'
__cpuidex( (int*)regs, leaf, 0 );
^
C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev\libs\ztracy\libs\tracy\TracyClient.cpp:23:10: note: in file included from C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev\libs\ztracy\libs\tracy\TracyClient.cpp:23:
#include "client/TracyProfiler.cpp"
^
error: the following command failed with 2 compilation errors:
C:\Users\23209\AppData\Roaming\Code\User\globalStorage\ziglang.vscode-zig\zig_install\zig.exe build-lib -cflags -DTRACY_ENABLE -D_WIN32_WINNT=0x601 -fno-sanitize=undefined -- C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev\libs\ztracy\libs\tracy\TracyClient.cpp -lws2_32 -ldbghelp -ODebug -I C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev\libs\ztracy\libs\tracy\tracy -Mroot -lc++ -lc --cache-dir C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev\zig-cache --global-cache-dir C:\Users\23209\AppData\Local\zig --name tracy -static --listen=-
Build Summary: 63/67 steps succeeded; 1 failed; 176/177 tests passed; 1 skipped (disable with --summary none)
test transitive failure
└─ run ztracy-tests transitive failure
└─ zig test ztracy-tests Debug native transitive failure
└─ zig build-lib tracy Debug native 2 errors
error: the following build command failed with exit code 1:
C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev\zig-cache\o\cd78262eec12716aff0934830dacbd6d\build.exe C:\Users\23209\AppData\Roaming\Code\User\globalStorage\ziglang.vscode-zig\zig_install\zig.exe C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev C:\Users\23209\Documents\Repo\repo.zig\zig-gamedev\zig-cache C:\Users\23209\AppData\Local\zig --seed 0x619d1193 -Zd50b4aed71314833 test

@hazeycode hazeycode added bug Something isn't working incoming Issue relating to Zig changes ahead of our pinned version labels May 20, 2024
@hazeycode
Copy link
Member

Repro'd with Zig 0.13.0-dev.211+6a65561e3

@hazeycode hazeycode added this to the 0.6.0 milestone May 20, 2024
@a-day-old-bagel
Copy link
Contributor

a-day-old-bagel commented May 27, 2024

I can also reproduce, and I can solve the issue (for my machine) by commenting out these lines

Obviously this probably isn't the actual solution, since it will probably break someone else's build depending on their environment. I'm just providing this as a hint about where the problem is coming from.

I'm on 0.13.0-dev.267+793f820b3

@hazeycode
Copy link
Member

I think the fix for the macro redefinition error is to not define it: 2f699d7

hazeycode added a commit that referenced this issue Jun 3, 2024
This should probably be applied in the upstream Tracy repo

Closes #601
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working incoming Issue relating to Zig changes ahead of our pinned version
Projects
None yet
Development

No branches or pull requests

3 participants