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

build problem #27

Closed
donbright opened this issue Mar 8, 2020 · 3 comments
Closed

build problem #27

donbright opened this issue Mar 8, 2020 · 3 comments

Comments

@donbright
Copy link

don@oysters:~/src/tetris$ fg
zig build play
Build Dependencies...unwind [2] Compile C Objects [5/8] UnwindLevel1-gcc-ext.c..Build Dependencies...unwind [2] Compile C Objects [7/8] UnwindRegistersRestore.SBuild Dependencies...at_quick_exit [2] Compile C Objects [1/1] at_quick_exit.c..Build Dependencies...pthread_atfork [2] Compile C Objects [1/1] pthread_atfork.cBuild Dependencies...stack_chk_fail_local [2] Compile C Objects [1/1] stack_chk_Error: u8@7ffcfe884080

/home/don/src/tetris/src/main.zig:22:10: 0x22989f in errorCallback (tetris)
    panic("Error: {}\n", .{description});
         ^
The following command terminated unexpectedly:
cd /home/don/src/tetris && /home/don/src/tetris/zig-cache/bin/tetris 

Build failed. The following command failed:
/home/don/src/tetris/zig-cache/o/T43ZyUZTaP-cR0Ny_GS_98VEC-nkbfdu0f2TKyFcPbhrbS2oaCqceqlkSRHZhBey/build /usr/local/bin/zig /home/don/src/tetris /home/don/src/tetris/zig-cache play
don@oysters:~/src/tetris$ zig version
0.5.0+cf38ce970

@gregorybleiker
Copy link

gregorybleiker commented May 7, 2021

I'm also having build problems on windows with VS2019 while running zig build --verbose -Dwindows=true

.\src\c.zig:1:20: error: C import failed
pub usingnamespace @cImport({
                   ^
.\zig-cache\o\620577f480eb749eeb9c47b56536cb46\cimport.h:1:10: note: 'epoxy/gl.h' file not found
#include <epoxy/gl.h>
         ^
.\src\main.zig:49:10: error: container 'c' has no member called 'glfwSetErrorCallback'
    _ = c.glfwSetErrorCallback(errorCallback);

I'm pretty sure its because one of the dependencies referenced in the readme are missing, but nor sure how to install them...

@sskras
Copy link

sskras commented Oct 5, 2021

Right, I get the same on Windows:

C:\Users\hp\src\tetris>zig build play
.\src\c.zig:1:20: error: C import failed
pub usingnamespace @cImport({
                   ^
.\zig-cache\o\64bbc14e489401bc62663a6d367cbacd\cimport.h:1:10: note: 'epoxy/gl.h' file not found
#include <epoxy/gl.h>
         ^
.\src\main.zig:49:10: error: container 'c' has no member called 'glfwSetErrorCallback'
    _ = c.glfwSetErrorCallback(errorCallback);
         ^
tetris...The following command exited with error code 1:
C:\Users\hp\scoop\apps\ziglang\current\zig.exe build-exe C:\Users\hp\src\tetris\src\main.zig -cflags -std=c99 -- C:\Users\hp\src\tetris\stb_image-2.22\stb_image_impl.c -lc -lglfw -lepoxy --cache-dir C:\Users\hp\src\tetris\zig-cache --global-cache-dir C:\Users\hp\AppData\Local\zig --name tetris -I C:\Users\hp\src\tetris\stb_image-2.22 --enable-cache
error: the following build command failed with exit code 1:
C:\Users\hp\src\tetris\zig-cache\o\67f783fcabcc4fb41ea05de75520fe1f\build.exe C:\Users\hp\scoop\apps\ziglang\current\zig.exe C:\Users\hp\src\tetris C:\Users\hp\src\tetris\zig-cache C:\Users\hp\AppData\Local\zig play

@gregorybleiker, I think you're right about dependencies being absent:

Dependencies

@andrewrk, how does one install libepoxy and GLFW for the project on Windows?

EDIT: Maybe comments from @gregorybleiker and me are different problem from the originally reported one.

@andrewrk
Copy link
Owner

3dbb8de should address the issue in the short term. In the long term we will switch to using the zig package manager and it will work everywhere the same way without needing to install stuff with vcpkg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants