Reputation: 75
I am currently on Mac OSX Big Sur 11.2.3. Whenever I run the command:
g++-10 -o project0 project0.cpp -lm -fopenmp
I get the following error:
clang: error: invalid version number in '-mmacosx-version-min=11.2'
I realized that this may be due to the fact that I'm on Big Sur 11.2.3 but I was told that this should not be an issue. I've tried many things already such as reinstalling gcc doing brew install gcc
and so forth to no avail. At this point, I'm very unsure on what to do. Any help would be very much appreciated!
Upvotes: 8
Views: 10464
Reputation: 133
I had a slightly different issue, while trying to build Qt WebEngine 6.5 on an iMac m1. For me, the error was
error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET='
I tried what was suggested in this answer, but while it had fixed this issue, the following steps failed because Qt was complaining about having a Command Line Tools instance only, unable to find Xcode.
I solved by simply setting a value to it :
export MACOSX_DEPLOYMENT_TARGET=11
Context : iMac m1 (arm64 chip), macOS Ventura 13.4, XCode 14.3, Qt Webengine 6.5.1
Upvotes: 0
Reputation: 311
I ran into a similar issue when I tried to compile a library with clang-9 on an up-to-date system, with clang-9 installed via homebrew:
clang-9: error: invalid version number in '-mmacosx-version-min=12.6'
Updating xcode command line tools doesn't help here, since I actually want / have to use the old compiler. Setting the following environment variable for the build solved the issue:
export SYSTEM_VERSION_COMPAT=1
Upvotes: 1
Reputation: 66
I ran into the same problem while trying to install fiona. You are correct it is due to Big Sur, as you can see in this article
Follow it and it should sort out the issue. Note, I had to uninstall Command Line tools and re-install it as outlined in this answer.
Upvotes: 1