From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Luke A. Guest" Newsgroups: comp.lang.ada Subject: Re: SDL Ada package fails to compile on Mac, gnat 13.1, missing "SDL2_ttf/SDL_ttf.h" Date: Tue, 4 Jul 2023 09:57:42 +0100 Organization: A noiseless patient Spider Message-ID: References: <5bd661f7-f077-47e4-a3c0-aef7d3b41059n@googlegroups.com> <016412bf-0247-466b-add9-8b5d41c6a9d7n@googlegroups.com> <6de97f96-fae6-4e13-9439-e8f550287835n@googlegroups.com> <2566ce87-a407-48a9-a805-afb4582a542bn@googlegroups.com> <7023751f-54a8-4392-b60f-611d5a8dfcb2n@googlegroups.com> <01bd59d9-c5cb-4336-b123-5289165c5de8n@googlegroups.com> <0d46efb3-210d-46d8-9e3c-4d3d938c1924n@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 4 Jul 2023 08:57:42 -0000 (UTC) Injection-Info: dont-email.me; posting-host="02518e99bc896200b22bfcbee2fb18e9"; logging-data="66120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19weFWEIBZyRSpyrSNI9KNDy4CQxd4hF6Y=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Cancel-Lock: sha1:higiiBBMDJmcM8cvtJIu3aa2NSw= Content-Language: en-GB In-Reply-To: <0d46efb3-210d-46d8-9e3c-4d3d938c1924n@googlegroups.com> Xref: news.eternal-september.org comp.lang.ada:65419 List-Id: On 04/07/2023 00:01, Kenneth Wolcott wrote: > ./gen/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads > gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ > -Psdlada.gpr > sdlada.gpr:16:07: undefined attribute "default_swiches" > sdlada.gpr:17:03: ";" after declarative items expected > sdlada.gpr:26:09: a variable cannot be declared for the first time here > sdlada.gpr:26:23: unknown variable "C_Switches" > sdlada.gpr:34:08: undefined attribute "languages" > sdlada.gpr:35:08: undefined attribute "source_dirs" > sdlada.gpr:42:08: undefined attribute "library_name" > sdlada.gpr:43:08: undefined attribute "object_dir" > sdlada.gpr:44:08: undefined attribute "library_dir" > sdlada.gpr:45:08: undefined attribute "library_kind" > sdlada.gpr:47:04: a package cannot be declared here > sdlada.gpr:79:04: a package cannot be declared here > sdlada.gpr:108:05: expected "builder" > gprbuild: "sdlada.gpr" processing failed > make: *** [lib/libadasdl.a] Error 5 > > Ken I don't know what's going on about, here's the gpr I have: library project SDLAda is type Platform_Type is ("linux", "bsd", "windows", "macosx", "macos_homebrew", "macos_ports", "ios", "android"); type Mode_Type is ("debug", "release"); Platform : Platform_Type := external ("SDL_PLATFORM", "linux"); Mode : Mode_Type := external ("SDL_MODE", "debug"); package Builder is for Default_Switches ("Ada") use ("-gnat2012", "-gnata"); end Builder; Source_Platform := ""; case Platform is when "macos_homebrew" => Source_Platform := "../../src/macosx"; when others => Source_Platform := "../../src/" & Platform; end case; for Languages use ("Ada", "C"); for Source_Dirs use ("../../src", Source_Platform, "gen/src/", -- For SDL.Image. "../../src/image", -- For SDL.TTF. "../../src/ttf"); for Library_Name use "sdlada"; for Object_Dir use "gen/" & Mode & "/lib/.obj"; for Library_Dir use "gen/" & Mode & "/lib"; for Library_Kind use "static"; package Compiler is Common_Switches := ("-ffunction-sections", "-fdata-sections"); C_Switches := (); Ada_Switches := ("-gnat2012", "-gnata", "-gnato", "-gnatE", "-gnatwa", "-gnaty", "-gnaty-s", "-gnatyO", "-gnatyM120", "-gnatyx"); case Mode is when "debug" => Common_Switches := Common_Switches & ("-O0", "-g", "-ggdb"); when "release" => Common_Switches := Common_Switches & ("-O2"); end case; -- These flags require checking on all platforms as they're taken directly from sdl2-config. case Platform is when "linux" | "bsd" | "android" | "windows" => C_Switches := C_Switches & ("-I/usr/include/SDL2", "-D_REENTRANT"); when "macos_homebrew" => C_Switches := C_Switches & ("-DSDL_HOMEBREW", "-I/usr/local/include", "-D_REENTRANT"); when "macos_ports" => C_Switches := C_Switches & ("-DSDL_MACPORTS", "-I/opt/local/include", "-D_THREAD_SAFE"); when others => null; end case; for Default_Switches ("C") use Common_Switches & C_Switches; for Default_Switches ("Ada") use Common_Switches & Ada_Switches; end Compiler; package Linker is Linker_Switches := (); case Platform is when "linux" | "bsd" | "android" | "windows" => Linker_Switches := Linker_Switches & ("-lSDL2", "-lSDL2_ttf", "-lSDL2_image", "-L/usr/lib64"); when "macos_homebrew" => Linker_Switches := Linker_Switches & ("-lSDL2", "-lSDL2_ttf", "-lSDL2_image", "-L/usr/local/lib"); when "macos_ports" => Linker_Switches := Linker_Switches & ("-lSDL2", "-lSDL2_ttf", "-lSDL2_image", "-L/opt/local/lib"); when others => null; end case; for Switches ("Ada") use Linker_Switches; end Linker; end SDLAda;