I’m trying to do the Archimedean spiral
to get sdlada working on my rocky 8 linux box.
It compiles well, but does not link. And I don’t see why.
Here’s the longish output from the link part.
I find it odd that it cannot find the SDL functions.
I started with adding
-L/usr/lib64 -lSDL2 -lSDL2_mixer -lSDL2_ttf -lSDL2_image
which then became
-L/usr/lib64 -lSDL2
-L/usr/lib64 -lSDL2_mixer
-L/usr/lib64 -lSDL2_ttf
-L/usr/lib64 -lSDL2_image
and then I added the gfx and mixer libs
[sattmate@rocky moving_sdl]$ gprbuild -v -j0 -p -XUse_Database=1 -P moving_sdl.gpr "archimedean_spiral"
Changing to object directory of "Moving_sdl": "/usr2/wcs/kgk/target/adalib/global_gpr/moving_sdl/"
/usr2/wcs/tools/gnat/25.0w/libexec/gprbuild/gprbind archimedean_spiral.bexch
/usr2/wcs/tools/gnat/25.0w/bin/gnatbind -o b__archimedean_spiral.adb
/usr2/wcs/kgk/target/adalib/global_gpr/moving_sdl/archimedean_spiral.ali
-E -x -F=/tmp/GPR.5316/GNAT-TEMP-000003.TMP -O=/tmp/GPR.5331/GNAT-TEMP-000001.TMP
/usr2/wcs/tools/gnat/25.0w/bin/gcc -c -x ada -gnatA -c -gnatA -gnatWb
-gnatiw -gnatws -Os -g -funwind-tables -fstack-check=specific
-mtune=generic -march=x86-64 b__archimedean_spiral.adb -o b__archimedean_spiral.o
/usr2/wcs/tools/gnat/25.0w/bin/gcc archimedean_spiral.o b__archimedean_spiral.o
/usr2/wcs/tools/sdlada2/25.0w/lib/sdlada.release/libsdlada.a
/usr2/wcs/tools/gnat/25.0w/lib/aws.static/libaws.a
/usr2/wcs/tools/gnat/25.0w/lib/gnatcoll_projects.static/libgnatcoll_projects.a
/usr2/wcs/tools/gnat/25.0w/lib/gpr/static/gpr/libgpr.a
/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_schema.static/libxmlada_schema.a
/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_dom.static/libxmlada_dom.a
/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_sax.static/libxmlada_sax.a
/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_input.static/libxmlada_input_sources.a
/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_unicode.static/libxmlada_unicode.a
/usr2/wcs/tools/gnat/25.0w/lib/gnatcoll_core.static/libgnatcoll_core.a
/usr2/wcs/tools/gnat/25.0w/lib/gnatcoll_minimal.static/libgnatcoll_minimal.a
-L/usr2/wcs/kgk/target/global -lsattmate -lodbc /usr2/wcs/tools/sdlada2/25.0w/lib/sdlada.release/libsdlada.a
-L/usr/lib64 -lSDL2
-L/usr/lib64 -lSDL2_mixer
-L/usr/lib64 -lSDL2_ttf
-L/usr/lib64 -lSDL2_image
-L/usr/lib64 -lSDL2_gfx
-L/usr/lib64 -lSDL2_net
-ldl
-L/usr2/wcs/kgk/target/adalib/global_gpr/moving_sdl/
-L/usr2/wcs/kgk/target/adalib/global_gpr/moving_sdl/
-L/usr2/wcs/kgk/target/adalib/global_gpr/
-L/usr2/wcs/tools/gnat/25.0w/lib/aws.static/
-L/usr2/wcs/tools/gnat/25.0w/lib/gnatcoll_core.static/
-L/usr2/wcs/tools/gnat/25.0w/lib/gnatcoll_minimal.static/
-L/usr2/wcs/tools/gnat/25.0w/lib/gnatcoll_projects.static/
-L/usr2/wcs/tools/gnat/25.0w/lib/gpr/static/gpr/
-L/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_dom.static/
-L/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_unicode.static/
-L/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_sax.static/
-L/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_input.static/
-L/usr2/wcs/tools/gnat/25.0w/lib/xmlada/xmlada_schema.static/
-L/usr2/wcs/tools/sdlada2/25.0w/lib/sdlada.release/
-L/usr2/wcs/kgk/target/adalib/global_gpr/moving/
-L/usr2/wcs/tools/gnat/25.0w/lib/gcc/x86_64-pc-linux-gnu/13.3.1/adalib/
-static-libgcc -lSDL2
/usr2/wcs/tools/gnat/25.0w/lib/gcc/x86_64-pc-linux-gnu/13.3.1/adalib/libgnarl.a
/usr2/wcs/tools/gnat/25.0w/lib/gcc/x86_64-pc-linux-gnu/13.3.1/adalib/libgnat.a -lrt
-lpthread -lm -ldl -Wl,-rpath-link,/usr2/wcs/tools/gnat/25.0w/lib/gcc/x86_64-pc-linux-gnu/13.3.1//adalib
-Wl,-z,origin,-rpath,
$ORIGIN/..//global:/usr/lib64:
$ORIGIN/..//adalib/global_gpr/moving_sdl:
$ORIGIN/..//adalib/global_gpr:
$ORIGIN/../../..//tools/gnat/25.0w/lib/aws.static:
$ORIGIN/../../..//tools/gnat/25.0w/lib/gnatcoll_core.static:
$ORIGIN/../../..//tools/gnat/25.0w/lib/gnatcoll_minimal.static:
$ORIGIN/../../..//tools/gnat/25.0w/lib/gnatcoll_projects.static:
$ORIGIN/../../..//tools/gnat/25.0w/lib/gpr/static/gpr:
$ORIGIN/../../..//tools/gnat/25.0w/lib/xmlada/xmlada_dom.static:
$ORIGIN/../../..//tools/gnat/25.0w/lib/xmlada/xmlada_unicode.static:
$ORIGIN/../../..//tools/gnat/25.0w/lib/xmlada/xmlada_sax.static:
$ORIGIN/../../..//tools/gnat/25.0w/lib/xmlada/xmlada_input.static:
$ORIGIN/../../..//tools/gnat/25.0w/lib/xmlada/xmlada_schema.static:
$ORIGIN/../../..//tools/sdlada2/25.0w/lib/sdlada.release:
$ORIGIN/..//adalib/global_gpr/moving:
$ORIGIN/../../..//tools/gnat/25.0w/lib/gcc/x86_64-pc-linux-gnu/13.3.1/adalib
-o /usr2/wcs/kgk/target/moving_sdl//archimedean_spiral
/usr2/wcs/tools/gnat/25.0w/bin/../lib/gcc/x86_64-pc-linux-gnu/13.3.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr2/wcs/tools/sdlada2/25.0w/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o):
in function `sdl__video__rectangles__has_intersected__2':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__has_intersected__2+0x24):
undefined reference to `SDL_HasIntersectionF'
/usr2/wcs/tools/gnat/25.0w/bin/../lib/gcc/x86_64-pc-linux-gnu/13.3.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr2/wcs/tools/sdlada2/25.0w/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o):
in function `sdl__video__rectangles__intersects__3':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__intersects__3+0x2d):
undefined reference to `SDL_IntersectFRect'
/usr2/wcs/tools/gnat/25.0w/bin/../lib/gcc/x86_64-pc-linux-gnu/13.3.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr2/wcs/tools/sdlada2/25.0w/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o):
in function `sdl__video__rectangles__union__2':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__union__2+0x29):
undefined reference to `SDL_UnionFRect'
I then added the static libs
[sattmate@rocky moving_sdl]$ sudo dnf list SDL2*
Repository packages-microsoft-com-prod is listed more than once in the configuration
Last metadata expiration check: 19:38:38 ago on Wed 22 Jan 2025 02:44:28 PM CET.
Installed Packages
SDL2.x86_64 2.0.10-2.el8 @powertools
SDL2-devel.x86_64 2.0.10-2.el8 @powertools
SDL2-static.x86_64 2.0.10-2.el8 @powertools
SDL2_gfx.x86_64 1.0.4-10.el8 @epel
SDL2_gfx-devel.x86_64 1.0.4-10.el8 @epel
SDL2_image.x86_64 2.6.3-1.el8 @epel
SDL2_image-devel.x86_64 2.6.3-1.el8 @epel
SDL2_mixer.x86_64 2.6.3-1.el8 @epel
SDL2_mixer-devel.x86_64 2.6.3-1.el8 @epel
SDL2_net.x86_64 2.0.1-15.el8 @epel
SDL2_net-devel.x86_64 2.0.1-15.el8 @epel
SDL2_ttf.x86_64 2.20.2-1.el8 @epel
SDL2_ttf-devel.x86_64 2.20.2-1.el8 @epel
Finally I included
/usr/lib64/libSDL2.a and /usr/lib64/libSDL2main.a .
still no go
what am I missing?
/Björn