jasonacox / Build-OpenSSL-cURL

Scripts to build OpenSSL, HTTP/2 (nghttp2) and cURL (libcurl) for MacOS, iOS and tvOS devices (x86_64, armv7, armv7s, arm64, arm64e). Now Supporting Apple Silicon, OpenSSL 3.0.x with TLS 1.3 and Mac Catalyst builds.
MIT License
430 stars 129 forks source link

./build.sh error #22

Closed wanJunGe closed 5 years ago

wanJunGe commented 6 years ago

hello,when i building the OpenSSL and curl. error occured.

the steps is bellow: cd ~/cross-compile git clone https://github.com/jasonacox/Build-OpenSSL-cURL.git cd Build-OpenSSL-cURL/

Open build.sh with your favorite test editor and change the curl version to 7.55.1 and save. now the content is like this: " ########################################

EDIT this section to Select Versions

########################################

OPENSSL="1.0.2l" LIBCURL="7.55.1" NGHTTP2="1.24.0"

######################################## "

Run the script: ./build.sh

the error message is:

Building OpenSSL Cleaning up Downloading openssl-1.0.2l.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 5239k 100 5239k 0 0 63726 0 0:01:24 0:01:24 --:--:-- 79059 Unpacking openssl Building Mac libraries Building openssl-1.0.2l for x86_64 Copying headers Building iOS libraries Building openssl-1.0.2l for iPhoneOS armv7 Building openssl-1.0.2l for iPhoneOS armv7s Building openssl-1.0.2l for iPhoneOS arm64 Building openssl-1.0.2l for iPhoneSimulator x86_64 Building openssl-1.0.2l for iPhoneSimulator i386 Building tvOS libraries Building openssl-1.0.2l for AppleTVOS arm64 Building openssl-1.0.2l for AppleTVSimulator x86_64 Cleaning up Done

Building nghttp2 for HTTP2 support pkg-config installed Cleaning up Downloading nghttp2-1.24.0.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 611 0 611 0 0 454 0 --:--:-- 0:00:01 --:--:-- 454 32 2126k 32 696k 0 0 1685 0 0:21:32 0:07:03 0:14:29 0 curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 * ERROR with Build - Check /tmp/nghttp2.log tail: /tmp/nghttp2*.log: No such file or directory

Building Curl Building with HTTP2 Support (nghttp2) Cleaning up Downloading curl-7.55.1.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3648k 100 3648k 0 0 45897 0 0:01:21 0:01:21 --:--:-- 55168 Unpacking curl Building Mac libraries Building curl-7.55.1 for x86_64 * ERROR with Build - Check /tmp/curl.log configure: pkg-config: IDN_CPPFLAGS: "-I/usr/local/Cellar/libidn2/2.0.5/include" configure: pkg-config: IDN_DIR: "/usr/local/Cellar/libidn2/2.0.5/lib" checking if idn2_lookup_ul can be linked... yes checking idn2.h usability... yes checking idn2.h presence... yes checking for idn2.h... yes configure: Added /usr/local/Cellar/libidn2/2.0.5/lib to LD_LIBRARY_PATH checking for i386-apple-darwin-pkg-config... /usr/local/bin/pkg-config checking for libnghttp2 options with pkg-config... no configure: error: --with-nghttp2 was specified but could not find libnghttp2 pkg-config file.

Libraries...

openssl [1.0.2l] Architectures in the fat file: openssl/Mac/lib/libcrypto.a are: x86_64 Architectures in the fat file: openssl/Mac/lib/libssl.a are: x86_64 Architectures in the fat file: openssl/iOS/lib/libcrypto.a are: armv7 i386 x86_64 arm64 Architectures in the fat file: openssl/iOS/lib/libssl.a are: armv7 i386 x86_64 arm64 Architectures in the fat file: openssl/tvOS/lib/libcrypto.a are: x86_64 arm64 Architectures in the fat file: openssl/tvOS/lib/libssl.a are: x86_64 arm64

nghttp2 (rename to libnghttp2.a) [1.24.0] fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: nghttp2/lib/*.a (No such file or directory)

libcurl (rename to libcurl.a) [7.55.1] fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: curl/lib/*.a (No such file or directory)

Creating archive in archive/libcurl-7.55.1-openssl-1.0.2l-nghttp2-1.24.0... cp: curl/lib/.a: No such file or directory cp: nghttp2/lib/.a: No such file or directory Archiving Mac binaries for curl and openssl... mv: rename /tmp/curl to archive/libcurl-7.55.1-openssl-1.0.2l-nghttp2-1.24.0/curl: No such file or directory % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 210k 100 210k 0 0 49632 0 0:00:04 0:00:04 --:--:-- 52767 ./build.sh: line 84: archive/libcurl-7.55.1-openssl-1.0.2l-nghttp2-1.24.0/curl: No such file or directory

how can i build the OpenSSL and curl successfully?

jasonacox commented 6 years ago

This error: curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 54

That would seem to indicate that the version of curl you currently have on your computer (in your path) is having problems with https. You can test it by manually running the curl command to fetch the archive:

curl -LO https://github.com/nghttp2/nghttp2/releases/download/v1.24.0/1.24.0.tar.gz