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

error: module file's minimum deployment target is OS X v10.10 #15

Closed
fluidsonic opened this issue Jul 29, 2016 · 9 comments
Closed

error: module file's minimum deployment target is OS X v10.10 #15

fluidsonic opened this issue Jul 29, 2016 · 9 comments

Comments

@fluidsonic
Copy link

fluidsonic commented Jul 29, 2016

What am I doing wrong?

Swift script:

#!/usr/bin/env cato

import AEXML

First run:

$ cato Script.swift 
Analyzing dependencies
Downloading dependencies
Installing AEXML (3.0.0)
Generating Pods project
Skipping User Project Integration
Sending stats
Building frameworks
Built 1 frameworks
Copying 1 frameworks to `../../../../../.📦/Script/Rome`
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

Second run:

$ cato Script.swift 
./Script.swift:3:8: error: module file's minimum deployment target is OS X v10.10: /Users/marc/.📦/Script/Rome/AEXML.framework/Modules/AEXML.swiftmodule/x86_64.swiftmodule
import AEXML
       ^
  • cato 0.2.0
  • cocoapods (1.1.0.beta.1)
  • cocoapods-core (1.1.0.beta.1)
  • cocoapods-deintegrate (1.0.0)
  • cocoapods-downloader (1.1.0)
  • cocoapods-plugins (1.0.0)
  • cocoapods-rome (0.7.0)
  • cocoapods-search (1.0.0)
  • cocoapods-stats (1.0.0)
  • cocoapods-trunk (1.0.0)
  • cocoapods-try (1.1.0)
  • xcodeproj (1.2.0)
$ xcodebuild -version
Xcode 7.3.1
Build version 7D1014

$ xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk

$ xcrun swift --version
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9

Podfile generated by cato:

platform :osx, '10.10'
plugin 'cocoapods-rome'
use_frameworks!

target 'cato' do
pod "AEXML"
end
@fluidsonic
Copy link
Author

fluidsonic commented Jul 29, 2016

Passing -target to swift in the cato script solves this:

@@ -72,4 +72,4 @@

 FRAMEWORKS="`ls "$PKG_DIR/Rome"|grep -v 'Pods_cato'|sed -e 's/\.framework$//' -e 's/^/-framework /'`"

-exec xcrun swift -F"$PKG_DIR/Rome" -F"$FRAMEWORKS_PATH" `echo $FRAMEWORKS` "$SCRIPT" $@
+exec xcrun swift -target x86_64-apple-macosx10.10 -F"$PKG_DIR/Rome" -F"$FRAMEWORKS_PATH" `echo $FRAMEWORKS` "$SCRIPT" $@

@neonichu
Copy link
Owner

Ah, annoying — which version of macOS are you on?

@fluidsonic
Copy link
Author

I'm on 10.11.5

@neonichu
Copy link
Owner

neonichu commented Aug 8, 2016

Hm, I'm having a hard time reproducing this — what is your selected version of Xcode? Is it by any chance an older one that only includes the 10.10 SDK?

@fluidsonic
Copy link
Author

fluidsonic commented Aug 8, 2016

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

$ xcodebuild -version
Xcode 7.3.1
Build version 7D1014

$ xcodebuild -showsdks
OS X SDKs:
    OS X 10.11                      -sdk macosx10.11

iOS SDKs:
    iOS 9.3                         -sdk iphoneos9.3

iOS Simulator SDKs:
    Simulator - iOS 9.3             -sdk iphonesimulator9.3

tvOS SDKs:
    tvOS 9.2                        -sdk appletvos9.2

tvOS Simulator SDKs:
    Simulator - tvOS 9.2            -sdk appletvsimulator9.2

watchOS SDKs:
    watchOS 2.2                     -sdk watchos2.2

watchOS Simulator SDKs:
    Simulator - watchOS 2.2         -sdk watchsimulator2.2

I have no other Xcode versions installed.


I added the -v flag to cato's swift invocation.
Looks like that the swift tool uses x86_64-apple-macosx10.9 as the default target for me when not specifying an explicit target using -target.

$ ./Script.swift 
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret ./Script.swift -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -F /Users/marc/.📦/Script/Rome -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/../../Library/Frameworks -color-diagnostics -module-name Script -framework AEXML
./Script.swift:3:8: error: module file's minimum deployment target is OS X v10.10: /Users/marc/.📦/Script/Rome/AEXML.framework/Modules/AEXML.swiftmodule/x86_64.swiftmodule
import AEXML

@neonichu
Copy link
Owner

neonichu commented Aug 8, 2016

You're right, the same is actually happening for me. I see the issue now, AEXML is the one requesting a newer macOS version. I think it would be best if cato would actually use the newest available SDK instead of swift default.

@neonichu
Copy link
Owner

neonichu commented Aug 11, 2016

This works for me on macOS 10.12 with Xcode 8 (using a private build of CP to resolve some unrelated issues). I hope I didn't break support for 10.11 and Xcode 7.3, but unfortunately are unable to test this right now. The testsuite is also not really up to the task of handling multiple Xcode versions at the moment 😱

@fluidsonic would appreciate if you could give this a quick swing, I'll update in Homebrew if you can confirm this works.

@fluidsonic
Copy link
Author

@neonichu Works for me on macOS 10.11.6 with Xcode 7.3.1 :)

@neonichu
Copy link
Owner

Thanks for testing, shipped as 0.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants