Hi Simon;
>I'd recommend taking a copy of /Library/Developer/CommandLineTools
> before updating to 15.0.
Well, I should have done this, but I didn't...
> > It turns out there's an environment variable DEFAULT_LINKER, which with
I tried this (xport DEFAULT_LINKER=/Library/Developer/CommandLineTools/usr/bin/ld-classic) and it did not help:
Using:
/opt/gcc-13.1.0-aarch64/bin/gnatmake --version
GNATMAKE 13.1.0
-- This is from Rosetta Code:
with Ada.Text_IO; use Ada.Text_IO;
procedure Test_Short_Circuit is
function A (Value : Boolean) return Boolean is
begin
Put (" A=" & Boolean'Image (Value));
return Value;
end A;
function B (Value : Boolean) return Boolean is
begin
Put (" B=" & Boolean'Image (Value));
return Value;
end B;
begin
for I in Boolean'Range loop
for J in Boolean'Range loop
Put (" (A and then B)=" & Boolean'Image (A (I) and then B (J)));
New_Line;
end loop;
end loop;
for I in Boolean'Range loop
for J in Boolean'Range loop
Put (" (A or else B)=" & Boolean'Image (A (I) or else B (J)));
New_Line;
end loop;
end loop;
end Test_Short_Circuit;
gnatmake test_short_circuit.adb
gcc -c test_short_circuit.adb
gnatbind -x test_short_circuit.ali
gnatlink test_short_circuit.ali
-macosx_version_min has been renamed to -macos_version_min
ld: warning: ignoring duplicate libraries: '-lgcc'
0 0x10306b648 __assert_rtn + 72
1 0x102f9ffac ld::AtomPlacement::findAtom(unsigned char, unsigned long long, ld::AtomPlacement::AtomLoc const*&, long long&) const + 1204
2 0x102fb5924 ld::InputFiles::SliceParser::parseObjectFile(mach_o::Header const*) const + 15164
3 0x102fc304c ld::InputFiles::parseAllFiles(void (ld::AtomFile const*) block_pointer)::$_7::operator()(unsigned long, ld::FileInfo const&) const + 960
4 0x18e36d950 _dispatch_client_callout2 + 20
5 0x18e3821a4 _dispatch_apply_invoke_and_wait + 176
6 0x18e381464 _dispatch_apply_with_attr_f + 1176
7 0x18e381650 dispatch_apply + 96
8 0x10303d3b8 ld::AtomFileConsolidator::parseFiles(bool) + 292
9 0x102fde170 main + 9048
ld: Assertion failed: (resultIndex < sectData.atoms.size()), function findAtom, file Relocations.cpp, line 1336.
collect2: error: ld returned 1 exit status
gnatlink: error when calling /opt/gcc-13.1.0-aarch64/bin/gcc
gnatmake: *** link failed.
Are there any other workarounds to solve the inability to link? This does not only adversely affect Ada, but everything that uses a linker, BTW.
Thanks,
Ken Wolcott