Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#61541 closed defect (invalid)

gd2 2.3.0_0 +x11.darwin on Intel/BigSur: clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'

Reported by: shibukawa (Yoshiki Shibukawa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port:

Description

When I reinstall gd2 on my BigSur installed mac, I got error:

% sudo port install gd2
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'.
--->  Computing dependencies for gd2
--->  Fetching archive for gd2
--->  Attempting to fetch gd2-2.3.0_0+x11.darwin_20.x86_64.tbz2 from https://kmq.jp.packages.macports.org/gd2
--->  Attempting to fetch gd2-2.3.0_0+x11.darwin_20.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/gd2
--->  Attempting to fetch gd2-2.3.0_0+x11.darwin_20.x86_64.tbz2 from https://packages.macports.org/gd2
--->  Configuring gd2
Error: Failed to configure gd2, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_gd2/gd2/work/libgd-2.3.0/config.log
Error: Failed to configure gd2: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_gd2/gd2/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port gd2 failed

The log contains the following error:

clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'

On my console, I got warning about xcode-select --install, but this command dumps the following message and I could install other ports like nodejs14 (it was built from source), so this is not the cause I think.

% sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates 

Attachments (1)

config.log (12.1 KB) - added by shibukawa (Yoshiki Shibukawa) 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by shibukawa (Yoshiki Shibukawa)

Attachment: config.log added

comment:1 Changed 4 years ago by shibukawa (Yoshiki Shibukawa)

I could resolve by myself. I tried the following command and it fix this issue.

https://stackoverflow.com/questions/63972113/big-sur-clang-invalid-version-error-due-to-macosx-deployment-target

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

But before/after, the clang says completely same version. I don't know what is the reason to fix.

% 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:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Just running "clang" will run whatever you have selected with xcode-select, probably Xcode's version of clang. But if you're going to have the command line tools installed, you need to update it, so I'm glad you got it working.

Version 0, edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (next)

comment:3 in reply to:  description Changed 4 years ago by jmroot (Joshua Root)

On my console, I got warning about xcode-select --install, but this command dumps the following message and I could install other ports like nodejs14 (it was built from source), so this is not the cause I think.

% sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates 

That means CLTs are installed but doesn't tell you if they are outdated. Software Update will often not update them because of an Apple bug: ProblemHotlist#reinstall-clt

Last edited 4 years ago by jmroot (Joshua Root) (previous) (diff)
Note: See TracTickets for help on using tickets.