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

Stop building i386 #1394

Merged
merged 2 commits into from
May 11, 2018
Merged

Stop building i386 #1394

merged 2 commits into from
May 11, 2018

Conversation

frederoni
Copy link
Contributor

Fixes #1377

The i386 slice has been removed from the Maps SDK but Carthage sometimes tries to build MapboxNavigation with i386 included, depending on the destination. This change sets the available architectures to 64 bit only.

cc @friedbunny @bsudekum

@bsudekum
Copy link
Contributor

bsudekum commented May 7, 2018

Great catch! Want to add a changelog entry too?

@friedbunny
Copy link
Contributor

friedbunny commented May 7, 2018

ARCHS_STANDARD_64_BIT excludes armv7 (i.e., 32-bit ARM for iOS devices), which isn’t something we’d be able to do until we drop iOS 10 support (as that was the final version to support 32-bit devices, like iPhone 5).

The goal of mapbox/mapbox-gl-native#10772 (and later, mapbox/mapbox-gl-native#10962) was to remove only the 32-bit simulator slice (i386), as that’s largely unused and takes up a bit of space in the SDK download.

So we still need x86_64, armv7, and arm64 slices in our fat binaries. (The maps SDK also does not build armv7s, which might still be included in some of the standard ARCHS_* flags.)

@frederoni frederoni added the ⚠️ DO NOT MERGE PR should not be merged! label May 7, 2018
@frederoni frederoni force-pushed the fred/64bit-only branch 2 times, most recently from 6f9feef to 099385e Compare May 7, 2018 19:47
@1ec5 1ec5 added this to the v0.17.0 milestone May 10, 2018
@1ec5
Copy link
Contributor

1ec5 commented May 10, 2018

@bsudekum ran into a validation error pushing v0.17 to CocoaPods trunk, due to this issue.

@1ec5 1ec5 added build Issues related to builds and dependency management. release blocker Needs to be resolved before the release. labels May 10, 2018
@bsudekum
Copy link
Contributor

While releasing v0.17.0, we hit this issue preventing the release:


bobby@Bobbys-MacBook-Pro mapbox-navigation-ios (master)$ pod repo update && pod trunk push MapboxNavigation.podspec
Updating spec repo `mapbox`
Updating spec repo `master`

CocoaPods 1.5.2 is available.
To update use: `sudo gem install cocoapods`

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.5.2

Updating spec repo `master`

CocoaPods 1.5.2 is available.
To update use: `sudo gem install cocoapods`

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.5.2

Validating podspec
 -> MapboxNavigation (0.17.0)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [iOS] xcodebuild:  ld: warning: ignoring file Mapbox-iOS-SDK/dynamic/Mapbox.framework/Mapbox, missing required architecture i386 in file Mapbox-iOS-SDK/dynamic/Mapbox.framework/Mapbox (3 slices)
    - NOTE  | [iOS] xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)

[!] The spec did not pass validation, due to 1 error.

@bsudekum
Copy link
Contributor

bsudekum commented May 10, 2018

When testing this branch in a carthage project, I'm now getting the error:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/usr/include/objc/objc.h:31:10: error: could not build module 'Darwin'
#include <sys/types.h>      // for __DARWIN_NULL
         ^
/Users/bobby/Desktop/CarthageTest/Carthage/Checkouts/mapbox-navigation-ios/MapboxCoreNavigation/MapboxCoreNavigation.h:1:9: note: while building module 'Foundation' imported from /Users/bobby/Desktop/CarthageTest/Carthage/Checkouts/mapbox-navigation-ios/MapboxCoreNavigation/MapboxCoreNavigation.h:1:
#import <Foundation/Foundation.h>
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:9: note: while building module 'Security' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
#import <Security/Security.h>
        ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/Security.h"
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:27:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:27:
#include <Security/SecBase.h>
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:27:10: error: could not build module 'Darwin'
#include <TargetConditionals.h>
         ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/MapboxCoreNavigation.h"
        ^
/Users/bobby/Desktop/CarthageTest/Carthage/Checkouts/mapbox-navigation-ios/MapboxCoreNavigation/MapboxCoreNavigation.h:1:9: error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
        ^
<unknown>:0: error: could not build Objective-C module 'MapboxCoreNavigation'


The following build commands failed:
    CompileSwift normal x86_64
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler

@bsudekum
Copy link
Contributor

Moving towards something like Carthage/Carthage#1771 (comment) worked for me (minus erroneous asset update https://github.com/mapbox/mapbox-navigation-ios/compare/bs-64)

@bsudekum
Copy link
Contributor

/cc @vincethecoder

@friedbunny friedbunny changed the title Build for 64 bit only Stop building i386 May 11, 2018
@frederoni frederoni removed the ⚠️ DO NOT MERGE PR should not be merged! label May 11, 2018
@bsudekum bsudekum mentioned this pull request May 11, 2018
@bsudekum
Copy link
Contributor

Was just about to close this in favor of #1419, we can keep this pr since it has a good paper trail.

@friedbunny
Copy link
Contributor

I’m not sure what our changelog practices are here, but this could be considered a breaking change (as y’all have found out 🙇), so we’d probably want to warn people of that. Upstream in the maps SDK, we wrote simply:

Removed support for 32-bit simulators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to builds and dependency management. release blocker Needs to be resolved before the release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants