comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: ANN: GCC 10.1.0 for macOS
Date: Fri, 04 Dec 2020 14:14:30 +0000	[thread overview]
Message-ID: <lyblf9irp5.fsf@pushface.org> (raw)
In-Reply-To: c3c5a42a-ccbb-4fbd-b35f-c49029789dben@googlegroups.com

Vincent DIEMUNSCH <vincent.diemunsch@gmail.com> writes:

> I just switched to macOS Big Sur, and unfortunately I have troubles
> with GNAT gcc.
> Here is a simple example, but I get the same error compiling from GPS
> using GPRBuild.
>
> % gnatmake controle.adb
> gcc -c controle.adb
> gcc -c crc_type.adb
> gnatbind -x controle.ali
> gnatlink controle.ali
> ld: library not found for -lSystem
> collect2: error: ld returned 1 exit status
> gnatlink: error when calling /opt/gcc/10.1.0/bin/gcc
> gnatmake: *** link failed.

I came across this but managed to forget to do anything about it, very
sorry.

You make remember that at Mojave, & with the inclusion of software
development kits (SDKs) for different targets such as iPhone, Apple
Watch, Apple decided not to include the system C headers in
/usr/include; their own compilers know where to find them inside the
SDKs, a problem which I addressed at [1] & [2].

With Big Sur they've done the same for system libraries, which you'd
have expected to find in /usr/lib.

I don't have Big Sur running on this box at the moment (it's the only
one I own that can!), so can't test this, but the workround I found was
to say, assuming you have Xcode & not the Command Line Tools installed,

  gnatmake controle.adb -largs
  -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib

(wow)

You're most welcome to raise an issue at [2].

[1]
https://forward-in-code.blogspot.com/2019/06/macos-software-development-kit-changes.html
[2] https://github.com/simonjwright/macos-sdks-vs-gcc

  reply	other threads:[~2020-12-04 14:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 12:47 ANN: GCC 10.1.0 for macOS Simon Wright
2020-05-16 15:12 ` Bill Findlay
2020-05-16 17:27   ` Simon Wright
2020-12-04  9:31 ` Vincent DIEMUNSCH
2020-12-04 14:14   ` Simon Wright [this message]
2020-12-04 14:25     ` Luke A. Guest
2020-12-04 14:41       ` 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