Skip to content

Conversation

@theUncanny
Copy link

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 to src/nob.c, I was able to compile blc.

Also, in order to build Tine, I found out that I must (manually) build the SDL3 library (via the build.bl script in lib/bl/api/extra/sdl3) since neither build.sh all nor build.sh build-all build 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 the SDL_VIDEODRIVER=x11 environment variable as a workaround).

I later discovered that HINT_VIDEO_DRIVER binding (in lib/bl/api/extra/sdl3/sdl3.bl) was associated with SDL_VIDEO_DRIVER when (at least in SDL3) it should instead be associated with SDL_HINT_VIDEO_DRIVER so I changed, re-compile and finaly now... it works!!

I hope this helps you improve Biscuit Language on Linux-based systems! :)

Added libpthread (-lpthread) on link flags
…hics server (x11 or wayland) on a Linux system
@travisdoor
Copy link
Collaborator

Hello, thanks for your contribution. I appreciate your interest in BL and Tine! Please take a look at my notes.

@travisdoor travisdoor self-requested a review July 3, 2025 20:23
cmd_append(&cmd, LIBZ, LIBZSTD, LIBCURSES);
#else
cmd_append(&cmd, LIBZ, LIBZSTD, LIBTINFO);
cmd_append(&cmd, "-ldl", "-lm", "-lpthread");
Copy link
Collaborator

@travisdoor travisdoor Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there should not be space after the comma in the list? https://github.com/travisdoor/tine/blob/db44045a22bb9ff1a59be1a0f8566c9ce8c035db/src/window.bl#L38 IDK.

@travisdoor
Copy link
Collaborator

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

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

Successfully merging this pull request may close these issues.

2 participants