From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!0nYzhFpEeoH2MFWixtUlcg.user.gioia.aioe.org.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ANN: GCC 10.1.0 for macOS Date: Fri, 04 Dec 2020 14:14:30 +0000 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: 0nYzhFpEeoH2MFWixtUlcg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:KSTxlgMOpgH6uhIEFfSlAGcah/o= Xref: reader02.eternal-september.org comp.lang.ada:60699 List-Id: Vincent DIEMUNSCH 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