comp.lang.ada
 help / color / mirror / Atom feed
From: Kenneth Wolcott <kennethwolcott@gmail.com>
Subject: Re: SDL Ada package fails to compile on Mac, gnat 13.1, missing "SDL2_ttf/SDL_ttf.h"
Date: Wed, 12 Jul 2023 16:09:36 -0700 (PDT)	[thread overview]
Message-ID: <45f83e2f-0085-4f42-9a49-05c7a3e4101an@googlegroups.com> (raw)
In-Reply-To: <u8mhoh$3an6j$1@dont-email.me>

On Wednesday, July 12, 2023 at 8:44:20 AM UTC-7, Luke A. Guest wrote:
> On 12/07/2023 07:01, Kenneth Wolcott wrote: 
> > On Tuesday, July 11, 2023 at 10:43:37 PM UTC-7, Kenneth Wolcott wrote: 
> >> On Thursday, July 6, 2023 at 6:25:42 PM UTC-7, Kenneth Wolcott wrote: 
> >>> On Thursday, July 6, 2023 at 6:23:51 PM UTC-7, Kenneth Wolcott wrote: 
> >>>> On Thursday, July 6, 2023 at 12:37:20 PM UTC-7, Kenneth Wolcott wrote: 
> >>>>> On Tuesday, July 4, 2023 at 2:00:11 AM UTC-7, Luke A. Guest wrote: 
> >>>>>> On 04/07/2023 00:58, Kenneth Wolcott wrote: 
> >>>>>>> On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote: 
> >>>>>>>> Kenneth Wolcott writes: 
> >>>>>>>> [...] 
> >>>>>>>>> After adding a semi-colon at the following line in sdlada.gpr 
> >>>>>>>>> 
> >>>>>>>>> for Default_Swiches ("Ada") use ("-gnat202", "-gnata"); 
> >>>>>>>> [...] 
> >>>>>>>> 
> >>>>>>>> Unless "-gnat202" requests the version of Ada that was current during 
> >>>>>>>> the reign of Septimius Severus, you probably want to use "-gnat2022". 
> >>>>>>>> (Options can be abbreviated, but "-gnat202" may become ambiguous if 
> >>>>>>>> there's a new Ada standard before 2030.) 
> >>>>>>>> 
> >>>>>>>> Also "Default_Swiches" is mispelled. 
> >>>>>>>> 
> >>>>>>>> If the typos are the result of re-typing that line, I strongly suggest 
> >>>>>>>> copy-and-pasting any code you post. 
> >>>>>>>> 
> >>>>>>>> -- 
> >>>>>>>> Keith Thompson 
> >>>>>>> 
> >>>>>>> Thank you, Keith :-) 
> >>>>>>> 
> >>>>>>> Fixed those two typos. 
> >>>>>>> 
> >>>>>>> Here's the current output from trying to build: 
> >>>>>>> 
> >>>>>>> make SDL_PLATFORM=macos_ports SDL_MODE=debug 
> >>>>>>> mkdir -p gen/src/ 
> >>>>>>> gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \ 
> >>>>>>> -Psdlada.gpr 
> >>>>>>> sdlada.gpr:26:09: a variable cannot be declared for the first time here 
> >>>>>>> sdlada.gpr:26:23: unknown variable "C_Switches" 
> >>>>>>> gprbuild: "sdlada.gpr" processing failed 
> >>>>>>> make: *** [lib/libadasdl.a] Error 5 
> >>>>>>> 
> >>>>>>> Thanks, 
> >>>>>>> Ken 
> >>>>>> This makes no sense, line 26 is this: 
> >>>>>> Source_Platform := "../../src/" & Platform; 
> >>>>> Hi Luke; 
> >>>>> 
> >>>>> Is it possible for us to arrange a process to send the patch to me in another means? If Google Groups blocks attachments and I'm getting massively confused with the content being pasted inside the posting, we need to derive another means of communicating. I can share a different email address which is already being heavily spammed... 
> >>>>> 
> >>>>> Thanks, 
> >>>>> Ken 
> >>>> Hi Luke; 
> >>>> 
> >>>> Please email the patch to me as an attachment using the email address: [redacted :-) ] 
> >>>> 
> >>>> Please also provide a checksum of some kind so I know that the file didn't get corrupted en-route. 
> >>>> 
> >>>> Thanks, 
> >>>> Ken 
> >>> The email address is kwolcott at yahoo dot com. 
> >> Hi Luke; 
> >> 
> >> Thanks for the patch via email. 
> >> 
> >> The md5sum matches... 
> >> 
> >> I ran git restore in the sdlada git clone directory... 
> >> 
> >> I then applied the patch: 
> >> 
> >> patch -p1 < test.patch 
> >> patching file 'build/gnat/makefile' 
> >> patching file 'build/gnat/sdlada.gpr' 
> >> patching file 'build/gnat/sdlada_image.gpr' 
> >> Reversed (or previously applied) patch detected! Assume -R? [y] y 
> >> patching file 'build/gnat/tests.gpr' 
> >> Reversed (or previously applied) patch detected! Assume -R? [y] y 
> >> patching file 'build/gnat/tests_image.gpr' 
> >> Reversed (or previously applied) patch detected! Assume -R? [y] y 
> >> patching file 'build/gnat/unit_tests.gpr' 
> >> Reversed (or previously applied) patch detected! Assume -R? [y] y 
> >> patching file 'src/image/version_images.c' 
> >> Reversed (or previously applied) patch detected! Assume -R? [y] y 
> >> patching file 'src/ttf/version_ttf.c' 
> >> Reversed (or previously applied) patch detected! Assume -R? [y] y 
> >> 
> >> Attempting to build: 
> >> 
> >> make SDL_PLATFORM=macos_ports SDL_MODE=release 
> >> mkdir -p gen/src/ 
> >> gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ 
> >> -Psdlada.gpr 
> >> Setup 
> >> [mkdir] object directory for project SDLAda 
> >> sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects 
> >> sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory 
> >> gprbuild: "sdlada.gpr" processing failed 
> >> make: *** [lib/libadasdl.a] Error 5 
> >> So, what did I do wrong this time? 
> >> 
> >> Thanks, 
> >> Ken 
> > 
> > 
> > Ok, 
> > 
> > I deleted the contents of the sdlada git clone directory... 
> > 
> > then did a git restore . 
> > 
> > then applied the patch 
> > 
> > then ran make. 
> > 
> > Still fails... 
> > 
> > ***************************************************************** 
> > patch -p1 < test.patch 
> > patching file 'build/gnat/makefile' 
> > patching file 'build/gnat/sdlada.gpr' 
> > patching file 'build/gnat/sdlada_image.gpr' 
> > patching file 'build/gnat/tests.gpr' 
> > patching file 'build/gnat/tests_image.gpr' 
> > patching file 'build/gnat/unit_tests.gpr' 
> > patching file 'src/image/version_images.c' 
> > patching file 'src/ttf/version_ttf.c' 
> > sdlada: cd build/gnat 
> > gnat: make SDL_PLATFORM=macos_ports SDL_MODE=release 
> > mkdir -p gen/src/ 
> > gprbuild -p -gnat2012 -XSDL_MODE=release -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/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads 
> > gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ 
> > -Psdlada.gpr 
> > Setup 
> > [mkdir] object directory for project SDLAda 
> > sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects 
> > sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory 
> > gprbuild: "sdlada.gpr" processing failed 
> > make: *** [lib/libadasdl.a] Error 5 
> > *****************************************************************
> Check the sdlada.gpr, it will get the platform name as the src dir too, 
> I forgot about that. Change:
> case Platform is 
> when "macos_homebrew" =>
> to: 
> 
> case Platform is 
> when "macos_homebrew" | "macos_ports" | "macosx" =>

