Current state of SDLADA? Would like to get Rosetta Code Task Archimedean spiral working on MacOS arm64

Hi;

I have errors generated when doing alr build with the Rosetta Code Task Archimedean spiral working on MacOS arm64. I’m using MacPorts for the sdl library source. Perhaps I still have to use homebrew? (I asked this question when comp.lang.ada was still [somewhat] viable). MacPorts and homebrew do not happily coexist.

Thanks,
RBE

PS: I can provide an error log if desired, but it looks pretty clear that the sdl library code for arm64 is not found at the linking stage.

My main machine, where all the source is, died; I’m waiting on new parts.

As for errors, you’ll need to provide the errors, it should just build, but use the latest git, not the one in the alire index, alr with sdlada --use=... as I say in the README.

Hi;

build failure.

My MacPorts ports in question are all up-to-date.

Here is my bash script driver:

#!/bin/bash

# sudo port -v -s install libsdl2 libsdl2_ttf libsdl2_image libsdl2_mixer
alr -v --no-color --non-interactive init --bin archimedean_spiral
cd ./archimedean_spiral
cp ../archimedean_spiral.adb ./src/.
alr -v with sdlada --use=https://github.com/ada-game-framework/sdlada.git
alr -v build
if [ -f ./bin/archimedean_spiral ]; then
    ./bin/archimedean_spiral
fi
cd ..
rm -rf ./archimedean_spiral

Here is my log file:

-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
Alire needs some user information to initialize the crate author and maintainer,
for eventual submission to the Alire community index. This information will be 
interactively requested now.

You can edit this information at any time with 'alr config'

Enter a short description of the crate: (default: '')
Using default: ''
Please enter your full name: (default: 'Your Name')
Using default: 'Your Name'
Please enter your GitHub login: (default: 'github-username')
Using default: 'github-username'
Please enter your email address: (default: 'example@example.com')
Using default: 'example@example.com'
Select a software license for the crate?
Using default choice in non-interactive mode: MIT OR Apache-2.0 WITH LLVM-exception
Warning: FALSE
Enter a comma (',') separated list of tags to help people find your crate: (default: '')
Using default: ''
Enter an optional Website URL for the crate: (default: '')
Using default: ''
-> Spawning: ["uname", "-m"] > /private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/alr-yxxg.tmp
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Found 1 indexes
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Spawning: ["gnat", "--version"] > /private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/alr-hjsz.tmp
-> Index already loaded, loading skipped
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Spawning: ["gprbuild", "--version"] > /private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/alr-qtbv.tmp
-> Env: macports appends '/opt/local/lib' to 'LIBRARY_PATH'
-> Env: Crate prefix for resources location sets 'archimedean_spiral_0.1.0_filesystem' to 'ARCHIMEDEAN_SPIRAL_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets 'gnat_external_14.2.0_external' to 'GNAT_EXTERNAL_ALIRE_PREFIX'
-> Env: Alire sets 'True' to 'ALIRE'
-> Env: macports appends '/opt/local/include' to 'CPLUS_INCLUDE_PATH'
-> Env: macports appends '/opt/local/include' to 'C_INCLUDE_PATH'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Generating crate config files
-> Config file is not readable or doesn't exist: '~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/aaa-ahsc.tmp'
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
Success: archimedean_spiral initialized successfully.
-> alr init done
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
-> Using default value for configuration 'update.manually_only': 'FALSE'
-> Spawning: ["uname", "-m"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-nmsq.tmp
-> Checking out [git]: https://github.com/ada-game-framework/sdlada.git
-> Spawning: ["git", "clone", "--recursive", "-q", "--depth", "1", "--no-single-branch", "https://github.com/ada-game-framework/sdlada.git", "~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-olnw.tmp"]
-> Crate archimedean_spiral adds pin sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Checking out pin sdlada at ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada
-> Spawning: ["git", "config", "--list"] > /private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/alr-hfur.tmp
Note: Pulling sdlada branch ...
-> Spawning: ["git", "pull", "--recurse-submodules"]
Already up to date.
-> Crate archimedean_spiral adds pin sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Crate archimedean_spiral adds pin sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Found 1 indexes
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Spawning: ["gnat", "--version"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-jstv.tmp
-> Index already loaded, loading skipped
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Spawning: ["gprbuild", "--version"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-mhry.tmp
-> Solving dependencies with options: Age order: NEWEST; Completeness: FIRST_COMPLETE; Externals: DETECT; Hinting: HINT
-> Root dependency tree is: (sdlada^2.5.124 and sdlada^2.5.124)
-> User pins to apply:
->    sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Index already loaded, loading skipped
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Index already loaded, loading skipped
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Looking for system package: libsdl2
-> Spawning: ["port", "info", "--version", "libsdl2"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-nnwd.tmp
-> Success with system package: libsdl2
-> Index already loaded, loading skipped
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Looking for system package: make
-> Spawning: ["port", "info", "--version", "make"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-jtjb.tmp
Error: Port make not found
-> Spawning: ["make", "--version"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-hyaa.tmp
-> Dependencies solvable in 1 ways (complete: 1; partial: 0; dupes: 0)
-> Dependencies solved with 3 releases in 0.44 seconds
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Spawning: ["port", "echo", "installed"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-pvwn.tmp
-> Skipping install of already available system origin libsdl2=2.30.9
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> External requires no deployment for make=3.81.0
-> Using default value for configuration 'warning.caret': 'TRUE'
-> Update completed
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Crate archimedean_spiral adds pin sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Env: macports appends '/opt/local/lib' to 'LIBRARY_PATH'
-> Env: Crate prefix for resources location sets 'libsdl2_2.30.9_system' to 'LIBSDL2_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets 'archimedean_spiral_0.1.0_filesystem' to 'ARCHIMEDEAN_SPIRAL_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets 'gnat_external_14.2.0_external' to 'GNAT_EXTERNAL_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets 'make_3.81.0_external' to 'MAKE_ALIRE_PREFIX'
-> Env: sdlada (gpr ext) sets 'macos_ports' to 'SDL_PLATFORM'
-> Env: Crate prefix for resources location sets 'sdlada_2.5.124_filesystem' to 'SDLADA_ALIRE_PREFIX'
-> Env: Alire sets 'True' to 'ALIRE'
-> Env: macports appends '/opt/local/include' to 'CPLUS_INCLUDE_PATH'
-> Env: macports appends '/opt/local/include' to 'C_INCLUDE_PATH'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Generating crate config files
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
Requested changes:

   + sdlada ^2.5.124 (add)
-> Crate archimedean_spiral adds pin sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Solving dependencies with options: Age order: NEWEST; Completeness: FIRST_COMPLETE; Externals: DETECT; Hinting: HINT
-> Root dependency tree is: (sdlada^2.5.124 and sdlada^2.5.124)
-> User pins to apply:
->    sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Dependencies solvable in 1 ways (complete: 1; partial: 0; dupes: 0)
-> Dependencies solved with 3 releases in 0.00 seconds

Changes to dependency solution:

   +b libsdl2 2.30.9  (new,indirect,system package)
   +b make    3.81.0  (new,indirect,executable in path)
   +. sdlada  2.5.124 (new,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git)

Do you want to proceed?
Using default: Yes
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Spawning: ["port", "echo", "installed"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-nylr.tmp
-> Skipping install of already available system origin libsdl2=2.30.9
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> External requires no deployment for make=3.81.0
-> Using default value for configuration 'warning.caret': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> alr with done
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
-> Using default value for configuration 'update.manually_only': 'FALSE'
-> Spawning: ["uname", "-m"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-bmoo.tmp
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'update.manually_only': 'FALSE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Found 1 indexes
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Spawning: ["gnat", "--version"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-ufes.tmp
-> Index already loaded, loading skipped
-> Loading index found at ~/.config/alire/indexes/community/repo/index
-> Spawning: ["gprbuild", "--version"] > ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/tmp/alr-ckiq.tmp
-> Crate archimedean_spiral adds pin sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Env: macports appends '/opt/local/lib' to 'LIBRARY_PATH'
-> Env: Crate prefix for resources location sets 'libsdl2_2.30.9_system' to 'LIBSDL2_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets 'archimedean_spiral_0.1.0_filesystem' to 'ARCHIMEDEAN_SPIRAL_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets 'gnat_external_14.2.0_external' to 'GNAT_EXTERNAL_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets 'make_3.81.0_external' to 'MAKE_ALIRE_PREFIX'
-> Env: sdlada (gpr ext) sets 'macos_ports' to 'SDL_PLATFORM'
-> Env: Crate prefix for resources location sets 'sdlada_2.5.124_filesystem' to 'SDLADA_ALIRE_PREFIX'
-> Env: Alire sets 'True' to 'ALIRE'
-> Env: macports appends '/opt/local/include' to 'CPLUS_INCLUDE_PATH'
-> Env: macports appends '/opt/local/include' to 'C_INCLUDE_PATH'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Generating crate config files
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Crate archimedean_spiral adds pin sdlada^2.5.124 (linked,path=alire/cache/pins/sdlada,url=https://github.com/ada-game-framework/sdlada.git,release)
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Using default value for configuration 'dependencies.shared': 'TRUE'
-> Env: macports appends '/opt/local/lib' to 'LIBRARY_PATH'
-> Env: Crate prefix for resources location sets '~/.local/share/alire/releases/libsdl2_2.30.9_system' to 'LIBSDL2_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets '~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral' to 'ARCHIMEDEAN_SPIRAL_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets '~/.local/share/alire/toolchains/gnat_external_14.2.0_external' to 'GNAT_EXTERNAL_ALIRE_PREFIX'
-> Env: Crate prefix for resources location sets '~/.local/share/alire/releases/make_3.81.0_external' to 'MAKE_ALIRE_PREFIX'
-> Env: sdlada (gpr ext) sets 'macos_ports' to 'SDL_PLATFORM'
-> Env: Crate prefix for resources location sets '~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada' to 'SDLADA_ALIRE_PREFIX'
-> Env: crates prepends '~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/build/gnat' to 'GPR_PROJECT_PATH'
-> Env: crates prepends '~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral' to 'GPR_PROJECT_PATH'
-> Env: Alire sets 'True' to 'ALIRE'
-> Env: macports appends '/opt/local/include' to 'CPLUS_INCLUDE_PATH'
-> Env: macports appends '/opt/local/include' to 'C_INCLUDE_PATH'
-> Note: Skipping actions and build of libsdl2=2.30.9: origin is system/external
-> Note: Skipping actions and build of make=3.81.0: origin is system/external
Note: Running pre-build actions for sdlada=2.5.124...
-> Running action: Pre_Build run: make -C ./build/gnat tools (from ${CRATE_ROOT}/.) (cwd:~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada)
-> Spawning: ["make", "-C", "./build/gnat", "tools"]
mkdir -p gen/src/
gprbuild -p -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \
		-Ptools.gpr
Setup
   [mkdir]        object directory for project Tools
Compile
   [Ada]          gen_keyboard.adb
   [Ada]          scancodes.ads
   [Ada]          utils.adb
Bind
   [gprbind]      gen_keyboard.bexch
   [Ada]          gen_keyboard.ali
Link
   [link]         gen_keyboard.adb
./gen/debug/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads
-> Note: Not pre-building sdlada=2.5.124 (no executables declared)
Note: Building archimedean_spiral=0.1.0-dev/archimedean_spiral.gpr...
-> Spawning: ["gprbuild", "-v", "-s", "-j0", "-p", "-P", "~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/archimedean_spiral.gpr"]
object directory "~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/build/gnat/gen/debug/lib/.obj" created for project SDLAda
object directory "~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/obj/development" created for project Archimedean_Spiral
exec directory "~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/bin" created for project Archimedean_Spiral
Changing to object directory of "Archimedean_Spiral": "~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/obj/development/"
/opt/gcc-14.2.0-3-aarch64/bin/gcc -c -x ada -gnatA -Og -ffunction-sections -fdata-sections -g -gnatwa -gnatw.X -gnatVa -gnaty3 -gnatya -gnatyA -gnatyB -gnatyb -gnatyc -gnaty-d -gnatye -gnatyf -gnatyh -gnatyi -gnatyI -gnatyk -gnatyl -gnatym -gnatyn -gnatyO -gnatyp -gnatyr -gnatyS -gnatyt -gnatyu -gnatyx -gnatW8 -gnatec=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000003.TMP -gnatem=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000004.TMP ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/src/archimedean_spiral.adb
Changing to object directory of "SDLAda": "~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/build/gnat/gen/debug/lib/.obj/"
/usr/bin/clang -c -x c -ffunction-sections -fdata-sections -O0 -g -ggdb -DSDL_MACPORTS -I/opt/local/include -D_REENTRANT -MMD -MF version.d -specs=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000006.TMP ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/src/version.c
/opt/gcc-14.2.0-3-aarch64/bin/gcc -c -x ada -gnatA -ffunction-sections -fdata-sections -O0 -g -ggdb -gnat2022 -gnata -gnato -gnatwa -gnatwaJ -gnaty -gnaty-s -gnatyO -gnatyM120 -gnatyx -gnatec=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000007.TMP -gnatem=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000008.TMP ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/src/link/nix/sdl_linker.ads
/opt/gcc-14.2.0-3-aarch64/bin/gcc -c -x ada -gnatA -ffunction-sections -fdata-sections -O0 -g -ggdb -gnat2022 -gnata -gnato -gnatwa -gnatwaJ -gnaty -gnaty-s -gnatyO -gnatyM120 -gnatyx -gnatec=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000007.TMP -gnatem=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000009.TMP ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/src/video/sdl-video-windows-makers.adb
/opt/gcc-14.2.0-3-aarch64/bin/gcc -c -x ada -gnatA -ffunction-sections -fdata-sections -O0 -g -ggdb -gnat2022 -gnata -gnato -gnatwa -gnatwaJ -gnaty -gnaty-s -gnatyO -gnatyM120 -gnatyx -gnatec=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000007.TMP -gnatem=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000010.TMP ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/src/video/sdl-video.adb
/opt/gcc-14.2.0-3-aarch64/bin/gcc -c -x ada -gnatA -ffunction-sections -fdata-sections -O0 -g -ggdb -gnat2022 -gnata -gnato -gnatwa -gnatwaJ -gnaty -gnaty-s -gnatyO -gnatyM120 -gnatyx -gnatec=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000007.TMP -gnatem=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000011.TMP ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/src/video/sdl-video-textures.adb
/opt/gcc-14.2.0-3-aarch64/bin/gcc -c -x ada -gnatA -ffunction-sections -fdata-sections -O0 -g -ggdb -gnat2022 -gnata -gnato -gnatwa -gnatwaJ -gnaty -gnaty-s -gnatyO -gnatyM120 -gnatyx -gnatec=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000007.TMP -gnatem=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000012.TMP ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/src/video/sdl-video-rectangles.adb
/opt/gcc-14.2.0-3-aarch64/bin/gcc -c -x ada -gnatA -ffunction-sections -fdata-sections -O0 -g -ggdb -gnat2022 -gnata -gnato -gnatwa -gnatwaJ -gnaty -gnaty-s -gnatyO -gnatyM120 -gnatyx -gnatec=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000007.TMP -gnatem=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000013.TMP ~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/alire/cache/pins/sdlada/src/video/sdl-video-palettes.adb
archimedean_spiral.adb:58:80: (style) this line is too long [-gnatyM]
archimedean_spiral.adb:59:80: (style) this line is too long [-gnatyM]
sdl.ads:35:18: error: object renaming without subtype is an Ada 2022 feature
sdl.ads:35:18: error: unit must be compiled with -gnat2022 switch
clang: warning: argument unused during compilation: '-specs=/private/var/folders/w6/y2gky19s1mbcg5cgwj4512q40000gn/T/GPR.33396/GNAT-TEMP-000006.TMP' [-Wunused-command-line-argument]

   compilation of archimedean_spiral.adb failed

gprbuild: *** compilation phase failed
ERROR: Command ["gprbuild", "-s", "-j0", "-p", "-P", "~/not_git_master/programming/from_Rosetta_Code/Ada/Archimedean_Spiral/version_1/archimedean_spiral/archimedean_spiral.gpr"] exited with code 4
ERROR: Compilation failed.
-> alr build unsuccessful

Thanks,
RBE

That means, you have to set up alire with your github details.

I don’t know why you use MacPorts to download the SDL2 components “by hand”; the idea is that it would know how to pick up the latest versions of the required packages by itself. If this isn’t working, let us know.

I’m using HB, and I have a crate (unpublished) which uses SDL2: it simply says

...
[[depends-on]]
sdlada = "*"
...

and when I say alr show --tree I get (only SDL2 components shown)

Dependencies (tree):
   sdlada=2.5.20 (*)
   +-- libsdl2=2.30.1 (^2.0.0)
   +-- libsdl2_image=2.8.2+_1 (^2.0.0)
   +-- libsdl2_mixer=2.8.0 (^2.0.0)
   +-- libsdl2_ttf=2.22.0 (^2.0.0)
   +-- make=4.4.1 (*)

Anyway, looking at the end of your logfile, there’s

archimedean_spiral.adb:58:80: (style) this line is too long [-gnatyM]
archimedean_spiral.adb:59:80: (style) this line is too long [-gnatyM]
sdl.ads:35:18: error: object renaming without subtype is an Ada 2022 feature
sdl.ads:35:18: error: unit must be compiled with -gnat2022 switch

You can fix the first two easily enough, not that I’m sure they’ll cause the compilation to fail; for the second two, you can add this to your alire.toml:

[build-switches]
"*".ada_version = "ada2022"

You need to be using the git HEAD really, as it has the renderer additions.

Hi All;

  1. A hearty thank you to all of you who have contributed to this project.
  2. Luke: Thank you, but I do not think that, other than making certain that the Alire project is initialized to be binary project, the answers to the prompts to the alr init command really do have any impact on anything, especially at this time as I am exclusively a “Consumer”, not a “VAR” or a “Producer”.
  3. Simon: Thank you, but I’m following the requirements in the readme regarding the sdl github repo that states that sudo port install yada…yada is a prerequisite. If the alr with command will do the “needful” automatically, then that will be cool. I could do a port uninstall of the sdl ports and see if it works, but without the confidence that alr knows what to do (see point #4).
  4. How does alr know to go to homebrew or MacPorts? Maybe it works fine for you guys who have homebrew installed already, but I cannot do homebrew and MacPorts concurrently and I’m pretty well committed to MacPorts.
  5. Simon: thanks for the hint regarding the build-switches to specify ada2022; I’ll try that.

Thanks,
RBE

I really don’t know exactly the command to git clone from the HEAD, I was following precisely the the git clone command in the README.

RBE

Search for “–use” in the README.

That is “EXACTLY” the command that I used.

alr with sdlada --use=GitHub - ada-game-framework/sdlada: Ada 2022 bindings to SDL 2

The command is:

alr with sdlada --use=https://github.com/ada-game-framework/sdlada.git

Ok. Did a port uninstall of all of the libsdl ports.
Ran through the same commands again, but added the build-switches as suggested.
At least I’m partially satisfied with alr knowing to go to MacPorts…but the additional libsdl ports were NOT installed by the port command that was executed by alr. So there’s a potential bug.

Same results.

RBE

I did that. EXACTLY. Copy&paste from the README.

Looks to me like there are contradictory instructions in the README.

Here’s my current port installation for libsdl2:

port installed | grep libsdl
libsdl2 @2.30.9_0 (active)

Note that the other libsdl2 ports ARE NOT present.

No, there’s MULTIPLE instructions.

You have to install the other SDLAda libs separately in the same way. Either alr with sdlada or with the --use option for latest from git.

If you look at my initial log file I have done all these things.

I’m getting a bit irritated now, so I guess I’d better step back for now and cool down.

RBE

Ok, I missed the length of the log, seems your issue is not enabling 2022 mode, it’s a 2022 lib.

sdl.ads:35:18: error: unit must be compiled with -gnat2022 switch

so, check the sdlada.gpr:

      Ada_Switches    := ("-gnat2022", "-gnata", "-gnato", "-gnatwa", "-gnatwaJ", "-gnaty", "-gnaty-s", "-gnatyO",

You need to add that switch (the first one) to your gpr file too.

Modifying “config/archimedean_spiral_config.gpr”; to add “-gnat2022”. That is the only one of two *.gpr files; the other one does not have “Ada_Switches”…

Here’s my diff output. Hope that is correct.

diff ./config/PREVIOUS_archimedean_spiral_config.gpr ./config/archimedean_spiral_config.gpr
14c14,15
<             "-Og" -- Optimize for debug
---
>             "-gnat2022"
>             ,"-Og" -- Optimize for debug

Here’s a follow-on question.

I’d like to convert the above diff output to make a patch so that I can make the change to the file non-interactively.

Or use sed or perl or python or ruby or lua (or whatever) in order to have the same effect, but I’m just not getting it correctly yet…

RBE