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

Can't start the demo client #82

Open
carlotm opened this issue Dec 11, 2024 · 14 comments · May be fixed by #83
Open

Can't start the demo client #82

carlotm opened this issue Dec 11, 2024 · 14 comments · May be fixed by #83
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@carlotm
Copy link

carlotm commented Dec 11, 2024

Hi,

I am following the README to start the demo.
The postgresql db and the server starts correctly with no errors.

The client fails with:

~/w/lyceum master NIX
- client-release
cd client && zig build run --release=fast
run
└─ run lyceum-client
   └─ zig build-exe lyceum-client ReleaseFast native
      └─ zig build-lib raylib ReleaseFast native 20 errors
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c:48:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c:48:
#include <stdio.h>                      // Required for: FILE, fopen(), fseek(), ftell(), fread(), fwrite(), fprintf(), vprintf(), fclose()
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c:48:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c:48:
#include <stdio.h>                      // Required for: FILE, fopen(), fseek(), ftell(), fread(), fwrite(), fprintf(), vprintf(), fclose()
         ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c:2:10: note: in file included from /home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c:2:
#include "raygui.h"
         ^
/home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src/raygui.h:1032:10: note: in file included from /home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src/raygui.h:1032:
#include <stdio.h>              // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c:2:10: note: in file included from /home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c:2:
#include "raygui.h"
         ^
/home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src/raygui.h:1032:10: note: in file included from /home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src/raygui.h:1032:
#include <stdio.h>              // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
         ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c:69:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c:69:
#include <stdio.h>          // Required for: vsprintf()
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c:69:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c:69:
#include <stdio.h>          // Required for: vsprintf()
         ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:108:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:108:
#include <stdio.h>                  // Required for: sprintf() [Used in OpenURL()]
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:108:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:108:
#include <stdio.h>                  // Required for: sprintf() [Used in OpenURL()]
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rlgl.h:3948:70: error: cast to 'void *' from smaller integer type 'int'
    glVertexAttribPointer(index, compSize, type, normalized, stride, (void *)offset);
                                                                     ^~~~~~~~~
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:114:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:114:
#include "rlgl.h"                   // OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
         ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:73:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:73:
#include "external/glfw/src/init.c"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/init.c:28:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/init.c:28:
#include "internal.h"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/internal.h:325:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/internal.h:325:
#include "platform.h"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/platform.h:81:11: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/platform.h:81:
 #include "x11_platform.h"
          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/x11_platform.h:36:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/x11_platform.h:36:
#include <X11/Xcursor/Xcursor.h>
         ^
/usr/include/X11/Xcursor/Xcursor.h:26:10: note: in file included from /usr/include/X11/Xcursor/Xcursor.h:26:
#include <stdio.h>
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:73:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:73:
#include "external/glfw/src/init.c"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/init.c:28:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/init.c:28:
#include "internal.h"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/internal.h:325:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/internal.h:325:
#include "platform.h"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/platform.h:81:11: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/platform.h:81:
 #include "x11_platform.h"
          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/x11_platform.h:36:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/x11_platform.h:36:
#include <X11/Xcursor/Xcursor.h>
         ^
/usr/include/X11/Xcursor/Xcursor.h:26:10: note: in file included from /usr/include/X11/Xcursor/Xcursor.h:26:
#include <stdio.h>
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/posix_poll.c:27:9: error: '_GNU_SOURCE' macro redefined
#define _GNU_SOURCE
        ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:99:14: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:99:
    #include "external/glfw/src/posix_poll.c"
             ^
<command line>:5:9: note: previous definition is here
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:56:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:56:
#include <stdio.h>          // Required for: sprintf()
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:56:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:56:
#include <stdio.h>          // Required for: sprintf()
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/par_shapes.h:1133:32: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648
    float r = (float) rand() / RAND_MAX;
                             ~~^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:111:14: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:111:
    #include "external/par_shapes.h"    // Shapes 3d parametric generation
             ^
/usr/include/stdlib.h:87:18: note: expanded from macro 'RAND_MAX'
#define RAND_MAX 2147483647
                 ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c:79:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c:79:
#include <stdio.h>              // Required for: sprintf() [Used in ExportImageAsCode()]
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c:79:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c:79:
#include <stdio.h>              // Required for: sprintf() [Used in ExportImageAsCode()]
         ^
/usr/include/features.h:481:9: error: '__GLIBC_MINOR__' macro redefined
#define __GLIBC_MINOR__ 36
        ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:
