Opened 4 years ago
Closed 4 years ago
#61474 closed defect (invalid)
gmp @6.2.0_1: clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'
Reported by: | pavibhai (Pavan Lanka) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | bigsur | Cc: | |
Port: |
Description (last modified by pavibhai (Pavan Lanka))
I recently upgraded to MacOS BigSur. After the upgrade was completed I tried to install the new MacPorts with the pkg installer for BigSur.
When I try to install ports I get errors.
Warning: The macOS 11.0 SDK does not appear to be installed. Ports may not build correctly. Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'. ---> Fetching archive for gmp ---> Attempting to fetch gmp-6.2.0_1.darwin_20.x86_64.tbz2 from https://packages.macports.org/gmp ---> Attempting to fetch gmp-6.2.0_1.darwin_20.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/gmp/gmp ---> Attempting to fetch gmp-6.2.0_1.darwin_20.x86_64.tbz2 from https://kmq.jp.packages.macports.org/gmp ---> Fetching distfiles for gmp ---> Attempting to fetch gmp-6.2.0.tar.bz2 from https://distfiles.macports.org/gmp ---> Verifying checksums for gmp ---> Extracting gmp ---> Applying patches to gmp ---> Configuring gmp Error: Failed to configure gmp, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/work/gmp-6.2.0/config.log Error: Failed to configure gmp: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port gnupg2 failed lanka-imac:~$ less /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/main.log lanka-imac:~$ less /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/work/gmp-6.2.0/config.log
When I look at the config.log, I have the following:
configure:5847: /usr/bin/clang -isysroot/Library/Developer/CommandLineTools/SDKs /MacOSX.sdk -c conftest.c >&5 clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'
I have attached the config.log to the ticket. I can provide other details as needed. Additionally I keep on seeing this warning
Warning: The macOS 11.0 SDK does not appear to be installed. Ports may not build correctly. Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.
Not sure if these are related, but xcode-select --install tells me that it is already installed.
I have finally tried an uninstall, followed by an install but still get the same error.
Update: I see that macports is looking for the SDK in the location
ll /Library/Developer/CommandLineTools/SDKs/ lrwxr-xr-x 1 root wheel 15 Oct 13 2019 MacOSX.sdk -> MacOSX10.15.sdk drwxr-xr-x 7 root wheel 224 Jul 15 2019 MacOSX10.14.sdk drwxr-xr-x 8 root wheel 256 Aug 29 2019 MacOSX10.15.sdk
How the 11 SDK is in the following location:
ll /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ total 0 drwxr-xr-x 5 root wheel 160 Oct 19 13:33 DriverKit20.0.sdk drwxr-xr-x 7 root wheel 224 Nov 14 21:41 MacOSX.sdk lrwxr-xr-x 1 root wheel 10 Nov 14 21:36 MacOSX11.0.sdk -> MacOSX.sdk
Attachments (1)
Change History (14)
Changed 4 years ago by pavibhai (Pavan Lanka)
Attachment: | config.log added |
---|
comment:1 Changed 4 years ago by pavibhai (Pavan Lanka)
Description: | modified (diff) |
---|
comment:2 Changed 4 years ago by pavibhai (Pavan Lanka)
Description: | modified (diff) |
---|
comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | bigsur added; BigSur clang removed |
---|---|
Summary: | Macports failures with BigSur → gmp @6.2.0_1: clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0' |
Replying to pavibhai:
Warning: The macOS 11.0 SDK does not appear to be installed. Ports may not build correctly. Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.
This is a harmless consequence of what the gmp port does. You can ignore it. Ideally the gmp port would be fixed so that it does not emit this message.
configure:5847: /usr/bin/clang -isysroot/Library/Developer/CommandLineTools/SDKs /MacOSX.sdk -c conftest.c >&5 clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'
What version of clang do you have? Run /usr/bin/clang --version
to find out. I assume it is too old, and that you should upgrade it by installing both Xcode 12.2 and the Xcode 12.2 version of the command line tools.
comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to pavibhai:
ll /Library/Developer/CommandLineTools/SDKs/ lrwxr-xr-x 1 root wheel 15 Oct 13 2019 MacOSX.sdk -> MacOSX10.15.sdk drwxr-xr-x 7 root wheel 224 Jul 15 2019 MacOSX10.14.sdk drwxr-xr-x 8 root wheel 256 Aug 29 2019 MacOSX10.15.sdk
That confirms that your command line tools are too old for Big Sur and need to be updated.
comment:5 Changed 4 years ago by kencu (Ken)
If you open Xcode.app, it will usually offer to upgrape the command line tools if they are out of date.
It's a very easy thing to try, and I find this works after an Xcode update even when Software Update isn't showing that the CLTs are out of date.
comment:6 Changed 4 years ago by pavibhai (Pavan Lanka)
I have the latest XCode 12 installed along with the updated command line tools.
As I mentioned I think the location of the sdk has changed with BigSur. I see the following here:
ll /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ total 0 drwxr-xr-x 5 root wheel 160 Oct 19 13:33 DriverKit20.0.sdk drwxr-xr-x 7 root wheel 224 Nov 14 21:41 MacOSX.sdk lrwxr-xr-x 1 root wheel 10 Nov 14 21:36 MacOSX11.0.sdk -> MacOSX.sdk
Does this mean I just need to figure out how to offer this as the location of the SDK and not what it is picking as /Library/Developer/CommandLineTools/SDKs/?
comment:7 Changed 4 years ago by pavibhai (Pavan Lanka)
/usr/bin/clang --version Apple clang version 12.0.0 (clang-1200.0.32.27) Target: x86_64-apple-darwin20.1.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
comment:8 follow-up: 9 Changed 4 years ago by kencu (Ken)
it hasn't changed...your CLTs are out of date.
Try opening Xcode.
If that doesn't work, and the update doesn't show up in software update, you'll have to get them from Apple's Dev website.
comment:9 follow-up: 13 Changed 4 years ago by pavibhai (Pavan Lanka)
Replying to kencu:
it hasn't changed...your CLTs are out of date.
Try opening Xcode.
If that doesn't work, and the update doesn't show up in software update, you'll have to get them from Apple's Dev website.
I see. I don't get an update notification for the command line tools. Let me try the dev site.
comment:10 follow-up: 12 Changed 4 years ago by mouse07410 (Mouse)
If you open Xcode.app, it will usually offer to upgrape the command line tools if they are out of date.
It looks like Macports is not entirely happy with the command line tools installed via/by Xcode. Macports seems to require CLT that get installed into /Library/Developer/CommandLineTools
by a separate installer that one downloads directly from the Apple Developer site.
I adjust complained about this since time ago in a different ticket.
comment:11 Changed 4 years ago by pavibhai (Pavan Lanka)
After following your guideline @kencu and installing https://developer.apple.com/download/more/?=command%20line%20tools 12.2 version. I am able to move forward without issue.
Thanks
comment:12 Changed 4 years ago by pavibhai (Pavan Lanka)
Replying to mouse07410:
If you open Xcode.app, it will usually offer to upgrape the command line tools if they are out of date.
It looks like Macports is not entirely happy with the command line tools installed via/by Xcode. Macports seems to require CLT that get installed into
/Library/Developer/CommandLineTools
by a separate installer that one downloads directly from the Apple Developer site.I adjust complained about this since time ago in a different ticket.
Yeah same issue with me, after directly installing the command line tools I am able to move forward without this error.
comment:13 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Replying to pavibhai:
I don't get an update notification for the command line tools. Let me try the dev site.
Apple introduced a bug in Catalina (or Mojave?) that deletes the command line tools receipts. See ProblemHotlist#reinstall-clt. Receipts are how software update knows what you had installed so that it can tell you if there is an update. Since Apple removed the CLT receipts, it cannot tell you if an update is available. Apple should fix this bug. I don't know if they have fixed it in Big Sur.
Replying to mouse07410:
It looks like Macports is not entirely happy with the command line tools installed via/by Xcode. Macports seems to require CLT that get installed into
/Library/Developer/CommandLineTools
by a separate installer that one downloads directly from the Apple Developer site.
Some ports require Xcode. Others will use the command line tools if present or Xcode if the CLT are not present. "Command line tools" means what is installed in /Library/Developer/CommandLineTools.
config.log