GCC 14.1.0-1 for macOS

Native, arm-eabi and risc64-elf compilers here.

5 Likes

Have you run into any issues building AWS with GCC 14.1.0 on MacOS aarch64?

1 Like

Personally, no, but that’s because I haven’t tried. Are you having trouble?

Yes.

With gcc-13.2.0-aarch64 I’m able to build AWS (and everything else I’ve tried to build) using any of the available methods from Alire (alr get aws; alr with aws; alr install aws).

When I try to build AWS (aws in particular–everything else seems fine), it fails while running post-fetch actions. Specifically, it breaks in aws-os_lib-tmplt.c “Setup OS specific definitions.”

✓ pawstest initialized successfully.                                  
PreferredUser@PreferredUsers-MacBook-Pro aws14test % cd pawstest 
PreferredUser@PreferredUsers-MacBook-Pro pawstest % ls
alire		alire.toml	config		pawstest.gpr	share		src
PreferredUser@PreferredUsers-MacBook-Pro pawstest % alr with aws
Requested changes:                                                                                           

   ✓ aws ^24.0.0 (add)
                            
Changes to dependency solution:

   +   aws      24.0.0 (new)
   +📦 gnat     14.1.0 (new,gnat_external,indirect,executable in path)
   +   gnatcoll 24.0.0 (new,indirect)
   +   libgpr   24.0.0 (new,indirect)
   +📦 make     4.4.1  (new,indirect,system package)
   +📦 openssl  3.3.1  (new,indirect,system package)
   +   xmlada   24.0.0 (new,indirect)

Do you want to proceed?
[Y] Yes  [N] No  (default is Yes) y

PreferredUser@PreferredUsers-MacBook-Pro pawstest % alr build
ⓘ Running post-fetch actions for aws=24.0.0...                               
Bind
   [gprbind]      xoscons.bexch
   [Ada]          xoscons.ali
Link
   [link]         xoscons.adb
Setup OS specific definitions
aws-os_lib-tmplt.c:324:24: error: invalid operand for inline asm constraint 'i'
/*NOGEN*/ asm volatile("\n->CND:%0:" "SIN_FAMILY_OFFSET" ":%1:" "sin_family offset in record" : : "i" (324), "i" ((int) (uintptr_t)((uintptr_t)&sa.sin_family - (uintptr_t)&sa)));;
                       ^
aws-os_lib-tmplt.c:343:24: error: invalid operand for inline asm constraint 'i'
/*NOGEN*/ asm volatile("\n->CND:%0:" "AI_FAMILY_OFFSET" ":%1:" "???" : : "i" (343), "i" ((int) (uintptr_t)((uintptr_t)&ai.ai_family - (uintptr_t)&ai)));;
                       ^
aws-os_lib-tmplt.c:344:24: error: invalid operand for inline asm constraint 'i'
/*NOGEN*/ asm volatile("\n->CND:%0:" "AI_CANONNAME_OFFSET" ":%1:" "???" : : "i" (344), "i" ((int) (uintptr_t)((uintptr_t)&ai.ai_canonname - (uintptr_t)&ai)));;
                       ^
aws-os_lib-tmplt.c:345:24: error: invalid operand for inline asm constraint 'i'
/*NOGEN*/ asm volatile("\n->CND:%0:" "AI_ADDR_OFFSET" ":%1:" "???" : : "i" (345), "i" ((int) (uintptr_t)((uintptr_t)&ai.ai_addr - (uintptr_t)&ai)));;
                       ^
aws-os_lib-tmplt.c:233:17: error: unexpected token at start of statement
asm volatile("\n->TXT:%0:" "--  This is the version for " "arm64-apple-darwin23.5.0" : : "i" (233));
                ^
<inline asm>:2:1: note: instantiated into assembly here
->TXT:233:--  This is the version for arm64-apple-darwin23.5.0
^
aws-os_lib-tmplt.c:234:17: error: unexpected token at start of statement
asm volatile("\n->TXT:%0:" "" : : "i" (234));
                ^
<inline asm>:2:1: note: instantiated into assembly here
->TXT:234:
^
aws-os_lib-tmplt.c:240:17: error: unexpected token at start of statement
asm volatile("\n->TXT:%0:" "with Interfaces.C.Strings;" : : "i" (240));
                ^
<inline asm>:2:1: note: instantiated into assembly here
->TXT:240:with Interfaces.C.Strings;
^
aws-os_lib-tmplt.c:241:17: error: unexpected token at start of statement
asm volatile("\n->TXT:%0:" "with System;" : : "i" (241));
                ^
<inline asm>:2:1: note: instantiated into assembly here
->TXT:241:with System;
^
aws-os_lib-tmplt.c:243:17: error: unexpected token at start of statement
asm volatile("\n->TXT:%0:" "with GNAT.OS_Lib;" : : "i" (243));
                ^
<inline asm>:2:1: note: instantiated into assembly here
->TXT:243:with GNAT.OS_Lib;
^
aws-os_lib-tmplt.c:272:17: error: unexpected token at start of statement
asm volatile("\n->C:%0:" "Target_OS" ":" "OS_Type" ":" "Other_OS" ":" "" : : "i" (272));
                ^
