Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got error while build for tvOS Simulator #72

Open
kvzn opened this issue May 22, 2024 · 15 comments
Open

Got error while build for tvOS Simulator #72

kvzn opened this issue May 22, 2024 · 15 comments

Comments

@kvzn
Copy link

kvzn commented May 22, 2024

Got error while build for tvOS-Simulator

./build.sh -s 11.0 -m -e
ar qc test/libtestutil.a apps/lib/libtestutil-lib-opt.o test/testutil/libtestutil-lib-apps_shims.o test/testutil/libtestutil-lib-basic_output.o test/testutil/libtestutil-lib-cb.o test/testutil/libtestutil-lib-driver.o test/testutil/libtestutil-lib-fake_random.o test/testutil/libtestutil-lib-format_output.o test/testutil/libtestutil-lib-load.o test/testutil/libtestutil-lib-main.o test/testutil/libtestutil-lib-options.o test/testutil/libtestutil-lib-output.o test/testutil/libtestutil-lib-provider.o test/testutil/libtestutil-lib-random.o test/testutil/libtestutil-lib-stanza.o test/testutil/libtestutil-lib-test_cleanup.o test/testutil/libtestutil-lib-test_options.o test/testutil/libtestutil-lib-tests.o test/testutil/libtestutil-lib-testutil_init.o
/opt/homebrew/Cellar/perl/5.38.2_1/bin/perl apps/progs.pl "-H" "apps/openssl" > apps/progs.h
ranlib -c libssl.a || echo Never mind.
ranlib -c providers/liblegacy.a || echo Never mind.
/Applications/Xcode-14.3.1.app/Contents/Developer/usr/bin/gcc -arch arm64  -Iinclude  -arch arm64 -isysroot /Applications/Xcode-14.3.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator16.4.sdk -mtvos-version-min=9.0  -Os -arch arm64 -target arm64-apple-tvos9.0-simulator  -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -I.. -isysroot /Applications/Xcode-14.3.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator16.4.sdk -MMD -MF test/buildtest_c_aes-bin-buildtest_aes.d.tmp -MT test/buildtest_c_aes-bin-buildtest_aes.o -c -o test/buildtest_c_aes-bin-buildtest_aes.o test/buildtest_aes.c
ranlib -c test/libtestutil.a || echo Never mind.
ld: building for tvOS Simulator, but linking in .tbd built for macOS/Mac Catalyst, file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture arm64
/Applications/Xcode-14.3.1.app/Contents/Developer/usr/bin/gcc -arch arm64  -Iinclude  -arch arm64 -isysroot /Applications/Xcode-14.3.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator16.4.sdk -mtvos-version-min=9.0  -Os -arch arm64 -target arm64-apple-tvos9.0-simulator  -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -I.. -isysroot /Applications/Xcode-14.3.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator16.4.sdk -MMD -MF test/buildtest_c_async-bin-buildtest_async.d.tmp -MT test/buildtest_c_async-bin-buildtest_async.o -c -o test/buildtest_c_async-bin-buildtest_async.o test/buildtest_async.c
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:12654: test/p_minimal.dylib] Error 1
make[1]: *** Waiting for unfinished jobs....
ld: building for tvOS Simulator, but linking in .tbd built for macOS/Mac Catalyst, file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:12667: test/p_test.dylib] Error 1
make[1]: Leaving directory '/Users/Elon/Build-OpenSSL-cURL/openssl/openssl-3.0.13'
make: *** [Makefile:2559: build_sw] Error 2
@jasonacox
Copy link
Owner

Hi @kvzn - It should have failed earlier with the -s 11.0 setting:

Building iOS libraries
Building openssl-3.0.13 for iPhoneOS  armv7 (iOS 11.0)
** ERROR with Build - Check /tmp/openssl*.log
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]
make[1]: *** [apps/lib/libapps-lib-app_rand.o] Error 1
make: *** [build_sw] Error 2

I was able to get a successful compile with:

