#61805 closed defect (invalid)
gd2: clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.1'
Reported by: | k6wx (Kristen McIntyre) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | bigsur | Cc: | michaelld (Michael Dickens), dmopalmer (David Palmer) |
Port: | gd2 |
Description (last modified by jmroot (Joshua Root))
When trying to install the gnuradio port, it appears to require gd2. gd2 will not install correctly. I completely removed MacPorts, removing all directories and files, but it still fails. It warns about the macOS 11.1 SDK, but that's because i'm running the latest beta of Big Sur: 20C5061b. It should be okay with the installed SDK.
Trying to install gd2 on its own also fails. Uninstalling it and cleaning it before attempting again doesn't fix it.
Warning: The macOS 11.1 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 gd2 ---> Attempting to fetch gd2-2.3.0_0+x11.darwin_20.x86_64.tbz2 from https://mse.uk.packages.macports.org/gd2 ---> Attempting to fetch gd2-2.3.0_0+x11.darwin_20.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/gd2 ---> Attempting to fetch gd2-2.3.0_0+x11.darwin_20.x86_64.tbz2 from http://fco.it.packages.macports.org/gd2 ---> Fetching distfiles for gd2 ---> Attempting to fetch libgd-2.3.0.tar.xz from https://github.com/libgd/libgd/releases/download/gd-2.3.0 ---> Verifying checksums for gd2 ---> Extracting gd2 ---> Applying patches to 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 gnuradio failed
Attachments (4)
Change History (20)
Changed 4 years ago by k6wx (Kristen McIntyre)
Changed 4 years ago by k6wx (Kristen McIntyre)
Attachment: | config.log added |
---|
comment:1 Changed 4 years ago by jmroot (Joshua Root)
Description: | modified (diff) |
---|---|
Owner: | set to ryandesign |
Status: | new → assigned |
comment:2 Changed 4 years ago by michaelld (Michael Dickens)
comment:3 follow-up: 12 Changed 4 years ago by michaelld (Michael Dickens)
The error in config.log
is clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.1'
, which leads me to believe that your Xcode install isn't the correct one ... or, maybe it is but has a bug in it? Which verion of Xcode are you running (echo "Xcode $(xcodebuild -version | awk -v ORS=' ' '{print $NF}')"
?
comment:4 Changed 4 years ago by michaelld (Michael Dickens)
FYI once you get this resolved you should be able to install gnuradio with -qtgui
. There is a PR for updating Qt5 to the latest version that is in the works here https://github.com/macports/macports-ports/pull/8744 ... you can always install from that PR & then use +qtgui
(which is the default) & that should get you all of gnuradio that can work on macOS.
comment:5 Changed 4 years ago by michaelld (Michael Dickens)
Cc: | michaelld added |
---|
comment:6 Changed 4 years ago by michaelld (Michael Dickens)
Summary: | Trying to install gnuradio, gd2 fails to install properly → gd2 fails to install properly |
---|
comment:7 Changed 4 years ago by michaelld (Michael Dickens)
Still builds cleanly for me now running macOS 11.1 20C69 / Xcode 12.3 12C33 ... +x11
or not. I see the usual warning from port
about 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'.
... and then of course trying to install the CLT fails since 12.3 doesn't have them (at all? yet?) ...
comment:8 Changed 4 years ago by k6wx (Kristen McIntyre)
Thanks for looking at this.
Here's the version.
bash-3.2# echo "Xcode $(xcodebuild -version | awk -v ORS=' ' '{print $NF}')" Xcode 12.2 12B45b
So, a slightly older Xcode than you. I have Xquartz installed. Xquartz says it's up-to-date at version 2.7.11.
Did you figure out from the logs what precisely failed? The only visible errors I found were these. The configure script is such a tangled mess that I don't know if that's normal or not.
InstalledDir: /Library/Developer/CommandLineTools/usr/bin configure:5709: $? = 0 configure:5698: /usr/bin/clang -V >&5 clang: error: unsupported option '-V -Wno-framework-include-private-from-public' clang: error: no input files configure:5709: $? = 1 configure:5698: /usr/bin/clang -qversion >&5 clang: error: unknown argument '-qversion', did you mean '--version'? clang: error: no input files configure:5709: $? = 1 configure:5729: checking whether the C compiler works configure:5751: /usr/bin/clang -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 conftest.c >&5 clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.1' configure:5755: $? = 1 configure:5793: result: no configure: failed program was:
comment:9 Changed 4 years ago by dmopalmer (David Palmer)
I too have this problem. Mac Pro(2019), Big Sur 11.2.3, Xcode 12.5 12E262 config.log ends in
configure: exit 77
When ./configure runs under MacPorts, it fails exit 77. When the same ./configure line is executed from the command line, with the same $path, then everything works.
I will attach the two logs config_macports.log config_samepath.log .
Changed 4 years ago by dmopalmer (David Palmer)
Attachment: | config_macports.log added |
---|
Palmer: 2021-05-04 Macports config run log (failed)
Changed 4 years ago by dmopalmer (David Palmer)
Attachment: | config_samepath.log added |
---|
Palmer: 2021-05-04 Manually running ./configure with same $PATH as macports (succeeds, but selects different compiler, etc.)
comment:10 Changed 4 years ago by kencu (Ken)
seems to be the same issue as before, but with a new deployment target.
MacPorts sets the deployment target to the right value of "11.2" but this is making the compiler error.
103 configure:3525: /usr/bin/clang -pipe -Os -DDEFAULT_FONTPATH=\"/System/Library/Fonts:/Library/Fonts\" -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 conftest.c >&5 104 clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.2'
comment:11 Changed 4 years ago by dmopalmer (David Palmer)
Is there a work-around? My clang is Apple version 12.0.5
% /usr/bin/clang --version Apple clang version 12.0.5 (clang-1205.0.22.9) Target: x86_64-apple-darwin20.3.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
comment:12 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | dmopalmer added |
---|---|
Keywords: | bigsur added |
Resolution: | → invalid |
Status: | assigned → closed |
Summary: | gd2 fails to install properly → gd2: clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.1' |
Replying to michaelld:
The error in
config.log
isclang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.1'
, which leads me to believe that your Xcode install isn't the correct one
This error means that the clang in your Xcode or in your Xcode command line tools—whichever one this port is using—is not compatible with macOS 11. In this case, this port is using the Xcode command line tools, so it is the version of the Xcode command line tools that you have installed that is not compatible with your OS.
Please make sure you are using a version of Xcode that is compatible with your OS version. Xcode 12.2 and later are compatible with macOS 11 Big Sur, but the latest Xcode 12.x is recommended. That's currently Xcode 12.5.
You must also make sure that if you install the Xcode command line tools, its version matches your Xcode version. Due to a bug in macOS, Software Update may not offer to upgrade the Xcode command line tools for you, so do it manually by following the instructions in the wiki page or by downloading it from Apple.
comment:13 Changed 4 years ago by dmopalmer (David Palmer)
I am on Big Sur 11.2.3, Big Sur 11.2.3 (latest until a few days ago), Xcode 12.5 (latest).
Manually installing the command_line_tools_for_xcode_12.5 from the Apple Dev site gives the same clang-1205.0.22.9 as previously installed by Xcode. (Assuming that the clang in /usr/bin is among those command line tools.)
Anyway, the same result from port install gd2
after all that.
I will try upgrading to Big Sur 11.3 overnight and see if that works.
comment:14 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Upgrading to macOS 11.3 is recommended but is not related to resolving this issue.
/usr/bin/clang is a wrapper program that invokes whichever clang you have selected with xcode-select
. You have probably selected Xcode, in which case /usr/bin/clang --version
will tell you what version of clang is in Xcode, when what is actually relevant to resolve this issue is what version of clang is in the Xcode command line tools. You can query them individually by invoking the real programs directly:
% /Library/Developer/CommandLineTools/usr/bin/clang --version Apple clang version 12.0.5 (clang-1205.0.22.9) Target: x86_64-apple-darwin20.4.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin %
% /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version Apple clang version 12.0.5 (clang-1205.0.22.9) Target: x86_64-apple-darwin20.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin %
comment:15 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Installing the matching Xcode command line tools should resolve the issue. You will also need to clean the affected port(s) before trying again e.g. sudo port clean gd2
comment:16 Changed 4 years ago by dmopalmer (David Palmer)
After cleaning gd2 (which I had previously tried) it now builds properly.
Thank you.
I don't see this issue on macOS 11.1 20C5061b / Xcode 12.2 12B5035g, with either
+x11
or without (I use-x11 +quartz
by default). I'll update to the latest beta of each & see again ...