Fixes on SDL3 binding and nob to compile blc on Debian GNU/Linux 11.x systems#186
Fixes on SDL3 binding and nob to compile blc on Debian GNU/Linux 11.x systems#186theUncanny wants to merge 2 commits into
Conversation
Added libpthread (-lpthread) on link flags
…hics server (x11 or wayland) on a Linux system
|
Hello, thanks for your contribution. I appreciate your interest in BL and Tine! Please take a look at my notes. |
| cmd_append(&cmd, LIBZ, LIBZSTD, LIBCURSES); | ||
| #else | ||
| cmd_append(&cmd, LIBZ, LIBZSTD, LIBTINFO); | ||
| cmd_append(&cmd, "-ldl", "-lm", "-lpthread"); |
There was a problem hiding this comment.
This cause all listed flags to be added second time, I guess it can be removed. Let me know if there are any other issues (maybe something with ordering of link flags?). Also there is incorrect indentation; use tabs please.
| DisplayID :: u32; | ||
|
|
||
| HINT_VIDEO_DRIVER :: "SDL_VIDEO_DRIVER"; | ||
| HINT_VIDEO_DRIVER :: "SDL_HINT_VIDEO_DRIVER"; |
There was a problem hiding this comment.
According to docs https://wiki.libsdl.org/SDL3/SDL_HINT_VIDEO_DRIVER this should be SDL_VIDEO_DRIVER, accepting list of drivers separated by comma. Your Tine build probably works because the hint is ignored?
There was a problem hiding this comment.
Maybe there should not be space after the comma in the list? https://github.com/travisdoor/tine/blob/db44045a22bb9ff1a59be1a0f8566c9ce8c035db/src/window.bl#L38 IDK.
|
Regarding SLD3 linking issues; this is a bit weird, binaries should be included in your bl clone https://github.com/biscuitlang/bl/tree/master/lib/bl/api/extra/sdl3/linux |
Hi!
This PR is because I liked the idea and interface of your Tine editor (simple and effective, in line with the UNIX philosophy) and I wanted to try it on a Debian GNU/Linux 11.x "bullseye" based system (yes, I know, now "oldstable" but, without a doubt, very "stable"), I needed to first compile the latest version (master) of your "Biscuit Language" compiler (blc). It seems that, when linking libraries, they were giving unresolved symbol errors associated with libpthread (
-lpthread). Once added tosrc/nob.c, I was able to compileblc.Also, in order to build Tine, I found out that I must (manually) build the SDL3 library (via the
build.blscript inlib/bl/api/extra/sdl3) since neitherbuild.sh allnorbuild.sh build-allbuild it but, when I was able to compile Tine and run it, Tine cannot init because SDL3 couldn't detect the graphics system (X11/Xorg in my case) and therefore neither could the SDL video subsystem (the only way was to use theSDL_VIDEODRIVER=x11environment variable as a workaround).I later discovered that
HINT_VIDEO_DRIVERbinding (inlib/bl/api/extra/sdl3/sdl3.bl) was associated withSDL_VIDEO_DRIVERwhen (at least in SDL3) it should instead be associated withSDL_HINT_VIDEO_DRIVERso I changed, re-compile and finaly now... it works!!I hope this helps you improve Biscuit Language on Linux-based systems! :)