#include "external/miniaudio.h"         // Audio device initialization and management
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:3857:18: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:3857:
        #include <pthread.h>    /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */
                 ^
/usr/include/pthread.h:21:10: note: in file included from /usr/include/pthread.h:21:
#include <features.h>
         ^
<command line>:1:9: note: previous definition is here
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:
#include "external/miniaudio.h"         // Audio device initialization and management
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:11447:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:11447:
#include <stdio.h>
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:
#include "external/miniaudio.h"         // Audio device initialization and management
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:11447:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:11447:
#include <stdio.h>
         ^
error: the following command failed with 20 compilation errors:
/nix/store/j9sp79vdhz4l6lfnvzhvcprhar803zr3-zig-0.13.0/bin/zig build-lib -I/nix/store/mnpvi1mvwyf0wsyy5wca3kfwxv2j4pd9-libglvnd-1.7.0-dev/include -L/nix/store/ymhcg6x5jrw3hx8ik1cji6awiybgp9f7-libglvnd-1.7.0/lib -lGL -I/nix/store/f3hb1fk2kaq0nx976ims5lqry03fqlby-libX11-1.8.10-dev/include -I/nix/store/qypxaa1d0a9vyxgcsqv2nkcdd0f8w4al-xorgproto-2024.1/include -L/nix/store/qrj5f1mb08k5jg7y9ikzb1njli0gvmxz-libX11-1.8.10/lib -lX11 -cflags -std=gnu99 -D_GNU_SOURCE -DGL_SILENCE_DEPRECATION=199309L -fno-sanitize=undefined -- /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rshapes.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c -cflags -std=gnu99 -D_GNU_SOURCE -DGL_SILENCE_DEPRECATION=199309L -fno-sanitize=undefined -- /home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c -OReleaseFast -I /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/include -I /usr/include -I /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src -I /home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src -D_GLFW_X11=1 -DPLATFORM_DESKTOP=1 -L /usr/lib -Mroot -lc --cache-dir /home/carloratm/w/lyceum/client/.zig-cache --global-cache-dir /home/carloratm/.cache/zig --name raylib -static --listen=- 
Build Summary: 2/8 steps succeeded; 1 failed (disable with --summary none)
run transitive failure
└─ run lyceum-client transitive failure
   ├─ zig build-exe lyceum-client ReleaseFast native transitive failure
   │  └─ zig build-lib raylib ReleaseFast native 20 errors
   └─ install transitive failure
      └─ install lyceum-client transitive failure
         └─ zig build-exe lyceum-client ReleaseFast native (+2 more reused dependencies)
error: the following build command failed with exit code 1:
/home/carloratm/w/lyceum/client/.zig-cache/o/4e5ae92a2fffc6735304eb08de2876e1/build /nix/store/j9sp79vdhz4l6lfnvzhvcprhar803zr3-zig-0.13.0/bin/zig /home/carloratm/w/lyceum/client /home/carloratm/w/lyceum/client/.zig-cache /home/carloratm/.cache/zig --seed 0x21217b8d -Z15eb6fa0aab401ee run --release=fast
error: Recipe `client-release` failed on line 49 with exit code 1

Any idea? I am on Debian 12 (stable)

Cheers!

@EduardoLR10
Copy link
Member

EduardoLR10 commented Dec 11, 2024

@carlotm
Can you try going first into nix develop --impure and then after that, launch the client? I know this should not be necessary, but just to test things out.

@EduardoLR10 EduardoLR10 added bug Something isn't working documentation Improvements or additions to documentation labels Dec 11, 2024
@carlotm
Copy link
Author

carlotm commented Dec 11, 2024

@EduardoLR10

Sorry, I forgot to mention I was in the nix shell (hard to see but there's NIX in the first line, which is my prompt telling me I am in a nix shell...)

I tried rm -r ~/.cache/zig && client-release but same exact error

@EduardoLR10
Copy link
Member

EduardoLR10 commented Dec 11, 2024

What is the outcome if, within nix develop --impure, you do just client in the root of the project?

@carlotm
Copy link
Author

carlotm commented Dec 11, 2024

Same error:

~/w/lyceum master NIX
- just client
cd client && zig build run
run
└─ run lyceum-client
   └─ zig build-exe lyceum-client Debug native
      └─ zig build-lib raylib Debug native 20 errors
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c:48:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c:48:
#include <stdio.h>                      // Required for: FILE, fopen(), fseek(), ftell(), fread(), fwrite(), fprintf(), vprintf(), fclose()
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c:48:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c:48:
#include <stdio.h>                      // Required for: FILE, fopen(), fseek(), ftell(), fread(), fwrite(), fprintf(), vprintf(), fclose()
         ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c:2:10: note: in file included from /home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c:2:
#include "raygui.h"
         ^
/home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src/raygui.h:1032:10: note: in file included from /home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src/raygui.h:1032:
#include <stdio.h>              // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c:2:10: note: in file included from /home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c:2:
#include "raygui.h"
         ^
/home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src/raygui.h:1032:10: note: in file included from /home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src/raygui.h:1032:
#include <stdio.h>              // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
         ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c:69:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c:69:
#include <stdio.h>          // Required for: vsprintf()
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c:69:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c:69:
#include <stdio.h>          // Required for: vsprintf()
         ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:108:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:108:
#include <stdio.h>                  // Required for: sprintf() [Used in OpenURL()]
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:108:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:108:
#include <stdio.h>                  // Required for: sprintf() [Used in OpenURL()]
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rlgl.h:3948:70: error: cast to 'void *' from smaller integer type 'int'
    glVertexAttribPointer(index, compSize, type, normalized, stride, (void *)offset);
                                                                     ^~~~~~~~~
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:114:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c:114:
#include "rlgl.h"                   // OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
         ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:73:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:73:
#include "external/glfw/src/init.c"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/init.c:28:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/init.c:28:
#include "internal.h"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/internal.h:325:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/internal.h:325:
#include "platform.h"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/platform.h:81:11: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/platform.h:81:
 #include "x11_platform.h"
          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/x11_platform.h:36:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/x11_platform.h:36:
#include <X11/Xcursor/Xcursor.h>
         ^
/usr/include/X11/Xcursor/Xcursor.h:26:10: note: in file included from /usr/include/X11/Xcursor/Xcursor.h:26:
#include <stdio.h>
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:73:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:73:
#include "external/glfw/src/init.c"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/init.c:28:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/init.c:28:
#include "internal.h"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/internal.h:325:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/internal.h:325:
#include "platform.h"
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/platform.h:81:11: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/platform.h:81:
 #include "x11_platform.h"
          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/x11_platform.h:36:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/x11_platform.h:36:
#include <X11/Xcursor/Xcursor.h>
         ^
/usr/include/X11/Xcursor/Xcursor.h:26:10: note: in file included from /usr/include/X11/Xcursor/Xcursor.h:26:
#include <stdio.h>
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/src/posix_poll.c:27:9: error: '_GNU_SOURCE' macro redefined
#define _GNU_SOURCE
        ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:99:14: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c:99:
    #include "external/glfw/src/posix_poll.c"
             ^
<command line>:5:9: note: previous definition is here
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:56:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:56:
#include <stdio.h>          // Required for: sprintf()
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:56:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:56:
#include <stdio.h>          // Required for: sprintf()
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/par_shapes.h:1133:32: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648
    float r = (float) rand() / RAND_MAX;
                             ~~^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:111:14: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c:111:
    #include "external/par_shapes.h"    // Shapes 3d parametric generation
             ^
/usr/include/stdlib.h:87:18: note: expanded from macro 'RAND_MAX'
#define RAND_MAX 2147483647
                 ^
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c:79:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c:79:
#include <stdio.h>              // Required for: sprintf() [Used in ExportImageAsCode()]
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c:79:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c:79:
#include <stdio.h>              // Required for: sprintf() [Used in ExportImageAsCode()]
         ^
/usr/include/features.h:481:9: error: '__GLIBC_MINOR__' macro redefined
#define __GLIBC_MINOR__ 36
        ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:
#include "external/miniaudio.h"         // Audio device initialization and management
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:3857:18: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:3857:
        #include <pthread.h>    /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */
                 ^
/usr/include/pthread.h:21:10: note: in file included from /usr/include/pthread.h:21:
#include <features.h>
         ^
<command line>:1:9: note: previous definition is here
/usr/include/stdio.h:205:27: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
                          ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:
#include "external/miniaudio.h"         // Audio device initialization and management
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:11447:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:11447:
#include <stdio.h>
         ^
/usr/include/stdio.h:210:33: error: use of undeclared identifier 'L_tmpnam'
extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
                                ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c:180:
#include "external/miniaudio.h"         // Audio device initialization and management
         ^
/home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:11447:10: note: in file included from /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/miniaudio.h:11447:
#include <stdio.h>
         ^
error: the following command failed with 20 compilation errors:
/nix/store/j9sp79vdhz4l6lfnvzhvcprhar803zr3-zig-0.13.0/bin/zig build-lib -I/nix/store/mnpvi1mvwyf0wsyy5wca3kfwxv2j4pd9-libglvnd-1.7.0-dev/include -L/nix/store/ymhcg6x5jrw3hx8ik1cji6awiybgp9f7-libglvnd-1.7.0/lib -lGL -I/nix/store/f3hb1fk2kaq0nx976ims5lqry03fqlby-libX11-1.8.10-dev/include -I/nix/store/qypxaa1d0a9vyxgcsqv2nkcdd0f8w4al-xorgproto-2024.1/include -L/nix/store/qrj5f1mb08k5jg7y9ikzb1njli0gvmxz-libX11-1.8.10/lib -lX11 -cflags -std=gnu99 -D_GNU_SOURCE -DGL_SILENCE_DEPRECATION=199309L -fno-sanitize=undefined -- /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rcore.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/utils.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/raudio.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rmodels.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rshapes.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtext.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rtextures.c /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/rglfw.c -cflags -std=gnu99 -D_GNU_SOURCE -DGL_SILENCE_DEPRECATION=199309L -fno-sanitize=undefined -- /home/carloratm/w/lyceum/client/.zig-cache/o/ec6be00b9a4f00e4bc20631af1f78af7/raygui.c -ODebug -I /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src/external/glfw/include -I /usr/include -I /home/carloratm/.cache/zig/p/1220aa75240ee6459499456ef520ab7e8bddffaed8a5055441da457b198fc4e92b26/src -I /home/carloratm/.cache/zig/p/122002d98ca255ec706ef8e5497b3723d6c6e163511761d116dac3aee87747d46cf1/src -D_GLFW_X11=1 -DPLATFORM_DESKTOP=1 -L /usr/lib -Mroot -lc --cache-dir /home/carloratm/w/lyceum/client/.zig-cache --global-cache-dir /home/carloratm/.cache/zig --name raylib -static --listen=- 
Build Summary: 2/8 steps succeeded; 1 failed (disable with --summary none)
run transitive failure
└─ run lyceum-client transitive failure
   ├─ zig build-exe lyceum-client Debug native transitive failure
   │  └─ zig build-lib raylib Debug native 20 errors
   └─ install transitive failure
      └─ install lyceum-client transitive failure
         └─ zig build-exe lyceum-client Debug native (+2 more reused dependencies)
error: the following build command failed with exit code 1:
/home/carloratm/w/lyceum/client/.zig-cache/o/4e5ae92a2fffc6735304eb08de2876e1/build /nix/store/j9sp79vdhz4l6lfnvzhvcprhar803zr3-zig-0.13.0/bin/zig /home/carloratm/w/lyceum/client /home/carloratm/w/lyceum/client/.zig-cache /home/carloratm/.cache/zig --seed 0xb42a68f0 -Zaa1066aeb6528447 run
error: Recipe `client` failed on line 46 with exit code 1

Don't know if it helps, but if I try to build the client outside of the nix shell, I get this:

~/w/lyceum master
- cd client && zig build run
./build.zig:6:21: error: container 'std' has no member called 'Build'
pub fn build(b: *std.Build) !void {
                    ^
/usr/lib/zig/0.6.0/lib/zig/std/special/build_runner.zig:131:35: note: referenced here
    switch (@typeInfo(@TypeOf(root.build).ReturnType)) {

@EduardoLR10
Copy link
Member

EduardoLR10 commented Dec 11, 2024

It seems to me the external dependencies provided by the flake are not enough in this particular case. Raylib seems to be missing x11 and I remember we had a similar problem when @z-silver tried to build the project (he uses Guix). Could you try providing the dependencies yourself for Raylib, at least for us to test the hypothesis? You can check all the provided dependencies in flake.nix, specifically this part.

@carlotm
Copy link
Author

carlotm commented Dec 11, 2024

@EduardoLR10 thanks for the help, I double checked the deps and I have it all installed.

It may be a bug with my versions of those libraries, no idea :(

@EduardoLR10
Copy link
Member

Let's wait for the DevOps professional @schonfinkel. Sorry I could not help more.

@schonfinkel
Copy link
Collaborator

schonfinkel commented Dec 11, 2024

I'll check this out today, thanks for reporting this @carlotm!

EDIT: First question, are you on NixOS, Linux with Nix or MacOS?
EDIT2: I see, debian 12.

@schonfinkel schonfinkel self-assigned this Dec 11, 2024
@schonfinkel
Copy link
Collaborator

schonfinkel commented Dec 11, 2024

@carlotm Ok, so I've got a friend who also runs Debian + Nix to reproduce this and he got into the same issue. @EduardoLR10 I'll see if I can finally make a pure build of the client as well so we can avoid this (and similar issues) entirelly.

I just noticed zig2nix has wayland and x11 options, so it makes sense going back to that effort.

@carlotm
Copy link
Author

carlotm commented Dec 12, 2024

@schonfinkel ah, I am running X11

@schonfinkel schonfinkel linked a pull request Dec 13, 2024 that will close this issue
@schonfinkel
Copy link
Collaborator

schonfinkel commented Dec 13, 2024

@carlotm I've managed to make the client build with pure Nix, that will solve this and other reprocibility issues in the future. It's being tracked in #83. Also the root cause for the impure build seems to be that the client is trying to pick your system's libs instead of the devshell ones.

@EduardoLR10 I'll need your help to add assets the in the client build, check the picture there in the PR.

@schonfinkel schonfinkel added this to the v0.2.0 milestone Dec 13, 2024
@carlotm
Copy link
Author

carlotm commented Dec 14, 2024

@schonfinkel nice! (I don't know if #83 is test-ready on a Debian 12) this is what I tried, in order:

Command: nix develop
Output:

error:
       … in the left operand of the update (//) operator
         at /nix/store/7gpcik5hfykmrc6y6mnp4izms0szpgsf-source/flake.nix:250:24:
          249|           in
          250|           config.shell // {
             |                        ^
          251|             ci = config.ciDerivation;

       … while evaluating the attribute 'value'
         at /nix/store/h5v6brw3yj14b52a58imzjm3mid6scsz-source/lib/modules.nix:816:9:
          815|     in warnDeprecation opt //
          816|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          817|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `shell':

       … while evaluating definitions from `/nix/store/7gpcik5hfykmrc6y6mnp4izms0szpgsf-source/src/modules/top-level.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Failed assertions:
       - devenv was not able to determine the current directory.

         See https://devenv.sh/guides/using-with-flakes/ how to use it with flakes.

command: nix develop --impure
output

Running tasks     devenv:enterShell                                                                                
Succeeded         devenv:enterShell 6ms
1 Succeeded                         6.97ms

Starting Development Environment...

command: nix build .
output:

error: flake 'git+file:///home/carloratm/w/lyceum' does not provide attribute 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux'

@schonfinkel
Copy link
Collaborator

schonfinkel commented Dec 14, 2024

@carlotm we do not provide a default builder, you can check all options in the packages section of the flake (here and here, for instance).

Try the following (on fix-issue-82)

  1. nix build .#client
  2. ./result/bin/lyceum-client

Testing this on debian would help me a lot, since I'm on NixOS.

@carlotm
Copy link
Author

carlotm commented Dec 14, 2024

@schonfinkel well, that's embarassing, I thought the # was a bash comment 😳

Building works, but when I try to launch the client:

INFO: Initializing raylib 5.0
INFO: Platform backend: DESKTOP (GLFW)
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
WARNING: GLFW: Error: 65542 Description: GLX: No GLXFBConfigs returned
WARNING: GLFW: Error: 65545 Description: GLX: Failed to find a suitable GLXFBConfig
WARNING: GLFW: Failed to initialize Window
Segmentation fault

command: ldd ./result/bin/lyceum-client returns no errors

	libraylib.so.500 => /nix/store/kk0zqkws8ib0g6zyngxfgm3k1f7lyj5r-raylib-5.0/lib/libraylib.so.500 (0x00007ffff7c00000)
	libc.so.6 => /nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/libc.so.6 (0x00007ffff7a07000)
	/nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/ld-linux-x86-64.so.2 => /nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib64/ld-linux-x86-64.so.2 (0x00007ffff7fc6000)
	libm.so.6 => /nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/libm.so.6 (0x00007ffff7ed7000)
	libpthread.so.0 => /nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/libpthread.so.0 (0x00007ffff7ed2000)
	libOpenGL.so.0 => /nix/store/ymhcg6x5jrw3hx8ik1cji6awiybgp9f7-libglvnd-1.7.0/lib/libOpenGL.so.0 (0x00007ffff7ea3000)
	libGLX.so.0 => /nix/store/ymhcg6x5jrw3hx8ik1cji6awiybgp9f7-libglvnd-1.7.0/lib/libGLX.so.0 (0x00007ffff7e6f000)
	libGLU.so.1 => /nix/store/ly5p7zz86gb19f0qk60rrylqxjs3qkc4-glu-9.0.3/lib/libGLU.so.1 (0x00007ffff798f000)
	libglfw.so.3 => /nix/store/dkr1qj53h73z9mnk2wq3x4f4w3wk7ag3-glfw-3.4/lib/libglfw.so.3 (0x00007ffff7908000)
	libGLdispatch.so.0 => /nix/store/ymhcg6x5jrw3hx8ik1cji6awiybgp9f7-libglvnd-1.7.0/lib/libGLdispatch.so.0 (0x00007ffff784f000)
	libX11.so.6 => /nix/store/qrj5f1mb08k5jg7y9ikzb1njli0gvmxz-libX11-1.8.10/lib/libX11.so.6 (0x00007ffff7703000)
	libXext.so.6 => /nix/store/hpd1dss7lmrywlr37vncyzbhzp6rgri5-libXext-1.3.6/lib/libXext.so.6 (0x00007ffff7e58000)
	libstdc++.so.6 => /nix/store/97f3gw9vpyxvwjv2i673isvg92q65mwn-gcc-13.3.0-lib/lib/libstdc++.so.6 (0x00007ffff7400000)
	libgcc_s.so.1 => /nix/store/97f3gw9vpyxvwjv2i673isvg92q65mwn-gcc-13.3.0-lib/lib/libgcc_s.so.1 (0x00007ffff76de000)
	librt.so.1 => /nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/librt.so.1 (0x00007ffff7e51000)
	libdl.so.2 => /nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/libdl.so.2 (0x00007ffff76d9000)
	libXrandr.so.2 => /nix/store/3c603pkfh9fq13lrm6rdqynb7xxwazv7-libXrandr-1.5.4/lib/libXrandr.so.2 (0x00007ffff76cc000)
	libXinerama.so.1 => /nix/store/93mwaajfzq22hqayzmnniq44xw1hjlqs-libXinerama-1.1.5/lib/libXinerama.so.1 (0x00007ffff76c7000)
	libX11-xcb.so.1 => /nix/store/qrj5f1mb08k5jg7y9ikzb1njli0gvmxz-libX11-1.8.10/lib/libX11-xcb.so.1 (0x00007ffff76c2000)
	libXrender.so.1 => /nix/store/566jyp236h118ad005mxqs7sb9ivv4yj-libXrender-0.9.11/lib/libXrender.so.1 (0x00007ffff76b3000)
	libXcursor.so.1 => /nix/store/ckfsxyla4krxn4zdlmxkp6lk8nsscr5v-libXcursor-1.2.2/lib/libXcursor.so.1 (0x00007ffff76a6000)
	libXi.so.6 => /nix/store/5lq743a2jp3v4kgr80y0sw8jr70pl6gj-libXi-1.8.2/lib/libXi.so.6 (0x00007ffff7692000)
	libXxf86vm.so.1 => /nix/store/f5gdx2x7pir84srhcqzqrpj4i05h34rg-libXxf86vm-1.1.5/lib/libXxf86vm.so.1 (0x00007ffff768a000)
	libxcb.so.1 => /nix/store/b4ph9mwdv628db2vqhhhp3azalq6cwbq-libxcb-1.17.0/lib/libxcb.so.1 (0x00007ffff73d4000)
	libXfixes.so.3 => /nix/store/wfqs8h2mf4ib7f1phpsgv0b20xny9zzl-libXfixes-6.0.1/lib/libXfixes.so.3 (0x00007ffff7680000)
	libXau.so.6 => /nix/store/246p9h3zgpnbx7473glpcah5q09xklgh-libXau-1.0.11/lib/libXau.so.6 (0x00007ffff767b000)
	libXdmcp.so.6 => /nix/store/gznynhg983zzpw55dkn8pkxi1nhqhkj6-libXdmcp-1.1.5/lib/libXdmcp.so.6 (0x00007ffff7673000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants