-
Notifications
You must be signed in to change notification settings - Fork 540
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
Add builder for SDL2_ttf #123
Conversation
I think the issue on Windows is that SDL2 is not building the shared library
In the log file of SDL2 for Windows I found:
Most of them are in |
If no one comes up with some ideas, next week I'll probably try asking for help in https://discourse.libsdl.org/ |
Hmm.. I actually don't think SDL_ttf should be depending on
I think that's something that users link against in their final applications if they are happy with the "standard" initialization of SDL... But i dunno, reading your script, it looks like you just run SDL_ttf's
But yeah it seems plausible that the problem is SDL2_jll is not building |
Oh, yeah, actually, i just downloaded the release generated for windows on
It seems like So yeah, i think that's probably the problem! EDIT: Okay yeah i think my understanding is correct. For comparison, here's the product tree structure on linux:
Unfortunately I'm not able to look into this any time soon, but I think that's the problem that needs to be fixed! :) |
On Windows, DLL's go into |
Ah, thanks @staticfloat. Okay so then i think the problem is probably just that we're not building Yggdrasil/S/SDL2/build_tarballs.jl Line 38 in 3215e29
|
If it's not getting built, that's something that needs to be configured within the build itself; some kind of configure option or something like that. |
I tried looking into this a bit yesterday but didn't immediately figure out how to get it to build. @giordano I think asking on the SDL discourse sounds like a great next step. Thanks for owning this!! 👍 |
I opened a thread in Sdl2 discourse, but so far I didn't get a reply. However, I found something interesting:
It looks like these PKGBUILD files are the same as those in https://github.com/msys2/MINGW-packages, and they don't seem to be much different from what we're doing, maybe it's a matter of properly setting up the environment? However, having those PKGBUILD files in aur means that they can relatively easily be tested on arch Linux (which I happen to use, but for this task I'd go with a container, to avoid messing up with my system) |
Hmm, yeah, examining those build files, they just do a Could it be that the flags you're adding are screwing it up somehow?: |
Aha! After rereading this thread, and googling the warning message you highlighted that prevented building Looks like they fixed that here: I wonder if we can fix this by adding (Ah, and since this confused me: |
Good catch! I'll play with |
Ok, you've been too fast for me 😅 |
Haha sorry! I was too impatient to try anything on the terminal, so i just edited the file in GitHub and fired it off to let CI test it out for me! 😅 haha If this doesn't work i'll actually try it locally.... 😅 |
+ LIBS="$LIBS $SDL2_LIBS" | ||
+ ], | ||
+ sdl2_found=no | ||
) | ||
-CFLAGS="$CFLAGS $SDL_CFLAGS" | ||
-LIBS="$LIBS $SDL_LIBS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giordano Is there any reason why you changed these variable names?: SDL_LIBS
to SDL2_LIBS
and SDL_CFLAGS
to SDL22_CFLAGS
?
It looks like probably a find-and-replace mistake to me?
I'm wondering if somehow because you're not specifying the libs here, maybe it's defaulting to "all the libs it can find" or something dumb, and that's why it's picking up SDL2main
from SDL2_jll?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the why I changed the name of the variables: I think that the way the default configure
script was looking for SDL configuration was broken with our setup, I just switched to using the pkgconfig file, and since the module is called "SDL2" (see the first argument of PKG_CHECK_MODULES
) the variables names will start with "SDL2".
Co-Authored-By: Nathan Daly <[email protected]>
Relevant breadcrumbs to a related thread @giordano and I read when debugging: Doesn't seem to contain any new info, but some good breakdowns of what the various |
One possible clue: There are a lot more undefined symbols in libSDL2_ttf.a, so looking at
|
To summarise, the problems were:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. Great work. Thanks for the summary too! :)
Ref #122. I consumed all my energy to make this build for FreeBSD, then I gave up when I arrived on Windows. It doesn't build the shared library, only the static archive.
I had the same problem with FreeBSD and I had to patch
configure.in
and (repeatedly) rebuildconfigure
, but apparently this isn't sufficient for Windows. The patch is inspired by https://git.archlinux.org/svntogit/packages.git/tree/trunk/freetype-pkgconfig.patch?h=packages/sdl2_ttf.