Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install for OS64COMBINED platform #87

Closed
doodlewind opened this issue Nov 3, 2020 · 5 comments
Closed

Unable to install for OS64COMBINED platform #87

doodlewind opened this issue Nov 3, 2020 · 5 comments
Assignees
Labels

Comments

@doodlewind
Copy link

Describe the bug
The default example-lib fails in install process with the -DPLATFORM=OS64COMBINED config.

To Reproduce
Using the same operation following the README:

cd example-lib
mkdir build && cd build
cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake -DPLATFORM=OS64COMBINED
cmake --build . --config Release --target install

Two libexample.a files can be built and found in build/Release-iphoneos and build/Release-iphonesimulator path, but with the --target install config, following error is raised:

[iOS combined] Current: /Users/ewind/Downloads/ios-cmake/example/example-lib/../example-app/example-lib/lib/libexample.a
[iOS combined] Corresponding: /Users/ewind/Downloads/ios-cmake/example/example-lib/build/Release-iphonesimulator/libexample.a
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/ewind/Downloads/ios-cmake/example/example-lib/build/Release-iphonesimulator/libexample.a and /Users/ewind/Downloads/ios-cmake/example/example-lib/../example-app/example-lib/lib/libexample.a have the same architectures (arm64) and can't be in the same fat output file
CMake Error at /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/CMakeIOSInstallCombined.cmake:306 (message):
  Command failed:
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo;-create;/Users/ewind/Downloads/ios-cmake/example/example-lib/build/Release-iphonesimulator/libexample.a;/Users/ewind/Downloads/ios-cmake/example/example-lib/../example-app/example-lib/lib/libexample.a;-output;/Users/ewind/Downloads/ios-cmake/example/example-lib/../example-app/example-lib/lib/libexample.a
Call Stack (most recent call first):
  cmake_install.cmake:49 (ios_install_combined)


make: *** [install_buildpart_0] Error 1

** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution CMake\ PostBuild\ Rules build/example-ios.build/Release-iphoneos/install.build/Script-149BD7B82F7D46F2B9BFCFEC.sh

Environment

@leetal
Copy link
Owner

leetal commented Nov 11, 2020

Hmmm. I'll investigate this and return to you with my findings. Might be Xcode 12 related.

@leetal
Copy link
Owner

leetal commented Nov 11, 2020

This is sadly a bug in CMake covered here: https://gitlab.kitware.com/cmake/cmake/-/issues/21282 and here https://gitlab.kitware.com/cmake/cmake/-/issues/21281 (closed in favour of 21282)

@NSShentu
Copy link

@leetal so any workarounds?

@leetal
Copy link
Owner

leetal commented Dec 15, 2020

Nope, nothing has been fixed upstream in CMake to fix this. I'd urge you to try the following potential workaround for the moment: #88 (comment)

@leetal
Copy link
Owner

leetal commented Mar 1, 2021

Fixed in #97. Please see updated README for instructions.

@leetal leetal closed this as completed Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants