Closed
Description
I am experiencing a couple of different problems trying to build version 1.1.1 for iOS and tvOS architectures on an OSX machine.
Initially, I was getting the following error when building:
➜ ~/work/Phenix2/Formulas/work/29204_Ph/armv7/openssl-1.1.1 git:(review/philip_joseph/5908) ✗ export CROSS_TOP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
export CROSS_SDK=iPhoneOS12.1.sdk
export BUILD_TOOLS=/Applications/Xcode.app/Contents/Developer
export 'CC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch armv7 -miphoneos-version-min=9.0 -fembed-bitcode'
export 'CXX=/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -arch armv7 -miphoneos-version-min=9.0 -std=c++11 -stdlib=libc++ -fembed-bitcode'
export AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
export RANLIB=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
➜ ~/work/Phenix2/Formulas/work/29204_Ph/armv7/openssl-1.1.1 git:(review/philip_joseph/5908) ✗
➜ ~/work/Phenix2/Formulas/work/29204_Ph/armv7/openssl-1.1.1 git:(review/philip_joseph/5908) ✗ ./Configure iphoneos-cross no-async no-shared
Configuring OpenSSL version 1.1.1 (0x1010100fL) for iphoneos-cross
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
**********************************************************************
*** ***
*** If you want to report a building issue, please include the ***
*** output from this command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
**********************************************************************
➜ ~/work/Phenix2/Formulas/work/29204_Ph/armv7/openssl-1.1.1 git:(review/philip_joseph/5908) ✗ make
perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/bn_conf.h.in > crypto/include/internal/bn_conf.h
perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/dso_conf.h.in > crypto/include/internal/dso_conf.h
perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
/Applications/Xcode.app/Contents/Developer/usr/bin/make depend && /Applications/Xcode.app/Contents/Developer/usr/bin/make _all
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch armv7 -miphoneos-version-min=9.0 -fembed-bitcode -I. -Iinclude -fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fno-common -O3 -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG -c -o apps/apps.o apps/apps.c
/usr/local/bin/makedepend -f- -Y -- -I. -Iinclude -fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fno-common -O3 -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG -- apps/apps.c 2>/dev/null \
> apps/apps.d
make[1]: *** [apps/apps.o] Error 1
make: *** [all] Error 2
To get past that, I initially tried to change the MAKEDEPEND
variable in the Makefile
as suggested in a couple of different posts (http://article.gmane.org/gmane.comp.encryption.openssl.user/47492), but that didn't prove successful. I was however successful fixing this this on iOS using the no-makedepend
flag. I am not 100% the no-makedepend
won't cause issues once I try to link against the library and use it yet.
Either way, I end up with the following error when trying to build tvOS:
➜ ~/work/Phenix/Formulas/work/13164_Ph/arm64/openssl-1.1.1 git:(review/philip_joseph/5908)
➜ ~/work/Phenix/Formulas/work/13164_Ph/arm64/openssl-1.1.1 git:(review/philip_joseph/5908) CROSS_TOP=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer
CROSS_SDK=AppleTVOS12.1.sdk
BUILD_TOOLS=/Applications/Xcode.app/Contents/Developer
CC='/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode'
CXX='/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -arch arm64 -mtvos-version-min=10.2 -std=c++11 -stdlib=libc++ -fembed-bitcode'
AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
RANLIB=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
➜ ~/work/Phenix/Formulas/work/13164_Ph/arm64/openssl-1.1.1 git:(review/philip_joseph/5908) ./Configure tvos64-cross-arm64 no-async no-shared no-makedepend
Configuring OpenSSL version 1.1.1 (0x1010100fL) for tvos64-cross-arm64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
**********************************************************************
*** ***
*** If you want to report a building issue, please include the ***
*** output from this command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
**********************************************************************
➜ ~/work/Phenix/Formulas/work/13164_Ph/arm64/openssl-1.1.1 git:(review/philip_joseph/5908) make
perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/bn_conf.h.in > crypto/include/internal/bn_conf.h
perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/dso_conf.h.in > crypto/include/internal/dso_conf.h
perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
/Applications/Xcode.app/Contents/Developer/usr/bin/make depend && /Applications/Xcode.app/Contents/Developer/usr/bin/make _all
perl util/mkbuildinf.pl "/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG" "tvos64-cross-arm64" > crypto/buildinf.h
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Icrypto/include -Iinclude -Icrypto -fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o crypto/cversion.o crypto/cversion.c
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar r libcrypto.a crypto/cversion.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib libcrypto.a || echo Never mind.
perl apps/progs.pl apps/openssl > apps/progs.h
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/asn1pars.o apps/asn1pars.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/ca.o apps/ca.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/ciphers.o apps/ciphers.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/cms.o apps/cms.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/crl.o apps/crl.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/crl2p7.o apps/crl2p7.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/dgst.o apps/dgst.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/dhparam.o apps/dhparam.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/dsa.o apps/dsa.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/dsaparam.o apps/dsaparam.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/ec.o apps/ec.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/ecparam.o apps/ecparam.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/enc.o apps/enc.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/engine.o apps/engine.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/errstr.o apps/errstr.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/gendsa.o apps/gendsa.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/genpkey.o apps/genpkey.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/genrsa.o apps/genrsa.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/nseq.o apps/nseq.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64 -mtvos-version-min=10.2 -fembed-bitcode -I. -Iinclude -Iapps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk -fno-common -mtvos-version-min=9.0 -arch arm64 -O3 -D_REENTRANT -DHAVE_FORK=0 -DNDEBUG -c -o apps/ocsp.o apps/ocsp.c
apps/ocsp.c:947:23: error: 'fork' is unavailable: not available on tvOS
switch(fpid = fork()) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk/usr/include/unistd.h:446:8: note: 'fork' has been explicitly marked unavailable
here
pid_t fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
1 error generated.
make[1]: *** [apps/ocsp.o] Error 1
make: *** [all] Error 2
➜ ~/work/Phenix/Formulas/work/13164_Ph/arm64/openssl-1.1.1 git:(review/philip_joseph/5908)
Any ideas how I get past this?