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

Apple Silicon support #4

Closed
chrisballinger opened this issue Jan 16, 2021 · 9 comments
Closed

Apple Silicon support #4

chrisballinger opened this issue Jan 16, 2021 · 9 comments
Labels
help wanted Extra attention is needed

Comments

@chrisballinger
Copy link

The Mapbox.xcframework here is missing a slice for arm64 iOS Simulator: https://github.com/maptiler/maplibre-gl-native/releases/download/ios-v5.10.0/Mapbox-5.10.0.zip

For whatever reason arm64 iOS Simulator is already present in MapboxMobileEvents.xcframework, just not in Mapbox.xcframework.

Screen Shot 2021-01-16 at 11 06 03 AM

Although it doesn't look like you support macOS binaries yet, they'll also need arm64 slices whenever that day comes. I'd suggest just adding macOS support to the existing XCFramework.

@petr-pokorny-1
Copy link
Contributor

Thank you @chrisballinger for the report. I had to exclude arm64 architecture from build architectures because I was unable to link it. I am not sure what is the root issue - it might be that I am using Intel based mac and GitHub actions runners we use for CD/CI are also Intel based. Details on the issue on StackOverflow.

If you would have more knowledge on this topic let us know or place in a pull request.

To reproduce this issue, just remove excluded architectures and build the project.

Screen Shot 2021-01-26 at 9 43 18 AM

@petr-pokorny-1
Copy link
Contributor

petr-pokorny-1 commented Jan 27, 2021

The issue seems to be caused by Mapbox dependencies dependencies which were removed in #7

@petr-pokorny-1
Copy link
Contributor

@chrisballinger can I close this issue? macOS support has its own ticket.

@chrisballinger
Copy link
Author

@petr-pokorny-1 After those changes, does the new final binary of Mapbox.xcframework now contain arm64 slices for iOS Simulator? If so, then I'd say this issue could be closed.

@petr-pokorny-1
Copy link
Contributor

petr-pokorny-1 commented Feb 20, 2021

I believe this was fixed in the following commits:
62c6178
2f480bf
117a4c5

The framework now contains arm64 slices for iOS simulator.

Screenshot 2021-02-20 at 18 48 58

The problem is that I don't have silicon mac to test it. We plan to release next version with these changes on March 05 so it would be great if someone could test it.

@petr-pokorny-1 petr-pokorny-1 added the help wanted Extra attention is needed label Feb 20, 2021
@chrisballinger
Copy link
Author

Awesome! Unfortunately I don't either, perhaps one of the macOS CI providers has ARM machines now?

@roblabs
Copy link
Collaborator

roblabs commented Feb 21, 2021

I was able to build & test MapLibre on Apple Silicon, but the resulting test app had the following symptoms:

  1. MapLibre builds on Apple Silicon
  2. The Map renders, but is very slow & sluggish.
  3. The log in Xcode is has multiple log entries related to 'cyclone'. Potentially a reference to the Apple A7. Thanks to @mojodna for pointing that out.
  4. I'm not certain what from the log is significant, but here is a snippet.
2021-02-21 08:28:00.694678-0800 GeographyClass[59356:2652990] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x600003fa42a0> to GL_RENDERBUFFER 1
2021-02-21 08:28:00.694810-0800 GeographyClass[59356:2652990] Failed to make complete framebuffer object 8cd6
'cyclone' is not a recognized processor for this target (ignoring processor)
'cyclone' is not a recognized processor for this target (ignoring processor)
# ... over 150 entries of this same log entry
'cyclone' is not a recognized processor for this target (ignoring processor)

Build tool chain

  • macOS Big Sur 11.3 Beta (20E5186d)
  • MapLibre compiled with Chip: Apple A12Z Bionic
  • Xcode Version 12.4 (12D4e)
  • Contents from the file maplibre-gl-native/platform/ios/build/iOS/pkg/version.txt
    • https://github.com/maplibre/maplibre-gl-native/commit/62c6178029
    • Using commit 62c6178029

image


How to test:

If your Xcode project uses Swift package to import MapLibre, then delete the Mapbox & MapboxMobileEvents Libraries.

Xcode Libraries before removing the working version with MapLibre from a Swift Package

The test app has a working version with MapLibre, but is manually removed for this test.


image


Xcode Libraries after a) removing Swift Package Libraries, and b) dragging and dropping Mapbox.xcframework built on Apple Silicon

image


If your MapLibre test app uses Cocoapods on Apple Silicon, you can use these commands for any issues with installing Cocoapods

arch -x86_64 sudo gem install cocoapods
arch -x86_64 sudo gem install ffi
arch -x86_64 pod install

@roman-mykitchak
Copy link

roman-mykitchak commented Apr 29, 2021

Hi,
Apple introduced new iPad Pro featuring breakthrough M1 chip.
In such a reasons will we have a build with supported M1 architecture.
Will it work for mentioned iPad(iPadOS) as well?

Same question about Apple Silicon Mac build:
Will it be supported on "ARM-based system on the chip"?

When I am building for M1 Mac I receive next error, see attached:
Screenshot 2021-04-29 at 15 35 06

@roblabs
Copy link
Collaborator

roblabs commented Jul 22, 2021

MapLibre runs on the simulator on Apple Silicon with the latest Xcode release & beta.

Fixed with commit 19b86f7 & see issue #14.

@roblabs roblabs closed this as completed Jul 22, 2021
nvanfleet referenced this issue in lyft/maplibre-gl-native Jul 28, 2022
More changes to get the build-android.sh script working:

- Add `git` to dependencies in docker file because MapLibre needs it
- Use 28.0.3 for build tools version because this is the version MapLibre uses
- Disable gradle daemon to avoid "Gradle build daemon disappeared unexpectedly" failure
- Increase memory from 8Gi to 16Gi to avoid OOMKilled failure
louwers pushed a commit that referenced this issue Mar 1, 2023
TimSylvester pushed a commit to WetDogWeather/maplibre-gl-native that referenced this issue Sep 8, 2023
…her-styles

Measure FPS from frame time to avoid sync caps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants