Beyley / ztyping

0 stars 0 forks source link

Cross compilation to Linux x86_64 #2

Closed Beyley closed 1 year ago

Beyley commented 1 year ago
┌─[beyley@arch] - [~/Projects/PROGRAMMING/Zig/ztyping] - [2023-05-07 02:26:55]
└─[2] <git:(master 3b88b9d✈) > zig build -Dtarget=x86_64-linux                       
zig build-lib SDL2 Debug x86_64-linux: error: error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11xinput2.c:25:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11shape.c:25:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11touch.c:25:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11opengl.c:26:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11mouse.c:25:10: fatal error: 'X11/cursorfont.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.c:34:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11framebuffer.c:25:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11modes.c:26:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11dyn.c:27:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11dyn.h:26:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11window.c:32:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11keyboard.c:27:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11messagebox.c:27:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11clipboard.c:28:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11events.c:31:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/x11/SDL_x11video.h:30:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/thread/pthread/SDL_systhread.c:118:24: warning: incompatible pointer types passing 'SYS_ThreadHandle *' (aka 'int *') to parameter of type 'pthread_t *' (aka 'struct __pthread **') [-Wincompatible-pointer-types]
/usr/lib/zig/lib/libc/include/generic-musl/pthread.h:80:41: note: passing argument to parameter here
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/thread/pthread/SDL_systhread.c:296:18: error: incompatible integer to pointer conversion passing 'SYS_ThreadHandle' (aka 'int') to parameter of type 'pthread_t' (aka 'struct __pthread *') [-Wint-conversion]
/usr/lib/zig/lib/libc/include/generic-musl/pthread.h:83:27: note: passing argument to parameter here
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/thread/pthread/SDL_systhread.c:302:20: error: incompatible integer to pointer conversion passing 'SYS_ThreadHandle' (aka 'int') to parameter of type 'pthread_t' (aka 'struct __pthread *') [-Wint-conversion]
/usr/lib/zig/lib/libc/include/generic-musl/pthread.h:81:29: note: passing argument to parameter here

error(compilation): clang failed with stderr: /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/hidapi/linux/hid.c:51:10: fatal error: 'libudev.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/video/SDL_video.c:34:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/include/SDL_syswm.h:69:10: fatal error: 'X11/Xlib.h' file not found

error(compilation): clang failed with stderr: In file included from /home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/src/events/SDL_events.c:35:
/home/beyley/Projects/PROGRAMMING/Zig/ztyping/libs/SDL/include/SDL_syswm.h:69:10: fatal error: 'X11/Xlib.h' file not found

Linux needs an X11 submodule on SDL, fix in https://github.com/andrewrk/SDL/pull/1

Beyley commented 1 year ago

Has been resolved