Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 751067

Summary: bootstrap-prefix.sh: !!! unknown compiler on macOS
Product: Gentoo/Alt Reporter: Alexander Bezrukov <phmagic>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: trivial CC: kenneth.hoste, phmagic, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: AMD64   
OS: OS X   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=751037
https://bugs.gentoo.org/show_bug.cgi?id=751406
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 755644    
Attachments: Fix for clang-11 version check

Description Alexander Bezrukov 2020-10-24 22:09:17 UTC
I am trying to install Gentoo prefix on MacOS X (Mojave and Catalina). The system is fresh installed and mostly clean (Xcode is obviously an exception).

bootstrap-prefix.sh produces a series of error messages, then fails. I am trying to fix these errors one by one. This reports deals with the following error message:

!!! unknown compiler.

This error happens in function configure_toolchain(). My invocation of 'gcc --version' produces the following output:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

which obviously is slightly different with what the script expects.

The fix is trivial. I will be attaching a patch.

Reproducible: Always

Steps to Reproduce:
1. ./bootstrap-prefix.sh

Actual Results:  
!!! unknown compiler

Expected Results:  
No error message and the version of clang is properly determined.

Obviously I cannot provide 'emerge --info' output.
Comment 1 Alexander Bezrukov 2020-10-24 22:13:20 UTC
Created attachment 668363 [details, diff]
Fix for clang-11 version check

Tested on cleanish MacOS 10.14.6 with Xcode 11.3.1(11C505).
Comment 2 Larry the Git Cow gentoo-dev 2020-10-26 11:50:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c87ecd828f4b4de9ba80c32d3eaf19bfcfc6deea

commit c87ecd828f4b4de9ba80c32d3eaf19bfcfc6deea
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-10-26 11:49:09 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-10-26 11:49:09 +0000

    scripts/bootstrap-prefix.sh: add detection support for newer Apple clang
    
    Thanks Alexander Bezrukov for an initial patch.  I went with a slightly
    different approach, to be a bit more specific and hopefully not match
    something unexpected in the future.
    
    Closes: https://bugs.gentoo.org/751067
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 scripts/bootstrap-prefix.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)