After 
1. Completely deleting the cloned instance of sdlada;
2. Applying the patch you provided via email;
3. manually modifying sdlada.gpr as you directed above;

We have the following result:
*********************************************
make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -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/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \
		-Psdlada.gpr
Setup
   [mkdir]        object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
Compile
   [C]            version_ttf.c
[REDACTED]/sdlada/src/ttf/version_ttf.c:25:18: fatal error: SDL2/SDL_ttf.h: No such file or directory
   25 |         #include <SDL2/SDL_ttf.h>
      |                  ^~~~~~~~~~~~~~~~
compilation terminated.
gprbuild: *** compilation phase failed
make: *** [lib/libadasdl.a] Error 4
*********************************************

  reply	other threads:[~2023-07-12 23:09 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 18:38 SDL Ada package fails to compile on Mac, gnat 13.1, missing "SDL2_ttf/SDL_ttf.h" Kenneth Wolcott
2023-06-28 21:13 ` Luke A. Guest
2023-06-28 21:18   ` Kenneth Wolcott
2023-06-28 21:53     ` Kenneth Wolcott
2023-06-28 22:45       ` Luke A. Guest
2023-06-29  0:17         ` Kenneth Wolcott
2023-06-29  9:50           ` Luke A. Guest
2023-06-29 13:12       ` Simon Wright
2023-06-29 13:39         ` Luke A. Guest
2023-06-29 16:06           ` Simon Wright
2023-06-29 17:34             ` Kenneth Wolcott
2023-06-29 19:35               ` Luke A. Guest
2023-06-29 22:04                 ` Kenneth Wolcott
2023-06-30  8:04                   ` Luke A. Guest
2023-06-30 15:41                     ` Kenneth Wolcott
2023-06-30 15:43                       ` Luke A. Guest
2023-06-30 11:30                   ` Luke A. Guest
2023-06-30 13:26                     ` Luke A. Guest
2023-07-02  7:01                       ` Luke A. Guest
2023-07-02 17:05                         ` Kenneth Wolcott
2023-07-02 19:23                           ` Simon Wright
2023-07-02 19:26                             ` Kenneth Wolcott
2023-07-02 19:52                               ` Luke A. Guest
2023-07-02 20:20                                 ` Kenneth Wolcott
2023-07-02 21:34                                   ` Kenneth Wolcott
2023-07-02 21:40                                   ` Luke A. Guest
2023-07-02 21:59                                     ` Kenneth Wolcott
2023-07-03 12:23                                       ` Luke A. Guest
2023-07-03 19:58                                         ` Kenneth Wolcott
2023-07-03 20:10                                           ` Luke A. Guest
2023-07-03 20:11                                           ` Luke A. Guest
2023-07-03 22:56                                             ` Kenneth Wolcott
2023-07-03 23:01                                               ` Kenneth Wolcott
2023-07-03 23:10                                                 ` Kenneth Wolcott
2023-07-03 23:24                                                   ` Keith Thompson
2023-07-03 23:58                                                     ` Kenneth Wolcott
2023-07-04  9:00                                                       ` Luke A. Guest
2023-07-06 19:37                                                         ` Kenneth Wolcott
2023-07-07  1:23                                                           ` Kenneth Wolcott
2023-07-07  1:25                                                             ` Kenneth Wolcott
2023-07-12  5:43                                                               ` Kenneth Wolcott
2023-07-12  6:01                                                                 ` Kenneth Wolcott
2023-07-12 15:44                                                                   ` Luke A. Guest
2023-07-12 23:09                                                                     ` Kenneth Wolcott [this message]
2023-07-12 23:11                                                                       ` Kenneth Wolcott
2023-07-13 10:59                                                                         ` Luke A. Guest
2023-07-13 14:14                                                                           ` Rod Kay
2023-07-13 15:15                                                                             ` Kenneth Wolcott
2023-07-04  8:59                                                     ` Luke A. Guest
2023-07-04  8:57                                                 ` Luke A. Guest
2023-06-29 21:22               ` Simon Wright
2023-06-29 22:12                 ` Kenneth Wolcott
2023-06-29 19:29             ` Luke A. Guest
2023-06-29 11:33     ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox