krzyzanowskim / OpenSSL

OpenSSL package for SwiftPM, CocoaPod, and Carthage, multiplatform
https://swift.best
Other
910 stars 336 forks source link

Check that xcrun is not giving an error #49

Closed WarpRulez closed 3 years ago

WarpRulez commented 5 years ago

With Xcode 9 and newer, the build.sh script may fail to build the libraries properly because xcrun is giving an error, but build.sh does not check if that's the case. (This causes build.sh to just continue running, not building all the proper architectures, and creating a faulty libcrypto.a and libssl.a).

It turns out that in some cases the Xcode command-line tools need to be configured properly in the Xcode Preferences (the Preferences > Locations > Command Line Tools field may be blank, and the user needs to select the current Xcode version).

You might want to add a check in the build.sh script that xcrun isn't throwing an error, and inform the user appropriately.

krzyzanowskim commented 5 years ago

wanna create PR with necessary change to the script?