<inline asm>:2:1: note: instantiated into assembly here
->C:272:Target_OS:OS_Type:Other_OS:
^
aws-os_lib-tmplt.c:281:17: error: unexpected token at start of statement
asm volatile("\n->C:%0:" "Target_Name" ":" "String" ":" "arm64-apple-darwin23.5.0" ":" "" : : "i" (281));
                ^
<inline asm>:2:1: note: instantiated into assembly here
->C:281:Target_Name:String:arm64-apple-darwin23.5.0:
^
aws-os_lib-tmplt.c:310:17: error: unexpected token at start of statement
asm volatile("\n->CND:%0:" "SIZEOF_unsigned_int" ":%1:" "Size of unsigned int" : : "i" (310), "i" ((int) sizeof (unsigned int)));
                ^
<inline asm>:2:1: note: instantiated into assembly here
->CND:310:SIZEOF_unsigned_int:4:Size of unsigned int
^
aws-os_lib-tmplt.c:313:17: error: unexpected token at start of statement
asm volatile("\n->CND:%0:" "SIZEOF_fd_set" ":%1:" "fd_set" : : "i" (313), "i" ((int) (sizeof (fd_set))));;
                ^
<inline asm>:2:1: note: instantiated into assembly here
->CND:313:SIZEOF_fd_set:128:fd_set
^
aws-os_lib-tmplt.c:314:17: error: unexpected token at start of statement
asm volatile("\n->CND:%0:" "FD_SETSIZE" ":%1:" "Max fd value" : : "i" (314), "i" ((int) 1024));;
                ^
<inline asm>:2:1: note: instantiated into assembly here
->CND:314:FD_SETSIZE:1024:Max fd value
^
aws-os_lib-tmplt.c:320:17: error: unexpected token at start of statement
asm volatile("\n->CND:%0:" "SIZEOF_sin_family" ":%1:" "Size of sa.sin_family" : : "i" (320), "i" ((int) sizeof (sa.sin_family) * 8));;
                ^
<inline asm>:2:1: note: instantiated into assembly here
->CND:320:SIZEOF_sin_family:8:Size of sa.sin_family
^
aws-os_lib-tmplt.c:353:17: error: unexpected token at start of statement
asm volatile("\n->CND:%0:" "SIZEOF_nfds_t" ":%1:" "Size of nfds_t" : : "i" (353), "i" ((int) sizeof (nfds_t) * 8));;
                ^
<inline asm>:2:1: note: instantiated into assembly here
->CND:353:SIZEOF_nfds_t:32:Size of nfds_t
^
aws-os_lib-tmplt.c:362:17: error: unexpected token at start of statement
asm volatile("\n->CND:%0:" "SIZEOF_pollfd_events" ":%1:" "Size of pollfd.events" : : "i" (362), "i" ((int) sizeof (v_pollfd.events) * 8));;
                ^
<inline asm>:2:1: note: instantiated into assembly here
->CND:362:SIZEOF_pollfd_events:16:Size of pollfd.events
^
aws-os_lib-tmplt.c:373:17: error: unexpected token at start of statement
asm volatile("\n->CND:%0:" "SIZEOF_fd_type" ":%1:" "Size of socket fd" : : "i" (373), "i" ((int) sizeof (v_pollfd.fd) * 8));;
                ^
<inline asm>:2:1: note: instantiated into assembly here
->CND:373:SIZEOF_fd_type:32:Size of socket fd
^
aws-os_lib-tmplt.c:381:17: error: unexpected token at start of statement
asm volatile("\n->CND:%0:" "SIZEOF_socklen_t" ":%1:" "Size of socklen_t" : : "i" (381), "i" ((int) sizeof (socklen_t) * 8));;
                ^
<inline asm>:2:1: note: instantiated into assembly here
->CND:381:SIZEOF_socklen_t:32:Size of socklen_t
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
raised raised ADA.IO_EXCEPTIONS.NAME_ERROR : aws-os_lib-tmplt.s: No such file or directory

make[1]: *** [../.build/arm64-apple-darwin23.5.0/debug/../setup/src/aws-os_lib.ads] Error 1
make: *** [config_setup] Error 2
error: Command ["make", "setup", "ZLIB=false", "DEMOS=false", "LAL=false", "XMLADA=false", "SOCKET=openssl", "prefix=install_dir", "PRJ_BUILD=Release"] exited with code 2
PreferredUser@PreferredUsers-MacBook-Pro pawstest %

To test the environment, I built some packages like ‘ews’ and ‘asfml’ and there were no issues. At some point I even removed the Alire files at .local/share/alire and started over, but that didn’t have any positive effect.

PreferredUser@PreferredUsers-MacBook-Pro pawstest % uname -r
23.5.0
PreferredUser@PreferredUsers-MacBook-Pro pawstest % alr toolchain
CRATE              VERSION            STATUS    NOTES                                           
gprbuild           22.0.1             Available                                                 
gprbuild           23.0.3-mac-aarch64 Available                                                 
gprbuild           24.0.1-mac-aarch64 Available                                                 
gprbuild           24.0.1             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gprbuild
gnat_macos_aarch64 13.2.2             Available                                                 
gnat_native        13.2.2             Available                                                 
gnat_external      14.1.0             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gnat    
PreferredUser@PreferredUsers-MacBook-Pro pawstest %

