ada-game-framework / sdlada

Ada 2022 bindings to SDL 2
zlib License
117 stars 37 forks source link

SDL2 headers not found on FreeBSD #91

Open ghost opened 1 year ago

ghost commented 1 year ago

Hello,

I commented on #73 not realising the ticket was closed, and I am not sure if closed tickets generate notifications....

So here is the original: I am attempting to build sdlada on FreeBSD and am also getting the issues with the build not finding any SDL header. I too have to patch three files to prepend SDL2 to the include directive.

sdl2-config --cflags returns:

-I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE

sdl2-config --libs returns:

-L/usr/local/lib -lSDL2

Tho, I am unsure if I am building the project correctly, there is no Alire on FreeBSD yet, so I am using the Ports system to fetch, extract, and cd to ${SRC}/build/gnat/ and run GNU make there.

sdl2-config is installed and found by GNU make.

Lucretia commented 1 year ago

Yeah, this whole sdl2-config and Ada is a bit of a mess, tbh. I originally wanted it to be buildable using a bog standard tools like make and have each platform call sdl2-config to get the correct, for that platform, configuration paths and stuff.

Have you done a verbose build to see if it's calling that for bsd? Have you checked the /usr/local/include/SDL2 dir to make sure the headers are actually there? I don't know why it gives a second include dir.

Since my move, I've had to change motherboard to an older one which doesn't have the same PCI/e slots that my old M5A99FX PRO R2.0 had, so my vm set up needs to change to reflect the lack of hardware passthrough, I also don't know how bad the speed of the second GPU will be in a x4 slot.

ghost commented 1 year ago

Hello,

I have no idea to what degree any investigation was done, I simply cannot recall, it only been a couple of months, but I have forgotten whatever progress was made. There are headers, including the SDL_ttf module mentioned in the other ticket. I will look at sdlada again, make sure to build with verbose logging, and report back. Thanks for the suggestions.

My sympathies on your recent accommodation related struggles too, the horror is too real.

Lucretia commented 1 year ago

What version of FreeBSD are you on? I've just downloaded the vm image for 13.2 to try out here.

Thanks, it was a nightmare for 2.5 years.

ghost commented 1 year ago

Hey mate,

I am still a few days/or a week away from looking at this. I am on FreeBSD-15-CURRENT. There are 14.x ISOs and virtual machine images available for download, this would be closer to 15-CURRENT.

If you can you hold out, I still need to deploy a public FreeBSD port hacking host for Cyclone Scheme development, if you like, we can use that for sdlada development/testing too, but who knows when I can get the time for that.

Thanks.

Lucretia commented 1 year ago

No hurry.

Lucretia commented 10 months ago

I've updated this repo, you need sdl2, sdl2-ttf, sdl2-image and sdl2-mixer libs or whatever they're called in bsd.