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

Build on Intel Mac with Sonoma fails on openssl / MacOS/arm64 #66

Open
olekrisek opened this issue Dec 14, 2023 · 2 comments
Open

Build on Intel Mac with Sonoma fails on openssl / MacOS/arm64 #66

olekrisek opened this issue Dec 14, 2023 · 2 comments

Comments

@olekrisek
Copy link

Hi, I got this error when I try to build:
Mac : Mac-Mini 2018,
OS: Sonoma 14.2

% ./build.sh -o 3.1.4 -c 8.1.2 -n 1.55.1 -d -e -i 12.3 -a 12.3
Build-OpenSSL-cURL
This script builds OpenSSL, nghttp2 and libcurl for MacOS, iOS and tvOS devices.
Targets: x86_64, armv7, armv7s, arm64 and arm64e

Building OpenSSL
Downloading openssl-3.1.4.tar.gz
** Building OpenSSL openssl-3.1.4 **
Unpacking openssl
+ Activate Static Engine
Building Mac libraries
Building openssl-3.1.4 for x86_64 (MacOS 12.3)
Testing binary for x86_64:
OpenSSL 3.1.4 24 Oct 2023 (Library: OpenSSL 3.1.4 24 Oct 2023)
Building openssl-3.1.4 for arm64 (MacOS 12.3)
** ERROR with Build - Check /tmp/openssl*.log
==> /tmp/openssl-3.0.9-arm64.log <==
1 error generated.
make[1]: *** [apps/lib/libapps-lib-names.o] Error 1
make: *** [build_sw] Error 2

==> /tmp/openssl-3.0.9-x86_64.log <==
rm -f providers/fips*.new
rm -f openssl.pc libcrypto.pc libssl.pc
find . -type l \! -name '.*' -exec rm -f {} \;

==> /tmp/openssl-3.1.4-arm64.log <==
1 error generated.
make[1]: *** [apps/lib/libapps-lib-apps.o] Error 1
make: *** [build_sw] Error 2

==> /tmp/openssl-3.1.4-x86_64.log <==
rm -f providers/fips*.new
rm -f openssl.pc libcrypto.pc libssl.pc
find . -type l \! -name '.*' -exec rm -f {} \;

and the mentioned log file:

-DENGINESDIR="\"/tmp/openssl-3.1.4-arm64/lib/engines-3\"" -DMODULESDIR="\"/tmp/openssl-3.1.4-arm64/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -I.. -isysroot /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk  -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
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from apps/lib/apps.c:21:
In file included from include/openssl/engine.h:24:
In file included from include/openssl/bn.h:20:
In file included from include/openssl/e_os2.h:234:
/Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found
#include_next <inttypes.h>
              ^~~~~~~~~~~~
apps/lib/engine.c:17:10: fatal error: 'string.h' file not found
In file included from apps/lib/app_rand.c:10:
In file included from apps/include/apps.h:13:
In file included from include/internal/e_os.h:16:
In file included from include/openssl/e_os2.h:234:
/Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found
#include_next <inttypes.h>
              ^~~~~~~~~~~~

What should I do ?

@jasonacox
Copy link
Owner

Hi @olekrisek - Thanks for opening this.

./build.sh -o 3.1.4 -c 8.1.2 -n 1.55.1 -d -e -i 12.3 -a 12.3

It seems you are trying to use OpenSSL 3.1 version. Try switching to OpenSSL 3.0 series which is a Long Term Support (LTS) version and is supported until 7th September 2026. OpenSSL versioning is a bit odd (3.1 and 3.2 will expire before 3.0) and the MINOR versions tend to be breaking. For that reason, we focus on the LTS (5 year) version for the project to make it easier to maintain.

I did update the version to latest LTS for all the libraries and it did compile successfully. Please let me know if this helps!

OPENSSL="3.0.9"         # https://www.openssl.org/source/ 
LIBCURL="8.1.2"         # https://curl.haxx.se/download.html
NGHTTP2="1.55.1"        # https://nghttp2.org/

@olekrisek
Copy link
Author

Thank you !! This works.

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

2 participants