OpenSSL-Pod icon indicating copy to clipboard operation
OpenSSL-Pod copied to clipboard

Unable to Install Pod

Open neeraj-goyal-wibmo opened this issue 8 years ago • 6 comments

Fails with below error for

pod 'OpenSSL', '~> 1.0'

[!] /bin/bash -c set -e VERSION="1.0.2j" SDKVERSION=xcrun --sdk iphoneos --show-sdk-version 2> /dev/null` MIN_SDK_VERSION_FLAG="-miphoneos-version-min=7.0"

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."`

neeraj-goyal-wibmo avatar Aug 07 '17 08:08 neeraj-goyal-wibmo

It really takes a while like 10 minutes or so. Do not interrupt, instead grab some more ☕️

UninhibitedSoul avatar Sep 20 '17 10:09 UninhibitedSoul

@UninhibitedSoul What @neeraj-goyal-wibmo actually meant is that the prepare command is printed to the terminal instead of being executed by bash, seems to be a breaking change somewhere in cocoapods ? I'm seeing the same issue

mostafaberg avatar Dec 22 '17 13:12 mostafaberg

@UninhibitedSoul @neeraj-goyal-wibmo I can confirm now this was an issue on MacOS High Sierra! fix is simple,run the following commands: sudo gem update --system Followed by: sudo gem install -n /usr/local/bin cocoapods

This fixed my issue with the prepare_command printing to the console instead of being executed!

mostafaberg avatar Dec 27 '17 07:12 mostafaberg

@mostafaberg I just updated my cocoapods like you described, but I still just see the script being printed out and then the pod update just quits?!? Any Ideas?

georgbachmann avatar Jan 30 '18 10:01 georgbachmann

Anyone any ideas? Cause I can still not pod install :(

georgbachmann avatar Feb 05 '18 15:02 georgbachmann

@georgbachmann Just noticed your message !, i think you need to check which version of cocoapods-downloader you have, i think this issue is introduced after version 1.2.0.

See relevant issue here

Simply install 1.2.0: sudo gem install cocoapods-downloader -v 1.2.0 -n /usr/local/bin And then uninstall other version(s): sudo gem uninstall cocoapods-downloader

This fixed the issue for me after updating cocoapods and the issue was back

mostafaberg avatar Jun 26 '18 08:06 mostafaberg