Comments (8)
I've dumped some CMake vars, here they are.
I think it's probably sufficient to check for XCODE_VERSION >= 10.0
and CMAKE_GENERATOR == Xcode
CMAKE_SYSTEM_NAME: Darwin
CMAKE_OSX_DEPLOYMENT_TARGET: 10.13
MACOSX_DEPLOYMENT_TARGET:
CMAKE_OSX_SYSROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
XCODE_VERSION: 10.0
CMAKE_GENERATOR: Xcode
CMAKE_CXX_COMPILER_ID: Clang
CMAKE_CXX_COMPILER_VERSION: 10.0.0.10001145
from corrade.
However, upgrading to latest version of CMake seems to resolve the issue.
Upgraded cmake 3.11.4 -> 3.12.2 and that seems to have resolved the issue. Looks like it was something wonky with Xcode, not sure what caused the issue, but FYI.
from corrade.
Maybe put a check in if Xcode build, minimum cmake required is 3.12.2. Might work on older versions, not sure, but 3.12.2 fixed the issue for me.
from corrade.
Hi, thanks for the report! π
Would you have a chance to test if this is a problem just specific to Corrade? I have no way to test this myself, but to me it looks like it's a general issue where older CMake won't work with latest Xcode -- not being specific to Corrade -- especially the weird /undefined_arch/
part.
If it's really a general issue, I don't think putting a Xcode-specific warning / error there is a good idea (all CMake-based projects would have to do that, then). If it's caused by something specific to Corrade, then yes, I'm all for it.
from corrade.
As far as I can tell, this issue was specific to Corrade. I've tested the old version of CMake with newer Xcode and all the other projects built fine. Furthermore, it is specific to older CMake, and only Xcode build. The older CMake built the Corrade project just fine when I told it to make an Eclipse project.
The extent of my troubleshooting was:
- noticed Corrade wouldn't build after "upgrading" Xcode.
- tried Corrade by itself and CMake-XCode - wouldn't built.
- tried Corrade with CMake-Eclipse - worked just fine.
- tried CMake-XCode with other projects worked fine.
- pulled Corrade - Magnum from GitHub -- no change, still had issue with Xcode project.
- figured, lets try to upgrade CMake, see what happens. Sure enough, that resolved the problem, so I stopped looking.
I don't really have a way of re-testing it with new Xcode and older CMake because I upgraded CMake, and I'm under a lot of pressure to get this thing I'm working on working.
But in any case, as far as I can tell, for me, the problem was specific to the combination of (Corrade, older CMake, new Xcode).
from corrade.
Also, with the new version of CMake, it never tries to make the undefined_arch
directory, the build directory with new CMake and Xcode project looks like:
Andy-MacBook-Pro:CorradeUtility.build andy$ pwd
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtility.build
Andy-MacBook-Pro:CorradeUtility.build andy$ tree
.
βββ Objects-normal
βΒ Β βββ x86_64
βΒ Β βββ Arguments.d
βΒ Β βββ Arguments.dia
βΒ Β βββ Arguments.o
βΒ Β βββ ConfigurationGroup.d
βΒ Β βββ ConfigurationGroup.dia
βΒ Β βββ ConfigurationGroup.o
βΒ Β βββ CorradeUtility-d.LinkFileList
βΒ Β βββ Format.d
βΒ Β βββ Format.dia
βΒ Β βββ Format.o
βΒ Β βββ Resource.d
βΒ Β βββ Resource.dia
βΒ Β βββ Resource.o
βΒ Β βββ String.d
βΒ Β βββ String.dia
βΒ Β βββ String.o
βΒ Β βββ Unicode.d
βΒ Β βββ Unicode.dia
βΒ Β βββ Unicode.o
βββ StaticAnalyzer
βΒ Β βββ Mechanica
βΒ Β βββ CorradeUtility
βΒ Β βββ normal
βΒ Β βββ x86_64
βΒ Β βββ Arguments.d
βΒ Β βββ Arguments.plist
βΒ Β βββ ConfigurationGroup.d
βΒ Β βββ ConfigurationGroup.plist
βΒ Β βββ Format.d
βΒ Β βββ Format.plist
βΒ Β βββ Resource.d
βΒ Β βββ Resource.plist
βΒ Β βββ String.d
βΒ Β βββ String.plist
βΒ Β βββ Unicode.d
βΒ Β βββ Unicode.plist
βββ dgph
βββ dgph~
from corrade.
I'm under a lot of pressure to get this thing I'm working on working
I totally understand that ;) My case right now as well. Thus thank you a lot for taking the extra time to report this.
I bet this is due to my use of OBJECT
libraries (since that's not so common) and I think I could dig through CMake commit log to see what particular change that went into 3.12.2 fixed this and once I have it, I could either invent a workaround or end with an error, as you suggested. However, I don't want to globally require latest CMake for all Xcode versions (some clients are deliberately on older Xcode versions and requiring newer CMake may break their workflow) -- so I'd like to issue the error message/workaround only for the affected Xcode version.
So my final question: what's your Xcode version? Or even better, what does CMake report as detected compiler version? Should be something like AppleClang 9.9
.
from corrade.
Managed to track this down to https://gitlab.kitware.com/cmake/cmake/issues/18099 (so CMake 3.12.0 has the fix already, it seems). Since a14b1ae I am failing early with an error, suggesting users to upgrade. If you would have a chance to verify it works as intended, I would be happy :)
from corrade.
Related Issues (20)
- Corrade's test suite fails under AddressSanitizer HOT 9
- Corrade with BUILD_TESTS=ON compilation error: call to non-βconstexprβ function HOT 5
- Error when installing via HunterGate HOT 7
- Prefix cmake options with CORRADE_ HOT 4
- Windows: inconsistent redefinition of _aligned_malloc HOT 3
- Corrade adds /wd*** warning disablements to "clang.exe" on windows. HOT 1
- Building Corrade with -std=c++20 causes errors inside MinGW <numbers> header HOT 3
- Corrade fails to compile with emscripten 3.1.22 HOT 4
- Opt-in to native UTF-8 support for OS interaction on Windows
- std::tuple_size / tuple_element specializations for Corrade containers HOT 1
- error: cannot initialize a variable of type 'const char *const' with an rvalue of type 'int' HOT 3
- Optimizing compilation time for the test suite -- an analysis HOT 3
- Interconnect - Slots are not called according to their record order HOT 1
- V8::Zone Allocator HOT 1
- NEON code does not build on armv7 HOT 2
- what to set CORRADE_INCLUDE_DIR to for in-source-builds HOT 2
- JsonToken::asObject() odd behavior with empty objects HOT 2
- New Release HOT 1
- Broken Interconnect on Clang-CL 16.0.5 HOT 9
- Packaging location of GDB script files HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corrade.