-
Notifications
You must be signed in to change notification settings - Fork 37
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
SDL Build fails on Arch Linux #176
Comments
I'm using Manjaro Linux and I had the same issue. This link helped to find the problem in my case: github When building the SmallBASIC SDL version, you will use Maybe it will help. At the weekend (when I have access to my Linux machine) I can post the changes I made to that file. You can test by running in a console |
here my sdl2-config file:
|
see: https://github.com/libsdl-org/SDL/blob/SDL2/sdl2-config.in It looks like the SDL2 build on these distros intentionaly removes static support with something like:
The SmallBASIC configure script should be updated to detect this so it can fallback to a non-static build. The place for this is in |
Sorry, I don't log in to GitHub nearly as much as I should, as I do most of my dev work on GitLab. And yeah, Arch and similar distros follow a "statically link only when absolutely, totally necessary" and dynamically link everything by default. I guess that has bled into the way the tools work here as well! I'll test that new commit on my system and see if it all goes well. EDIT: Unfortunately still having the same issue. During the ./configure stage, I can see that it runs sdl2-config but sdl2-config returns an error message per the original comment. config.log EDIT 2: Also tried editing sdl2-config per @Joe7M suggestion, but there doesn't appear to be a libSDL2.a in my /lib folder, only |
Hey, did anyone ever find a solution to this? Editing the sdl2-config file didn't work for me either :( |
I'm using Manjaro Linux and the fix provided by Chris works well. The SDL-version builds without problems. A work around could be to force the configure script to use an additional library:
The third last line of the configure output looks like this:
Without the export command, |
Hi there!
Trying to build the SDL version on Arch Linux (updated as of today). All steps go well until the linking step, where it spits out pages and pages of undefined reference errors in relation to SDL, such as
/usr/bin/ld: /home/amr/sources/SmallBASIC/src/platform/sdl/main.cpp:363: undefined reference to 'SDL_CreateWindow'
The
./configure
step does successfully find SDL libs (though it does seem to erroneously display the output ofsdl2-config
during the configure step instead of redirecting that output to null or something). Looking at the generated Makefile, on like 260 at PACKAGE_LIBS, I don't see-lSDL2
and for some reason-lfreetype
is duplicated:PACKAGE_LIBS = -static-libgcc -ldl -no-pie -lfontconfig -lfreetype -lfreetype -lpcre
Trying to manually add
-lSDL2
there doesn't work for some reason, I can see the-lSDL2
isn't being included in the generated command by make. I have no experience with autotools, so I'm really not sure what it does. However,pkg-config --cflags --libs sdl2
correctly returns-I/usr/include/SDL2 -D_REENTRANT -lSDL2
so again I'm not sure what's happening there. I suspect it's something to do with the fact that Arch is always using the latest packages, including the latest gcc/binutils/pkg-config/sdl2-libs/autotools etc. In the linked full make log below, you can see that the--cflags
part ofpkg-config
is being correctly passed to GCC, so I'm not sure why-lSDL2
fails to get parsed.I'm more than happy to help debug this or provide any additional logs/output if it will help!
Full make log
The text was updated successfully, but these errors were encountered: