Code Monkey home page Code Monkey logo

Comments (8)

AndySomogyi avatar AndySomogyi commented on July 23, 2024 1

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.

AndySomogyi avatar AndySomogyi commented on July 23, 2024

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.

AndySomogyi avatar AndySomogyi commented on July 23, 2024

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.

mosra avatar mosra commented on July 23, 2024

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.

AndySomogyi avatar AndySomogyi commented on July 23, 2024

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.

AndySomogyi avatar AndySomogyi commented on July 23, 2024

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.

mosra avatar mosra commented on July 23, 2024

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.

mosra avatar mosra commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.