Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Crash on launch on macOS 10.11–10.14 #16396

Closed
1ec5 opened this issue Apr 14, 2020 · 1 comment · Fixed by #16412
Closed

Crash on launch on macOS 10.11–10.14 #16396

1ec5 opened this issue Apr 14, 2020 · 1 comment · Fixed by #16412
Assignees
Labels
build crash macOS Mapbox Maps SDK for macOS
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Apr 14, 2020

macOS map SDK v0.15.0 crashes on launch on macOS 10.11–10.14 because it was built on macOS 10.15 and has no explicit minimum deployment target. Examples of this crash include mapbox/mapbox-gl-native-ios#195 and mapbox/mapbox-gl-native-ios#205.

Running cmake -G Xcode . -DCMAKE_SYSTEM_NAME=Darwin results in an Xcode project whose targets have the MACOSX_DEPLOYMENT_TARGET build setting unset. This causes the build products to default to a minimum deployment target that is the newest macOS SDK version supported by the current version of Xcode. As on iOS in #16241, the minimum deployment target should instead be the oldest version supported by the macOS map SDK, which is macOS 10.11.0.

This isn’t a problem on iOS, because something causes this code to set the minimum deployment target:

if(NOT DEFINED IOS_DEPLOYMENT_TARGET)
set(IOS_DEPLOYMENT_TARGET "9.0")
endif()

But similar code in the macOS configuration doesn’t run:

if(NOT DEFINED MACOSX_DEPLOYMENT_TARGET)
set(MACOSX_DEPLOYMENT_TARGET "10.11")
endif()

/cc @mapbox/maps-ios @mapbox/gl-native

@1ec5 1ec5 added build macOS Mapbox Maps SDK for macOS labels Apr 14, 2020
@1ec5 1ec5 changed the title Restore support for macOS 10.11–10.14 Crash on launch on macOS 10.11–10.14 Apr 14, 2020
@1ec5
Copy link
Contributor Author

1ec5 commented Apr 18, 2020

I wonder if it’s relevant that MACOSX_DEPLOYMENT_TARGET is also a CMake environment variable, unlike IOS_DEPLOYMENT_TARGET.

@1ec5 1ec5 added the crash label Apr 18, 2020
@1ec5 1ec5 self-assigned this Apr 18, 2020
@1ec5 1ec5 added this to the release-water milestone Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build crash macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant