Open intari opened 8 years ago
I have the same issue. Any workaround?
I have the same? Any idea?
I have the same issue.
me too
Did anyone find any solution for this?
We had an issue in https://getmimo.com/ with this. I'll share our solution.
Problem When adding OpenSSL pod and running pod install, it fails with this error:
[!] /bin/bash -c
set -e
ARCHS="i386 x86_64 armv7 armv7s arm64"
BASEPATH="${PWD}"
BUILDDIR="${TMPDIR}OpenSSL"
SRCDIR="${BUILDDIR}/src"
SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
CLANG=`xcrun --find clang`
DEVELOPER=`xcode-select --print-path`
rm -rf "${BUILDDIR}"
mkdir -p "${SRCDIR}"
cp -R "${BASEPATH}/." "${SRCDIR}"
cd "${SRCDIR}"
for ARCH in ${ARCHS}
do
if [ "${ARCH}" == "i386" -o "${ARCH}" == "x86_64" ];
then
PLATFORM="iPhoneSimulator"
else
sed -ie "s!static volatile sig_atomic_t intr_signal;!static volatile intr_signal;!" "${SRCDIR}/crypto/ui/ui_openssl.c"
PLATFORM="iPhoneOS"
fi
CONF="no-asm"
if [ "${ARCH}" == "arm64" -o "${ARCH}" == "x86_64" ];
then
HOST="BSD-generic64"
CONF="${CONF} enable-ec_nistp_64_gcc_128"
else
HOST="BSD-generic32"
fi
OPENSSLDIR="${BUILDDIR}/${PLATFORM}${SDK_VERSION}-${ARCH}"
LIPO_LIBSSL="${LIPO_LIBSSL} ${OPENSSLDIR}/lib/libssl.a"
LIPO_LIBCRYPTO="${LIPO_LIBCRYPTO} ${OPENSSLDIR}/lib/libcrypto.a"
rm -rf "${OPENSSLDIR}"
mkdir -p "${OPENSSLDIR}"
LOG="${OPENSSLDIR}/build.log"
export DEVROOT="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export SDKROOT="${DEVROOT}/SDKs/${PLATFORM}${SDK_VERSION}.sdk"
export CC="${CLANG}"
./Configure ${HOST} ${CONF} --openssldir="${OPENSSLDIR}" > "${LOG}" 2>&1
sed -ie "s!^CFLAG=!CFLAG=-isysroot ${SDKROOT} -arch ${ARCH} -mios-version-min=7.0 !" "Makefile"
make >> "${LOG}" 2>&1
make all install_sw >> "${LOG}" 2>&1
make clean >> "${LOG}" 2>&1
done
rm -f "${BASEPATH}/libssl.a"
rm -f "${BASEPATH}/libcrypto.a"
lipo -create ${LIPO_LIBSSL} -output "${BASEPATH}/libssl.a"
lipo -create ${LIPO_LIBCRYPTO} -output "${BASEPATH}/libcrypto.a"
cp -RL "${SRCDIR}/include/." "${BASEPATH}/"
cd "${BASEPATH}"
rm -rf "${BUILDDIR}"
MODULE="module.modulemap"
BEFORE_HEADERS="rc2.h rc4.h"
AFTER_HEADERS="dtls1.h"
EXCLUDE_HEADERS="${BEFORE_HEADERS} ${AFTER_HEADERS}"
function print_submodule {
echo -e " explicit module $(basename $1 | cut -d"." -f1) {
header \"$1\"
}
"
}
echo "module OpenSSL {" > $MODULE
for HEADER in openssl/*.h; do
if [[ $BEFORE_HEADERS =~ $(basename $HEADER) ]]; then
print_submodule $HEADER >> $MODULE
fi
done
for HEADER in openssl/*.h; do
if [[ ! $EXCLUDE_HEADERS =~ $(basename $HEADER) ]]; then
print_submodule $HEADER >> $MODULE
fi
done
for HEADER in openssl/*.h; do
if [[ $AFTER_HEADERS =~ $(basename $HEADER) ]]; then
print_submodule $HEADER >> $MODULE
fi
done
echo -e " link \"ssl\"
link \"crypto\"
}" >> $MODULE
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'iphoneos'
The last three lines induce that there is a problem with the xcode command line tools/simulators.
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'iphoneos'
Solution Reinstall or update xcode so it installs the command line tools.
Detailed explanation While updating the system software (one of the app store update), something got broken* in the command line tools. This tool is the one that allows to build xcode from command line. At the same time, this tool is used by the openssl pod, so it failed because of openssl pod not being able to use it.
Our first error was:
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'iphoneos'
which, if we search for it in google, the first link mentions an issue here: https://github.com/bazelbuild/bazel/issues/2097. One of the answers of the issue says:
Looks due to xcode not being installed on the CI machine.
Command line tools are the only requirement for bazel in general, but, if we want to actually build objc / ios targets, as is done in these tests, we require xcode to be installed.
So again, they had a problem with the command line tools. (They mention xcode not being installed because by default command line tools come with xcode installation).
From the error snippet of the pod, (I’m pretty sure) these depend on the command line tools:
…
SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
CLANG=`xcrun --find clang`
DEVELOPER=`xcode-select --print-path`
…
So by (re)installing xcode (or installing the command line tools) it get fixed.
I came something fairly similar except that there was no actual errors being outputted when I was installing the OpenSSL pod. The output was just a cat of a script. After debugging, it seems that errors were being swallowed from this script.
A solution that worked for me was switching to the regular terminal and bash shell when running pod install.
pod install --verbose with RMStore/AppReceiptVerificator in podfile results in
BASEPATH="${PWD}" CURRENTPATH="/tmp/openssl" ARCHS="i386 x86_64 armv7 armv7s arm64" DEVELOPER=
xcode-select -print-path
mkdir -p "${CURRENTPATH}" mkdir -p "${CURRENTPATH}/bin"
cp "file.tgz" "${CURRENTPATH}/file.tgz" cd "${CURRENTPATH}" tar -xzf file.tgz cd "openssl-${VERSION}"
for ARCH in ${ARCHS} do CONFIGURE_FOR="iphoneos-cross"
if [ "${ARCH}" == "i386" ] || [ "${ARCH}" == "x86_64" ] ; then PLATFORM="iPhoneSimulator" if [ "${ARCH}" == "x86_64" ] ; then CONFIGURE_FOR="darwin64-x86_64-cc" fi else sed -ie "s!static volatile sig_atomic_t intr_signal;!static volatile intr_signal;!" "crypto/ui/ui_openssl.c" PLATFORM="iPhoneOS" fi
export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer" export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk"
echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}" echo "Please stand by..."
export CC="${DEVELOPER}/usr/bin/gcc -arch ${ARCH} ${MIN_SDK_VERSION_FLAG}" mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log"
LIPO_LIBSSL="${LIPO_LIBSSL} ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/lib/libssl.a" LIPO_LIBCRYPTO="${LIPO_LIBCRYPTO} ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/lib/libcrypto.a"
./Configure ${CONFIGURE_FOR} --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1 sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} !" "Makefile"
make >> "${LOG}" 2>&1 make all install_sw >> "${LOG}" 2>&1 make clean >> "${LOG}" 2>&1 done
echo "Build library..." rm -rf "${BASEPATH}/lib/" mkdir -p "${BASEPATH}/lib/" lipo -create ${LIPO_LIBSSL} -output "${BASEPATH}/lib/libssl.a" lipo -create ${LIPO_LIBCRYPTO} -output "${BASEPATH}/lib/libcrypto.a"
echo "Copying headers..." rm -rf "${BASEPATH}/opensslIncludes/" mkdir -p "${BASEPATH}/opensslIncludes/" cp -RL "${CURRENTPATH}/openssl-${VERSION}/include/openssl" "${BASEPATH}/opensslIncludes/"
cd "${BASEPATH}" echo "Building done."
echo "Cleaning up..." rm -rf "${CURRENTPATH}" echo "Done."
Building openssl-1.0.2g for iPhoneSimulator 9.3 i386 Please stand by...
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/executable.rb:70:in'
execute_command' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/executable.rb:27:in
block in executable' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:64:inblock (2 levels) in run_prepare_command' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:60:in
chdir' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:60:inblock in run_prepare_command' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in
section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:59:inrun_prepare_command' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:37:in
prepare!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:201:incopy_and_clean' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:158:in
block (2 levels) in uncached_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:156:ineach' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:156:in
block in uncached_pod' bash-3.2$ /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:180:incall' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:180:in
in_tmpdir' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:152:inuncached_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:33:in
download_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader.rb:34:indownload' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_installer.rb:113:in
download_source' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_installer.rb:53:ininstall!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:339:in
install_source_of_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:306:inblock (2 levels) in install_pod_sources' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:80:in
titled_section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:305:inblock in install_pod_sources' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:297:in
each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:297:ininstall_pod_sources' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:146:in
block in download_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:insection' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:144:in
download_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:106:ininstall!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:71:in
run_install_with_update' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:101:inrun' /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in
run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:inrun' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in
<top (required)>' /usr/local/bin/pod:23:inload' /usr/local/bin/pod:23:in