OPENSSL="3.0.13"        # https://www.openssl.org/source/ 
LIBCURL="8.7.1"         # https://curl.haxx.se/download.html
NGHTTP2="1.60.0"        # https://nghttp2.org/

./build.sh -m -e   

Did you remove the arm7 targets?

@kvzn
Copy link
Author

kvzn commented May 27, 2024

Hi @kvzn - It should have failed earlier with the -s 11.0 setting:

Building iOS libraries
Building openssl-3.0.13 for iPhoneOS  armv7 (iOS 11.0)
** ERROR with Build - Check /tmp/openssl*.log
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]
make[1]: *** [apps/lib/libapps-lib-app_rand.o] Error 1
make: *** [build_sw] Error 2

I was able to get a successful compile with:

OPENSSL="3.0.13"        # https://www.openssl.org/source/ 
LIBCURL="8.7.1"         # https://curl.haxx.se/download.html
NGHTTP2="1.60.0"        # https://nghttp2.org/

./build.sh -m -e   

Did you remove the arm7 targets?

Got the same error even I do like this:

OPENSSL="3.0.13"        # https://www.openssl.org/source/ 
LIBCURL="8.7.1"         # https://curl.haxx.se/download.html
NGHTTP2="1.60.0"        # https://nghttp2.org/

./build.sh -m -e   

I didn't remove arm7 cause I don't know where to.

@jasonacox
Copy link
Owner

Hi @kvzn - I noticed this:

/Applications/Xcode-14.3.1.app

I'm running this version on all my Macs:

$ xcodebuild -version
Xcode 15.3
Build version 15E204a

I'll try to download that version to test. Are you able to upgrade to 15.3?

@ronickg
Copy link

ronickg commented Oct 17, 2024

Same here, using version 3.3.2:

Xcode 16.0
Build version 16A242d

@ronickg
Copy link

ronickg commented Oct 17, 2024

Removing -fembed-bitcode fixed the issue for me.

@jasonacox
Copy link
Owner

Thanks @BubbleTrouble14, can you submit a PR or list which edits you made to the script?

@ronickg
Copy link

ronickg commented Oct 23, 2024

Thanks @BubbleTrouble14, can you submit a PR or list which edits you made to the script?

I actually tried looking further into the problem and it seems to be an issue with how the patching is working for TVOs for newer openssl versions. I tried some different ways to fix the patching, but wasn't able to get it working sadly. Maybe this error log will help.

Configuring OpenSSL version 3.2.2 for target iphoneos-cross
Using os-specific seed configuration
Created configdata.pm
Running configdata.pm
Created Makefile.in
Created Makefile
Created include/openssl/configuration.h

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL.md file first)      ***
***                                                                ***
**********************************************************************
perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/internal/param_names.h.in > include/internal/param_names.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/asn1.h.in > include/openssl/asn1.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/asn1t.h.in > include/openssl/asn1t.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/bio.h.in > include/openssl/bio.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/cmp.h.in > include/openssl/cmp.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/cms.h.in > include/openssl/cms.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/conf.h.in > include/openssl/conf.h
perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/openssl/core_names.h.in > include/openssl/core_names.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/crmf.h.in > include/openssl/crmf.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/crypto.h.in > include/openssl/crypto.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ct.h.in > include/openssl/ct.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/err.h.in > include/openssl/err.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ess.h.in > include/openssl/ess.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/fipskey.h.in > include/openssl/fipskey.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/lhash.h.in > include/openssl/lhash.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ocsp.h.in > include/openssl/ocsp.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/opensslv.h.in > include/openssl/opensslv.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/pkcs12.h.in > include/openssl/pkcs12.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/pkcs7.h.in > include/openssl/pkcs7.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/safestack.h.in > include/openssl/safestack.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/srp.h.in > include/openssl/srp.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ssl.h.in > include/openssl/ssl.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ui.h.in > include/openssl/ui.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509.h.in > include/openssl/x509.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509_vfy.h.in > include/openssl/x509_vfy.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509v3.h.in > include/openssl/x509v3.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" test/provider_internal_test.cnf.in > test/provider_internal_test.cnf
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" depend && "/Applications/Xcode.app/Contents/Developer/usr/bin/make" _build_sw
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-app_libctx.d.tmp -MT apps/lib/libapps-lib-app_libctx.o -c -o apps/lib/libapps-lib-app_libctx.o apps/lib/app_libctx.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-app_params.d.tmp -MT apps/lib/libapps-lib-app_params.o -c -o apps/lib/libapps-lib-app_params.o apps/lib/app_params.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-app_provider.d.tmp -MT apps/lib/libapps-lib-app_provider.o -c -o apps/lib/libapps-lib-app_provider.o apps/lib/app_provider.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-app_rand.d.tmp -MT apps/lib/libapps-lib-app_rand.o -c -o apps/lib/libapps-lib-app_rand.o apps/lib/app_rand.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-app_x509.d.tmp -MT apps/lib/libapps-lib-app_x509.o -c -o apps/lib/libapps-lib-app_x509.o apps/lib/app_x509.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-apps.d.tmp -MT apps/lib/libapps-lib-apps.o -c -o apps/lib/libapps-lib-apps.o apps/lib/apps.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-apps_opt_printf.d.tmp -MT apps/lib/libapps-lib-apps_opt_printf.o -c -o apps/lib/libapps-lib-apps_opt_printf.o apps/lib/apps_opt_printf.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-apps_ui.d.tmp -MT apps/lib/libapps-lib-apps_ui.o -c -o apps/lib/libapps-lib-apps_ui.o apps/lib/apps_ui.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-columns.d.tmp -MT apps/lib/libapps-lib-columns.o -c -o apps/lib/libapps-lib-columns.o apps/lib/columns.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-engine.d.tmp -MT apps/lib/libapps-lib-engine.o -c -o apps/lib/libapps-lib-engine.o apps/lib/engine.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-engine_loader.d.tmp -MT apps/lib/libapps-lib-engine_loader.o -c -o apps/lib/libapps-lib-engine_loader.o apps/lib/engine_loader.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-fmt.d.tmp -MT apps/lib/libapps-lib-fmt.o -c -o apps/lib/libapps-lib-fmt.o apps/lib/fmt.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-http_server.d.tmp -MT apps/lib/libapps-lib-http_server.o -c -o apps/lib/libapps-lib-http_server.o apps/lib/http_server.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-log.d.tmp -MT apps/lib/libapps-lib-log.o -c -o apps/lib/libapps-lib-log.o apps/lib/log.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-names.d.tmp -MT apps/lib/libapps-lib-names.o -c -o apps/lib/libapps-lib-names.o apps/lib/names.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-opt.d.tmp -MT apps/lib/libapps-lib-opt.o -c -o apps/lib/libapps-lib-opt.o apps/lib/opt.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-s_cb.d.tmp -MT apps/lib/libapps-lib-s_cb.o -c -o apps/lib/libapps-lib-s_cb.o apps/lib/s_cb.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-s_socket.d.tmp -MT apps/lib/libapps-lib-s_socket.o -c -o apps/lib/libapps-lib-s_socket.o apps/lib/s_socket.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iapps/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-tlssrp_depr.d.tmp -MT apps/lib/libapps-lib-tlssrp_depr.o -c -o apps/lib/libapps-lib-tlssrp_depr.o apps/lib/tlssrp_depr.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aes/libcrypto-lib-aes_cbc.d.tmp -MT crypto/aes/libcrypto-lib-aes_cbc.o -c -o crypto/aes/libcrypto-lib-aes_cbc.o crypto/aes/aes_cbc.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aes/libcrypto-lib-aes_cfb.d.tmp -MT crypto/aes/libcrypto-lib-aes_cfb.o -c -o crypto/aes/libcrypto-lib-aes_cfb.o crypto/aes/aes_cfb.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aes/libcrypto-lib-aes_core.d.tmp -MT crypto/aes/libcrypto-lib-aes_core.o -c -o crypto/aes/libcrypto-lib-aes_core.o crypto/aes/aes_core.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aes/libcrypto-lib-aes_ecb.d.tmp -MT crypto/aes/libcrypto-lib-aes_ecb.o -c -o crypto/aes/libcrypto-lib-aes_ecb.o crypto/aes/aes_ecb.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aes/libcrypto-lib-aes_ige.d.tmp -MT crypto/aes/libcrypto-lib-aes_ige.o -c -o crypto/aes/libcrypto-lib-aes_ige.o crypto/aes/aes_ige.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aes/libcrypto-lib-aes_misc.d.tmp -MT crypto/aes/libcrypto-lib-aes_misc.o -c -o crypto/aes/libcrypto-lib-aes_misc.o crypto/aes/aes_misc.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aes/libcrypto-lib-aes_ofb.d.tmp -MT crypto/aes/libcrypto-lib-aes_ofb.o -c -o crypto/aes/libcrypto-lib-aes_ofb.o crypto/aes/aes_ofb.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aes/libcrypto-lib-aes_wrap.d.tmp -MT crypto/aes/libcrypto-lib-aes_wrap.o -c -o crypto/aes/libcrypto-lib-aes_wrap.o crypto/aes/aes_wrap.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/aria/libcrypto-lib-aria.d.tmp -MT crypto/aria/libcrypto-lib-aria.o -c -o crypto/aria/libcrypto-lib-aria.o crypto/aria/aria.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/asn1/libcrypto-lib-a_bitstr.d.tmp -MT crypto/asn1/libcrypto-lib-a_bitstr.o -c -o crypto/asn1/libcrypto-lib-a_bitstr.o crypto/asn1/a_bitstr.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/asn1/libcrypto-lib-a_d2i_fp.d.tmp -MT crypto/asn1/libcrypto-lib-a_d2i_fp.o -c -o crypto/asn1/libcrypto-lib-a_d2i_fp.o crypto/asn1/a_d2i_fp.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -fPIC -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk -mtvos-version-min=9.0  -DOPENSSL_PIC -DOPENSSLDIR="\"/tmp/openssl-3.2.2-tvOS-arm64\"" -DENGINESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.2.2-tvOS-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/asn1/libcrypto-lib-a_digest.d.tmp -MT crypto/asn1/libcrypto-lib-a_digest.o -c -o crypto/asn1/libcrypto-lib-a_digest.o crypto/asn1/a_digest.c
apps/lib/http_server.c:156:24: error: 'fork' is unavailable: not available on tvOS
  156 |         switch (fpid = fork()) {
      |                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/unistd.h:447:8: note: 'fork' has been explicitly marked unavailable here
  447 | pid_t    fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
      |          ^
1 error generated.
make[1]: *** [apps/lib/libapps-lib-http_server.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [build_sw] Error 2

@jasonacox
Copy link
Owner

jasonacox commented Oct 24, 2024

Configuring OpenSSL version 3.2.2

I see the issue. I haven't tested the script with that version. It currently only works for the 3.0 series which is the Long Term Support (LTS) version and is supported until 7th September 2026 (see link).

It is possible that 3.2.x will work, but I haven't had luck with the non-LTS versions in the past. They tend to change a lot between minor revs which breaks the script.

Specifically, the reason you are getting the fork() error is that this section of the build script will need to be updated to support version higher than 3.0:

if [[ "$OPENSSL_VERSION" = "openssl-3.0"* ]]; then
# LANG=C sed -i -- 's/!defined(OPENSSL_NO_POSIX_IO)/defined(HAVE_FORK)/' "./apps/ocsp.c"
LANG=C sed -i -- 's/fork()/-1/' "./apps/speed.c"
LANG=C sed -i -- 's/fork()/-1/' "./apps/lib/http_server.c"
LANG=C sed -i -- 's/fork()/-1/' "./test/drbgtest.c"
LANG=C sed -i -- 's/undef NO_FORK/define NO_FORK/' "./crypto/async/arch/async_posix.h"
export CC="${BUILD_TOOLS}/usr/bin/gcc -arch ${ARCH}"
fi

You could change the condition to just run the tvOS fixes for anything above 3.x:

if [[ "$OPENSSL_VERSION" = "openssl-3"* ]]; then

If that works, we can update it.

I should probably add code to warn someone if they set the version to a non-LTS version.

@ronickg
Copy link

ronickg commented Oct 26, 2024

Yes it fixed the build issue for tvOS. But i now get an error for armv7 iPhoneOS:

/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -fembed-bitcode -arch armv7  -Iinclude  -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=8.0  -O3 -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF test/buildtest_c_aes-bin-buildtest_aes.d.tmp -MT test/buildtest_c_aes-bin-buildtest_aes.o -c -o test/buildtest_c_aes-bin-buildtest_aes.o test/buildtest_aes.c
ld: warning: -bitcode_bundle is no longer supported and will be ignored
ld: warning: -bitcode_bundle is no longer supported and will be ignored
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -fembed-bitcode -arch armv7  -Iinclude  -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=8.0  -O3 -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF test/buildtest_c_blowfish-bin-buildtest_blowfish.d.tmp -MT test/buildtest_c_blowfish-bin-buildtest_blowfish.o -c -o test/buildtest_c_blowfish-bin-buildtest_blowfish.o test/buildtest_blowfish.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -fembed-bitcode -arch armv7  -Iinclude  -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=8.0  -O3 -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF test/buildtest_c_bn-bin-buildtest_bn.d.tmp -MT test/buildtest_c_bn-bin-buildtest_bn.o -c -o test/buildtest_c_bn-bin-buildtest_bn.o test/buildtest_bn.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -fembed-bitcode -arch armv7  -Iinclude  -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=8.0  -O3 -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF test/buildtest_c_buffer-bin-buildtest_buffer.d.tmp -MT test/buildtest_c_buffer-bin-buildtest_buffer.o -c -o test/buildtest_c_buffer-bin-buildtest_buffer.o test/buildtest_buffer.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -fembed-bitcode -arch armv7  -Iinclude  -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" -fno-common -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=8.0  -O3 -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF test/buildtest_c_camellia-bin-buildtest_camellia.d.tmp -MT test/buildtest_c_camellia-bin-buildtest_camellia.o -c -o test/buildtest_c_camellia-bin-buildtest_camellia.o test/buildtest_camellia.c
ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [test/p_test.dylib] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [test/p_minimal.dylib] Error 1
make: *** [build_sw] Error 2

Which is due to the bitcode.

Tried running the script with "-b": ./build.sh -b -o 3.2.2

Which didnt seem to have any effect

@jasonacox
Copy link
Owner

You will need to edit:

if [[ "$OPENSSL_VERSION" = "openssl-3.0"* ]]; then
CC_BITCODE_FLAG=""
else
CC_BITCODE_FLAG="-fembed-bitcode"
fi

to this as well

if [[ "$OPENSSL_VERSION" = "openssl-3"* ]]; then

@jasonacox
Copy link
Owner

And if all of this works, let me know and we can update the project so it works with 3.2.2

@ronickg
Copy link

ronickg commented Nov 5, 2024

@jasonacox Yes compiles now for me.

@jasonacox
Copy link
Owner

Awesome! Thanks @ronickg, do you want to submit this as a PR to get contribution credit? ...otherwise I will make the change.

jasonacox added a commit that referenced this issue Nov 10, 2024
@jasonacox
Copy link
Owner

I updated the script to use the updated logic ("openssl-3"*) which should help it compile OpenSSL versions higher than 3.0.

@ronickg
Copy link

ronickg commented Nov 13, 2024

@jasonacox Sorry for the late reply. Thx for the fix and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants