-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Can't build xcframework success #788
Comments
Thanks for the report. I am able to reproduce this locally. |
I am also able to reproduce on Big Sur with Xcode 13.2.1. The scheme that builds for UI Tests, Looking at the log file, I just kicked off both of those manually to see what they will yield. Here is where the GitHub Actions can be verified. These are the two actions to be monitored when there status is updated at GitHub: failure in target 'mbgl-core' src/mbgl/style/expression/within.cpp
|
@roblabs ios-release runs though it seems (only fails because the tag has already been released). |
|
I tried a lot of things to fix this, including increating the minimum deployment target to iOS 12, removing and re-adding the libraries to link in Xcode (Stack overflow reported that this sometimes helps), set "build active active architecture only" to NO. All to no avail. Just tried again on the macOS runner which is using macOS Montery (12.5.1) and Xcode 14.2. Selecting the dynamic scheme and "Any iOS Device" as target, then selecting Product > Archive works (as well as creating an archive through |
OK I think I finally found the issue: CMake 3.24 works while CMake 3.35 does not. Edit: this may be it: https://cmake.org/cmake/help/latest/policy/CMP0142.html#policy:CMP0142 |
Switching cmake versions worked locally for me as well. We'll have to decide on either creating a dependency for [email protected] or fixing up due to the changes in the link above. Good catch @louwers |
The policies can be set conditionally as you know which version of CMake you run with. So I'd set the policy accordingly for the versions of CMake when it appeared (or fix our config that the policy is not needed). It seems though that they reverted it in 3.36, but we should not rely on that. |
I tried setting the policy but that did not fix the issue for me. |
Did you do a full rebuild? |
Yes. We have a lot of checked in Xcode files but we also partly generate the Xcode config with CMake. It is a bit hard to debug. |
I can investigate but not before the weekend. |
Note that it is still possible to create an XCFramework with Bazel. (After #806 is merged). I am not very happy with the setup of CMake + checked in Xcode files + Makfile + scripts + xcodebuild on the iOS side. The Bazel setup seems much cleaner, in part thanks to much better iOS support. |
I will be a bit provocative and say, why not CMake-only 😊 I think we should really aim in that direction. |
Because CMake support for iOS is lacking. It cannot build XCFrameworks for example. |
Really? You still generate the Xcode project and then you can do anything with it. Do XCFrameworks require some very special configuration to be made? |
Generating the entire Xcode project with CMake and getting rid of the checked in Xcode files is probably a big improvement already. But I am not sure if it is feasible. I have to look more into it #737 |
We have overhauled the build config. Please try out build instructions in the pre-release thread. |
I want to build iOS xcframework, but it's fail with following error message
❌ ld: library not found for -lmbgl-core
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
The following build commands failed:
Ld maplibre/platform/ios/build/ios/ArchiveIntermediates/dynamic/IntermediateBuildFilesPath/ios.build/RelWithDebInfo-iphoneos/dynamic.build/Objects-normal/armv7/Binary/Mapbox normal armv7 (in target 'dynamic' from project 'ios')
I have tried several Xcode version(14.1, 13.4.1, 13.1), but it doesn't work.
My Mac OS version is "Monterey 12.6.1"
Xcode version is "14.1"
And my Mac is M1 chip
The build command I inputed was
The text was updated successfully, but these errors were encountered: