passepartoutvpn / openssl-apple

A script for compiling OpenSSL for Apple Devices.
Apache License 2.0
139 stars 65 forks source link

xcrun: error: unable to lookup item 'SDKVersion' in SDK 'watchos' #18

Closed houmie closed 4 years ago

houmie commented 4 years ago

Hi,

I can't install the openssl-apple pod. What could be the issue?

Maybe it's related to the Podfile

use_frameworks!

def shared_pods
    pod 'SwiftyBeaver'
    pod 'OpenSSL-Apple', '~> 1.1.1g.6'
    #pod 'OpenSSL-Apple', :path => '../../personal/openssl-apple'
end

abstract_target 'TunnelKit' do
    target 'TunnelKit-iOS' do
        platform :ios, '11.0'
        shared_pods
    end
    target 'TunnelKitTests-iOS' do
        platform :ios, '11.0'
    end
    target 'TunnelKitHost' do
        platform :ios, '11.0'
    end

    target 'TunnelKit-macOS' do
        platform :osx, '10.11'
        shared_pods
    end
    target 'TunnelKitTests-macOS' do
        platform :osx, '10.11'
    end
end

Thanks

➜  tunnelkit (master) ✗ pod install
Analyzing dependencies
Downloading dependencies
Installing OpenSSL-Apple (1.1.1g.6)
[!] /bin/bash -c
set -e
./build-libssl.sh --version="1.1.1g" --targets="ios-sim-cross-x86_64 ios64-cross-arm64 macos64-x86_64"
./create-openssl-framework.sh dynamic

Build options
  OpenSSL version: 1.1.1g
  Targets: ios-sim-cross-x86_64 ios64-cross-arm64 macos64-x86_64
  macOS SDK: 10.15
  iOS SDK:
  tvOS SDK:
  watchOS SDK:
  Number of make threads: 8
  Configure options:  no-deprecated
  Build location: /Users/houmie/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1g.6-c9c1b

Downloading openssl-1.1.1g.tar.gz...
Building openssl-1.1.1g for iPhoneSimulator  x86_64...
  Logfile: /Users/houmie/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1g.6-c9c1b/bin/iPhoneSimulator-x86_64.sdk/build-openssl-1.1.1g.log
  Configure...
  Make (using 8 thread(s))...
Problem during make - Please check /Users/houmie/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1g.6-c9c1b/bin/iPhoneSimulator-x86_64.sdk/build-openssl-1.1.1g.log
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'iphoneos'
xcrun: error: SDK "appletvos" cannot be located
xcrun: error: SDK "appletvos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'appletvos'
xcrun: error: SDK "watchos" cannot be located
xcrun: error: SDK "watchos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'watchos'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 9571k  100 9571k    0     0  38.9M      0 --:--:-- --:--:-- --:--:-- 38.9M
keeshux commented 4 years ago

Given that you were able to run the TunnelKit Demo, I assume you managed to fix your issue eventually.

houmie commented 4 years ago

Yeah it's a very strange issue. I had to switch it to Xcode.app for this:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

I couldn't use the CommandLineTools as you would expect: sudo xcode-select --switch /Library/Developer/CommandLineTools

Certainly very odd.

Source: https://github.com/nodejs/node-gyp/issues/569