I get this in the post-fetch actions:

$ alr build 2>&1 | tee build-01.log  
Note: Running post-fetch actions for xmlada=24.0.0...
checking build system type... aarch64-apple-darwin23.5.0
checking host system type... aarch64-apple-darwin23.5.0
checking target system type... aarch64-apple-darwin23.5.0
checking whether gnat can build shared libs... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
configure: creating ./config.status
config.status: creating xmlada_shared.gpr
config.status: creating Makefile
config.status: creating tests/dom/default.gpr
Note: Running post-fetch actions for aws=24.0.0...
sed: illegal option -- s
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
sed: illegal option -- s
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Bind
   [gprbind]      xoscons.bexch
   [Ada]          xoscons.ali
Link
   [link]         xoscons.adb
Setup OS specific definitions
Generating testsuite.tags with: 
!prefix,enable_shared,!zlib,!xmlada,!lal,gnat,ssl,!gnutls,!ssl_dynamic,!ldap,debug,!processors,!target,!thread_sanitizer,!gsoap,!server_http2,client_http2,aarch64-darwin
sed: illegal option -- s
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]

but thereafter it all runs to completion, no failures except, at the very end,

Link
   [link]         gen_gps_ref.adb
sed: illegal option -- s
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Install project AWS - static

which is a little surprising, because that issue was fixed in December.

I’m afraid I don’t understand the assembly inserts in that file (or why it had to be done using assembly inserts, but I’m not the developer). The only approach I can offer (not very much use, I fear) is to report the issue to AdaCore.

Just to clear up any possible issue, what version of Xcode or Command Line Tools are you using? I’m on 15.3.

1 Like

I’m running Xcode 15.4

I ran into the sed: illegal option -- s issue, and I worked around it by using gsed instead.

As for the problem with AWS, I found the issue after thinking about your response and looking back through the Makefile:

ifeq ($(IS_CROSS), true)
	( cd $(SDIR)/src; \
		$(TARGET)-gcc -C -E -DTARGET=\"$(TARGET)\" aws-os_lib-tmplt.c  \
			> aws-os_lib-tmplt.i; \
		$(TARGET)-gcc -S aws-os_lib-tmplt.i; \
		../xoscons aws-os_lib )
else
	( cd $(SDIR)/src; \
		gcc -C -E -DTARGET=\"$(TARGET)\" aws-os_lib-tmplt.c  \
			> aws-os_lib-tmplt.i; \
		gcc -S aws-os_lib-tmplt.i; \
		../xoscons aws-os_lib )
endif
	$(RM) -f $(SDIR)/src/aws-os_lib-tmplt*
endif

In my .zshrc I had export PATH=/opt/gcc-14.1.0-aarch64/bin:$PATH, because at some point in troubleshooting another issue, I had added it. After commenting it out, I’m now able to build AWS with no issues at all.

Thanks for your help.

I think I was the archetypal Cardboard Programmer here, because I don’t see how that would change things, or what we could not do to avoid similar issues in future!

Fortunately I left the terminal window open. It seems that I thought it was working because, although I had set the toolchain correctly, I hadn’t run alr update before re-building :man_facepalming:

So I put the export PATH=/opt/gcc-14.1.0-aarch64/bin:$PATH back, created a new project with alr get aws and the 14.1 toolchain enabled

CRATE              VERSION            STATUS    NOTES                                           
gprbuild           22.0.1             Available                                                 
gprbuild           23.0.3-mac-aarch64 Available                                                 
gprbuild           24.0.1-mac-aarch64 Available                                                 
gprbuild           24.0.1             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gprbuild
gnat_macos_aarch64 13.2.2             Available                                                 
gnat_native        13.2.2             Available                                                 
gnat_external      14.1.0             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gnat

Now, when I run alr build, the original issue has disappeared, but there’s another error:


PreferredUser@PreferredUsers-MacBook-Pro aws_24.0.0_2b75fe6d % alr build
ⓘ Running post-fetch actions for aws=24.0.0...                               
gprbuild: "xoscons" up to date
Setup OS specific definitions
Can not generate system tags. The test are disabled
Bind
   [gprbind]      awsres.bexch
   [Ada]          awsres.ali
Link
   [link]         awsres.adb
AWSRes - Resource Creator v1.3

creating s-main.tadb...
  -> registered
creating s-name-space-pkg.tads.
  -> registered
creating s-root.tads..
  -> registered
creating s-skel-cb.tadb....
  -> registered
creating s-skel-cb.tads.
  -> registered
creating s-skel.tadb....................
  -> registered
creating s-skel.tads...
  -> registered
creating s-stub-types.tads.
  -> registered
creating s-stub.tadb................
  -> registered
creating s-stub.tads.....
  -> registered
creating s-type-array-types.tads......
  -> registered
creating s-type-array.tads...............
  -> registered
creating s-type-derived-types.tads.......
  -> registered
creating s-type-derived.tads..........
  -> registered
creating s-type-enum-types.tads..
  -> registered
creating s-type-enum.tadb.
  -> registered
creating s-type-enum.tads....
  -> registered
creating s-type-record-types.tads...
  -> registered
creating s-type-record.tadb.......................
  -> registered
creating s-type-record.tads.......
  -> registered
creating s-types.tadb.
  -> registered
creating s-types.tads...
  -> registered
creating s-common.macros......
  -> registered
shared.gpr:55:04: value "cross-static" is illegal for typed string "library_type"
gprbuild: "aws.gpr" processing failed
make: *** [build-libs-cross-static] Error 5
error: Command ["make", "all", "ENABLE_SHARED=false"] exited with code 2

I have run into this before with AWS, and I couldn’t tell whether it was me, my environment, or the code.

Since it works for you, I suspect that something is wrong with my environment–but it’s odd that everything else is working OK. I’ll keep trying.

It’s working now.

I’ll explain what I had to do, in case it’s helpful to someone else in the future.

TL;DR


I used symlinks to make the Makefile use the gcc set in the Alire toolchain instead of /usr/bin, and gmake instead of make. Now I can build and use AWS with gcc-14.1.0-aarch64.


Even though /opt/gcc-14.1.0-aarch64 is the the path, running which gcc returned /usr/bin/gcc. It’s not like I didn’t notice this long ago–I just didn’t think it mattered, since I wasn’t having issues with anything in 13.2.2.

I took another look at the Makefile and decided to try making a symlink between the gcc and g++ in /opt/gcc-14.1.0-aarch64/bin and /opt/Homebrew/bin. After doing it, I tried to build again (in new terminal) to get & build aws, and it the build completed without errors.

alr get aws

daw4@daw4s-MacBook-Pro aws3times % alr get aws
ⓘ Deploying aws=24.0.0...                                                
####################################################################################################################################################################### 100.0%

aws=24.0.0 successfully retrieved.
Dependencies were solved as follows:                                                                  

   +📦 gnat     14.1.0 (new,gnat_external,executable in path)
   +   gnatcoll 24.0.0 (new)
   +   libgpr   24.0.0 (new,indirect)
   +📦 make     4.4.1  (new,system package)
   +📦 openssl  3.3.1  (new,system package)
   +   xmlada   24.0.0 (new)

daw4@daw4s-MacBook-Pro aws3times % cd aws_24.0.0_2b75fe6d 
daw4@daw4s-MacBook-Pro aws_24.0.0_2b75fe6d % alr toolchain
CRATE              VERSION            STATUS    NOTES                                           
gprbuild           22.0.1             Available                                                 
gprbuild           23.0.3-mac-aarch64 Available                                                 
gprbuild           24.0.1-mac-aarch64 Available                                                 
gprbuild           24.0.1             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gprbuild
gnat_macos_aarch64 13.2.2             Available                                                 
gnat_native        13.2.2             Available                                                 
gnat_external      14.1.0             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gnat    
daw4@daw4s-MacBook-Pro aws_24.0.0_2b75fe6d % alr build
ⓘ Running post-fetch actions for aws=24.0.0...                               
Bind
   [gprbind]      xoscons.bexch
   [Ada]          xoscons.ali
Link
   [link]         xoscons.adb
Setup OS specific definitions
Can not generate system tags. The test are disabled
Setup
   [mkdir]        object directory for project Zlib
   [mkdir]        library directory for project Zlib
   [mkdir]        object directory for project Include
   [mkdir]        library directory for project Include
   [mkdir]        object directory for project SSL
   [mkdir]        library directory for project SSL
   [mkdir]        object directory for project Src
   [mkdir]        library directory for project Src
   [mkdir]        library directory for project AWS
   [mkdir]        object directory for project Tools
   [mkdir]        exec directory for project Tools
Compile
   [Ada]          awsres.adb
   [Ada]          zlib-streams.adb
   [Ada]          zlib-thin.adb
   [Ada]          memory_streams.adb
   [Ada]          zlib.adb
   [Ada]          aws-os_lib.ads
   [Ada]          templates_parser.adb
   [Ada]          templates_parser-debug.adb
   [Ada]          templates_parser-utils.adb
   [Ada]          templates_parser-query.adb
   [Ada]          aws-http2-frame.adb
   [Ada]          aws-http2-message-list.ads
   [Ada]          aws-http2-stream-set.ads
   [Ada]          aws-http2-frame-settings.adb
   [Ada]          aws-http2-frame-priority.adb
   [Ada]          aws-http2-frame-headers.adb
   [Ada]          aws-http2.adb
   [Ada]          aws-http2-frame-push_promise.adb
   [Ada]          aws-http2-hpack-huffman.adb
   [Ada]          aws-http2-frame-rst_stream.adb
   [Ada]          aws-http2-frame-list.ads
   [Ada]          aws-http2-hpack.adb
   [Ada]          aws-http2-connection.adb
   [Ada]          aws-http2-frame-window_update.adb
   [Ada]          aws-http2-frame-goaway.adb
   [Ada]          aws-http2-hpack-table.adb
   [Ada]          aws-http2-message.adb
   [Ada]          aws-http2-frame-data.adb
   [Ada]          aws-http2-stream.adb
   [Ada]          aws-http2-frame-ping.adb
   [Ada]          aws-http2-frame-continuation.adb
   [Ada]          aws-services-dispatchers.ads
   [Ada]          aws-services-web_block-context.adb
   [Ada]          aws-services-split_pages-alpha.adb
   [Ada]          aws-services-dispatchers-method.adb
   [Ada]          aws-smtp-server.adb
   [Ada]          aws-communication.adb
   [Ada]          aws-client-hotplug.adb
   [Ada]          aws-cookie.adb
   [Ada]          aws-resources-streams-pipe.adb
   [Ada]          aws-services-split_pages-uniform-overlapping.adb
   [Ada]          aws-status-translate_table.adb
   [Ada]          aws-smtp-messages-set.adb
   [Ada]          aws-services-dispatchers-virtual_host.adb
   [Ada]          aws-server-hotplug.adb
   [Ada]          aws-services-dispatchers-transient_pages.adb
   [Ada]          aws-services-callbacks.adb
   [Ada]          aws-net-log-callbacks.adb
   [Ada]          aws-services-split_pages-alpha-bounded.adb
   [Ada]          aws-communication-server.adb
   [Ada]          aws-services-dispatchers-timer.adb
   [Ada]          aws-services-web_block.ads
   [Ada]          aws-services-split_pages-uniform-alpha.adb
   [Ada]          aws-services-split_pages-shared.adb
   [Ada]          aws-services-web_block-registry.adb
   [Ada]          aws-net-sets.ads
   [Ada]          aws-services-download.adb
   [Ada]          aws-communication-client.adb
   [Ada]          aws-services-dispatchers-uri.adb
   [Ada]          aws-pop.adb
   [Ada]          aws-services-directory.adb
   [Ada]          aws-smtp-authentication-plain.adb
   [Ada]          aws-smtp-authentication.ads
   [Ada]          aws-smtp.adb
   [Ada]          aws-smtp-client.adb
   [Ada]          aws-services-split_pages-uniform.adb
   [Ada]          aws-services-split_pages.adb
   [Ada]          aws-services-dispatchers-linker.adb
   [Ada]          aws-smtp-messages.adb
   [Ada]          aws-services-web_mail.adb
   [Ada]          aws-services-page_server.adb
   [Ada]          aws-net-stream_io.adb
   [Ada]          aws-server-push.adb
   [Ada]          aws-net-websocket-protocol.ads
   [Ada]          aws-session-control.adb
   [Ada]          aws-net-websocket-handshake_error.adb
   [Ada]          aws-resources-streams-disk-once.adb
   [Ada]          aws-response-set.adb
   [Ada]          aws-config.adb
   [Ada]          aws-client-http_utils.adb
   [Ada]          aws-resources-streams-disk.adb
   [Ada]          aws-containers-tables.adb
   [Ada]          aws-containers-memory_streams.ads
   [Ada]          aws-containers-tables-set.ads
   [Ada]          aws-containers.ads
   [Ada]          aws-resources-streams-zlib.adb
   [Ada]          aws-net-poll_events.adb
   [Ada]          aws-headers-set.adb
   [Ada]          aws-net-buffered.adb
   [Ada]          aws-server-log.adb
   [Ada]          aws-dispatchers-callback.adb
   [Ada]          aws-headers.adb
   [Ada]          aws-config-set.adb
   [Ada]          aws-resources-streams.adb
   [Ada]          aws-server.adb
   [Ada]          aws-headers-values.adb
   [Ada]          aws-resources.adb
   [Ada]          aws-services-transient_pages-control.adb
   [Ada]          aws-server-status.adb
   [Ada]          aws-default.ads
   [Ada]          aws-net-ssl-rsa_dh_generators.adb
   [Ada]          aws-utils-streams.adb
   [Ada]          aws-templates.ads
   [Ada]          aws-response.adb
   [Ada]          aws-exceptions.ads
   [Ada]          aws-containers-string_vectors.ads
   [Ada]          aws-translator.adb
   [Ada]          aws-hotplug-get_status.adb
   [Ada]          aws-session.adb
   [Ada]          aws-containers-key_value.ads
   [Ada]          aws-url-set.adb
   [Ada]          aws-resources-streams-memory.adb
   [Ada]          aws-server-get_status.adb
   [Ada]          aws-config-utils.adb
   [Ada]          aws-attachments.adb
   [Ada]          aws-resources-files.adb
   [Ada]          aws-status-translate_set.adb
   [Ada]          aws-utils.adb
   [Ada]          aws-server-context.ads
   [Ada]          aws-client.adb
   [Ada]          aws-net-poll_events-g_poll.adb
   [Ada]          aws-url.adb
   [Ada]          aws-net-acceptors.adb
   [Ada]          aws-net-websocket-registry-utils.adb
   [Ada]          aws-net-log.adb
   [Ada]          aws-net-websocket-protocol-draft76.adb
   [Ada]          aws-net-websocket.adb
   [Ada]          aws-digest.adb
   [Ada]          aws-config-ini.adb
   [Ada]          aws-net.adb
   [Ada]          aws-parameters-set.adb
   [Ada]          aws-net-generic_sets.adb
   [Ada]          aws-hotplug.adb
   [Ada]          aws-status-set.adb
   [Ada]          aws-net-websocket-registry.adb
   [Ada]          aws-messages.adb
   [Ada]          aws-url-raise_url_error.adb
   [Ada]          aws-mime.adb
   [Ada]          aws-resources-embedded.adb
   [Ada]          aws.ads
   [Ada]          aws-log.adb
   [Ada]          aws-net-ssl-certificate.adb
   [Ada]          aws-parameters.adb
   [Ada]          aws-services.ads
   [Ada]          aws-server-http_utils.adb
   [Ada]          aws-net-websocket-protocol-rfc6455.adb
   [Ada]          aws-net-websocket-registry-control.adb
   [Ada]          aws-services-transient_pages.adb
   [Ada]          aws-net-memory.adb
   [Ada]          aws-resources-streams-memory-zlib.adb
   [Ada]          aws-status.adb
   [Ada]          aws-dispatchers.adb
   [Ada]          templates_parser-input__aws.adb
   [Ada]          templates_parser_tasking__standard_tasking.adb
   [Ada]          aws-net-std__gnat.adb
   [Ada]          aws-net-ssl__openssl.adb
   [Ada]          aws-net-ssl-certificate-impl__openssl.adb
   [Ada]          templates_parser-configuration__aws.ads
   [C]            wrappers.c
   [Ada]          ssl.ads
   [Ada]          ssl-thin__openssl.ads
   [C]            adler32.c
   [C]            inffast.c
   [C]            gzclose.c
   [C]            trees.c
   [C]            gzwrite.c
   [C]            uncompr.c
   [C]            inftrees.c
   [C]            gzlib.c
   [C]            zutil.c
   [C]            infback.c
   [C]            crc32.c
   [C]            gzread.c
   [C]            deflate.c
   [C]            compress.c
   [C]            inflate.c
Build Libraries
   [gprlib]       z.lexch
   [gprlib]       aws_ssl.lexch
   [gprlib]       aws.lexch
   [archive]      libz.a
   [archive]      libaws_ssl.a
   [index]        libaws_ssl.a
   [index]        libz.a
   [archive]      libaws.a
   [index]        libaws.a
Bind
   [gprbind]      awsres.bexch
   [Ada]          awsres.ali
Link
   [link]         awsres.adb
AWSRes - Resource Creator v1.3

creating s-main.tadb...
  -> registered
creating s-name-space-pkg.tads.
  -> registered
creating s-root.tads..
  -> registered
creating s-skel-cb.tadb....
  -> registered
creating s-skel-cb.tads.
  -> registered
creating s-skel.tadb....................
  -> registered
creating s-skel.tads...
  -> registered
creating s-stub-types.tads.
  -> registered
creating s-stub.tadb................
  -> registered
creating s-stub.tads.....
  -> registered
creating s-type-array-types.tads......
  -> registered
creating s-type-array.tads...............
  -> registered
creating s-type-derived-types.tads.......
  -> registered
creating s-type-derived.tads..........
  -> registered
creating s-type-enum-types.tads..
  -> registered
creating s-type-enum.tadb.
  -> registered
creating s-type-enum.tads....
  -> registered
creating s-type-record-types.tads...
  -> registered
creating s-type-record.tadb.......................
  -> registered
creating s-type-record.tads.......
  -> registered
creating s-types.tadb.
  -> registered
creating s-types.tads...
  -> registered
creating s-common.macros......
  -> registered
Compile
   [Ada]          aws_password.adb
   [Ada]          templates2ada.adb
   [Ada]          webxref.adb
   [Ada]          templatespp.adb
Bind
   [gprbind]      awsres.bexch
   [Ada]          awsres.ali
   [gprbind]      aws_password.bexch
   [Ada]          aws_password.ali
   [gprbind]      templates2ada.bexch
   [Ada]          templates2ada.ali
   [gprbind]      webxref.bexch
   [Ada]          webxref.ali
   [gprbind]      templatespp.bexch
   [Ada]          templatespp.ali
Link
   [link]         awsres.adb
   [link]         aws_password.adb
   [link]         templates2ada.adb
   [link]         webxref.adb
   [link]         templatespp.adb
Setup
   [mkdir]        object directory for project GPS_Support
   [mkdir]        exec directory for project GPS_Support
Compile
   [Ada]          gen_gps_ref.adb
Bind
   [gprbind]      gen_gps_ref.bexch
   [Ada]          gen_gps_ref.ali
Link
   [link]         gen_gps_ref.adb
Install project AWS - static
warning: file does not exist '/users/daw4/documents/localcodehole/ada/aws14test/temp/aws3times/aws_24.0.0_2b75fe6d/templates_parser/docs/build/latex/*.pdf'
warning: file does not exist '/users/daw4/documents/localcodehole/ada/aws14test/temp/aws3times/aws_24.0.0_2b75fe6d/templates_parser/docs/build/html'
warning: file does not exist '/users/daw4/documents/localcodehole/ada/aws14test/temp/aws3times/aws_24.0.0_2b75fe6d/docs/build/latex/*.pdf'
warning: file does not exist '/users/daw4/documents/localcodehole/ada/aws14test/temp/aws3times/aws_24.0.0_2b75fe6d/docs/build/html'
Install project Tools - static
ⓘ Building aws=24.0.0/install_dir/share/gpr/aws.gpr...
✓ Build finished successfully in 23.89 seconds.

I checked alr install and was working too.

alr install aws

daw4@daw4s-MacBook-Pro aws3times % alr install aws
ⓘ Computing solutions...
✓ Installation targets fully solved                                                                          
ⓘ Starting deployment of aws=24.0.0 to fulfill aws* with solution:
   Dependencies (solution):
      aws=24.0.0
      gnat=14.1.0 (gnat_external)
      gnatcoll=24.0.0
      libgpr=24.0.0
      make=4.4.1
      openssl=3.3.1
      xmlada=24.0.0
ⓘ Deploying aws=24.0.0...
################################################################################################################################## 100.0%
ⓘ Starting installation of aws=24.0.0...
ⓘ Building xmlada=24.0.0/distrib/xmlada.gpr (1/6)...                         
ⓘ Building xmlada=24.0.0/dom/xmlada_dom.gpr (2/6)...
Compile
   [Ada]          input_sources-http.adb
   [Ada]          input_sources-socket.adb
   [Ada]          input_sources-file.adb
...
...
Install project Tools - static
ⓘ Building aws=24.0.0/install_dir/share/gpr/aws.gpr...
ⓘ Skipping gnat_external=14.1.0 without project files...
ⓘ Skipping make=4.4.1 without project files...
ⓘ Skipping openssl=3.3.1 without project files...
ⓘ Skipping already installed xmlada=24.0.0/distrib/xmlada.gpr...
ⓘ Skipping already installed xmlada=24.0.0/dom/xmlada_dom.gpr...
ⓘ Skipping already installed xmlada=24.0.0/sax/xmlada_sax.gpr...
ⓘ Skipping already installed xmlada=24.0.0/input_sources/xmlada_input.gpr...
ⓘ Skipping already installed xmlada=24.0.0/schema/xmlada_schema.gpr...
ⓘ Skipping already installed xmlada=24.0.0/unicode/xmlada_unicode.gpr...
ⓘ Installing libgpr=24.0.0/gpr/gpr.gpr...
ⓘ Skipping already installed gnatcoll=24.0.0/gnatcoll.gpr...
ⓘ Installing aws=24.0.0/install_dir/share/gpr/aws.gpr...
✓ Install to /Users/daw4/.alire finished successfully in 44.14 seconds.

Last thing to test was with aws, and it still didn’t work.

daw4@daw4s-MacBook-Pro temp % 
daw4@daw4s-MacBook-Pro temp % cd bar
daw4@daw4s-MacBook-Pro bar % ls
alire		alire.toml	bar.gpr		config		share		src
daw4@daw4s-MacBook-Pro bar % alr with aws
Requested changes:                                                                                           

   ✓ aws ^24.0.0 (add)
                            
Changes to dependency solution:

   +   aws      24.0.0 (new)
   +📦 gnat     14.1.0 (new,gnat_external,indirect,executable in path)
   +   gnatcoll 24.0.0 (new,indirect)
   +   libgpr   24.0.0 (new,indirect)
   +📦 make     4.4.1  (new,indirect,system package)
   +📦 openssl  3.3.1  (new,indirect,system package)
   +   xmlada   24.0.0 (new,indirect)

Do you want to proceed?
[Y] Yes  [N] No  (default is Yes) 
Using default: Yes
daw4@daw4s-MacBook-Pro bar % alr build
ⓘ Running post-fetch actions for aws=24.0.0...                               
gprbuild: "xoscons" up to date
Setup OS specific definitions
/bin/sh: arm64-apple-darwin23.5.0-gcc: command not found
/bin/sh: arm64-apple-darwin23.5.0-gcc: command not found
raised raised ADA.IO_EXCEPTIONS.NAME_ERROR : aws-os_lib-tmplt.s: No such file or directory

make[1]: *** [../.build/arm64-apple-darwin23.5.0/debug/../setup/src/aws-os_lib.ads] Error 1
make: *** [config_setup] Error 2
error: Command ["make", "setup", "ZLIB=false", "DEMOS=false", "LAL=false", "XMLADA=false", "SOCKET=openssl", "prefix=install_dir", "PRJ_BUILD=Release"] exited with code 2
daw4@daw4s-MacBook-Pro bar %

This time I made a symlink between /opt/Homebrew/bin/gmake and /opt/Homebrew/bin/make, and tested again in a new terminal and the build completed.

✓ test initialized successfully.                                      
daw4@daw4s-MacBook-Pro tmp % 
daw4@daw4s-MacBook-Pro tmp % cd tst
cd: no such file or directory: tst
daw4@daw4s-MacBook-Pro tmp % cd tst
cd: no such file or directory: tst
daw4@daw4s-MacBook-Pro tmp % cd test
daw4@daw4s-MacBook-Pro test % ls
alire		config		src
alire.toml	share		test.gpr
daw4@daw4s-MacBook-Pro test % alr build
ⓘ Building test=0.1.0-dev/test.gpr...                                 
Setup
   [mkdir]        object directory for project Test
   [mkdir]        exec directory for project Test
Compile
   [Ada]          test.adb
Bind
   [gprbind]      test.bexch
   [Ada]          test.ali
Link
   [link]         test.adb
✓ Build finished successfully in 1.04 seconds.

daw4@daw4s-MacBook-Pro test % alr toolchain
CRATE              VERSION            STATUS    NOTES                                           
gprbuild           22.0.1             Available                                                 
gprbuild           23.0.3-mac-aarch64 Available                                                 
gprbuild           24.0.1-mac-aarch64 Available                                                 
gprbuild           24.0.1             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gprbuild
gnat_macos_aarch64 13.2.2             Available                                                 
gnat_native        13.2.2             Available                                                 
gnat_external      14.1.0             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gnat    
daw4@daw4s-MacBook-Pro test % alr with aws
                                                                                ◷ Solving dependencies: 0/0/0/1 (complete/partial/dupes/states)... Looking for e                                                                                ◷ Solving dependencies: 0/0/0/1 (complete/partial/dupes/states)... Looking for e                                                                                ◷ Solving dependencies: 0/0/0/1 (complete/partial/dupes/states)... Looking for e                                                                                                                                                                ◷ Solving dependencies: 0/0/0/11 (complete/partial/dupes/states)... Looking for                                                                                 ◷ Solving dependencies: 0/0/0/11 (complete/partial/dupes/states)... Looking for                                                                                 Requested changes:                                                    

   ✓ aws ^24.0.0 (add)
                            
Changes to dependency solution:

   +   aws      24.0.0 (new)
   +📦 gnat     14.1.0 (new,gnat_external,indirect,executable in path)
   +   gnatcoll 24.0.0 (new,indirect)
   +   libgpr   24.0.0 (new,indirect)
   +📦 make     4.4.1  (new,indirect,system package)
   +📦 openssl  3.3.1  (new,indirect,system package)
   +   xmlada   24.0.0 (new,indirect)

Do you want to proceed?
[Y] Yes  [N] No  (default is Yes) 
Using default: Yes
daw4@daw4s-MacBook-Pro test % alr build
ⓘ Building test=0.1.0-dev/test.gpr...                                        
Bind
   [gprbind]      test.bexch
   [Ada]          test.ali
Link
   [link]         test.adb
✓ Build finished successfully in 0.74 seconds.

daw4@daw4s-MacBook-Pro test % ls
alire		alire.toml	bin		config		obj		share		src		test.gpr
daw4@daw4s-MacBook-Pro test % alr with
Dependencies (direct):                           
   aws^24.0.0
daw4@daw4s-MacBook-Pro test % alr build
ⓘ Building test=0.1.0-dev/test.gpr...                                        
gprbuild: "test" up to date
✓ Build finished successfully in 0.60 seconds.

daw4@daw4s-MacBook-Pro test % code .
daw4@daw4s-MacBook-Pro test % alr toolchain
CRATE              VERSION            STATUS    NOTES                                           
gprbuild           22.0.1             Available                                                 
gprbuild           23.0.3-mac-aarch64 Available                                                 
gprbuild           24.0.1-mac-aarch64 Available                                                 
gprbuild           24.0.1             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gprbuild
gnat_macos_aarch64 13.2.2             Available                                                 
gnat_native        13.2.2             Available                                                 
gnat_external      14.1.0             Default   Detected at /opt/gcc-14.1.0-aarch64/bin/gnat    
daw4@daw4s-MacBook-Pro test % which make
/opt/Homebrew/bin/make
daw4@daw4s-MacBook-Pro test % which gcc
/opt/Homebrew/bin/gcc

which gcc really shouldn’t return /usr/bin/gcc.

I’ve always set GNAT first on the PATH, or at any rate before anything else that could look remotely like a C/C++/Ada compiler.

At present my PATH, s/:/:\n/g, is

/Users/simon/Library/Python/3.9/bin:
/Library/Frameworks/Python.framework/Versions/3.9/bin:
/opt/gcc-14.1.0-1-aarch64/bin:
/opt/homebrew/bin:
/opt/homebrew/sbin:
/usr/local/bin:
/System/Cryptexes/App/usr/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:
/opt/X11/bin:
/Library/Apple/usr/bin:
/usr/local/MacGPG2/bin:
/Library/TeX/texbin:
/Users/simon/bin:
/Users/simon/.alire/bin:
/Users/simon/local/bin

which I can’t hold up as a shining example; it has a lot in it that I don’t understand (e.g. all those *cryptexd* bits…)

1 Like