processone / fast_tls

TLS / SSL OpenSSL-based native driver for Erlang / Elixir
https://www.ejabberd.im
Other
83 stars 37 forks source link

configure: error: OpenSSL 'ssl' library was not found #58

Closed leeyisoft closed 2 years ago

leeyisoft commented 2 years ago

macOS Monterey 12.4 (21F79)

MacBook Pro (13-inch, M1, 2020) 型号标识符: MacBookPro17,1 芯片: Apple M1 核总数: 8(4性能和4能效) 内存: 16 GB 系统固件版本: 7459.121.3

如下操作,重新安装了 openssl@1.1 还是报错 : If openssl@1.1 is installed again, an error is reported :

brew install openssl
arch -arm64 brew install openssl@1.1

brew link openssl@1.1 --force

fish_add_path /opt/homebrew/opt/openssl@1.1/bin

ll /opt/homebrew/opt/openssl@1.1
lrwxr-xr-x  1 leeyi  admin    28B  5 21 15:12 /opt/homebrew/opt/openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1m

CCFLAGS="-I//usr/local/opt/openssl/include/" LDFLAGS="-L//usr/local/opt/openssl/lib" ./configure
webrtc-server/_build/default/lib/fast_tls >
./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /opt/homebrew/bin/erl
checking for erlc... /opt/homebrew/bin/erlc
checking for SSL_free in -lssl... no
checking for SHA1_Init in -lcrypto... no
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking openssl/sha.h usability... yes
checking openssl/sha.h presence... yes
checking for openssl/sha.h... yes
checking openssl/opensslv.h usability... yes
checking openssl/opensslv.h presence... yes
checking for openssl/opensslv.h... yes
configure: error: OpenSSL 'ssl' library was not found

./_build/default/lib/fast_tls/config.log

``` This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tls configure 1.0.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure ## --------- ## ## Platform. ## ## --------- ## hostname = leeyideMacBook-Pro.local uname -m = x86_64 uname -r = 21.5.0 uname -s = Darwin uname -v = Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 /usr/bin/uname -p = i386 /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = Mach kernel version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 Kernel configured for up to 8 processors. 8 processors are physically available. 8 processors are logically available. Processor type: i486 (Intel 80486) Processors active: 0 1 2 3 4 5 6 7 Primary memory available: 16.00 gigabytes Default processor set: 520 tasks, 3845 threads, 8 processors Load average: 2.58, Mach factor: 5.41 /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /opt/homebrew/opt/openssl@3/bin PATH: /opt/homebrew/opt/icu4c/sbin PATH: /opt/homebrew/opt/icu4c/bin PATH: /opt/homebrew/opt/sqlite/bin PATH: /opt/homebrew/opt/m4/bin PATH: /opt/homebrew/opt/curl/bin PATH: /opt/homebrew/opt/openssl@1.1/bin PATH: /usr/local/mysql-8.0.23-macos10.15-x86_64/bin PATH: /opt/homebrew/Cellar/pcre2/10.36/bin PATH: /opt/homebrew/Cellar/pcre/8.44/bin/ PATH: /opt/homebrew/opt/php@7.4/sbin PATH: /opt/homebrew/opt/php@7.4/bin PATH: /opt/homebrew/opt/openssl/bin PATH: /opt/homebrew/bin PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/sbin PATH: /sbin PATH: /Library/Apple/usr/bin PATH: /usr/local/go/bin PATH: /Users/leeyi/go/bin PATH: /opt/homebrew/opt/make/libexec/gnubin PATH: /Users/leeyi/workspace/flutter/.pub-cache/bin PATH: /Users/leeyi/workspace/flutter/bin/cache/dart-sdk/bin ## ----------- ## ## Core tests. ## ## ----------- ## configure:2079: checking for gcc configure:2095: found /usr/bin/gcc configure:2106: result: gcc configure:2335: checking for C compiler version configure:2344: gcc --version >&5 Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: x86_64-apple-darwin21.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin configure:2355: $? = 0 configure:2344: gcc -v >&5 Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: x86_64-apple-darwin21.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin configure:2355: $? = 0 configure:2344: gcc -V >&5 clang: error: argument to '-V' is missing (expected 1 value) clang: error: no input files configure:2355: $? = 1 configure:2344: gcc -qversion >&5 clang: error: unknown argument '-qversion'; did you mean '--version'? clang: error: no input files configure:2355: $? = 1 configure:2375: checking whether the C compiler works configure:2397: gcc -I/usr/local/opt/openssl/include/ -I/usr/local/opt/openssl/include/ -L/usr/local/opt/openssl/lib conftest.c >&5 configure:2401: $? = 0 configure:2449: result: yes configure:2452: checking for C compiler default output file name configure:2454: result: a.out configure:2460: checking for suffix of executables configure:2467: gcc -o conftest -I/usr/local/opt/openssl/include/ -I/usr/local/opt/openssl/include/ -L/usr/local/opt/openssl/lib conftest.c >&5 configure:2471: $? = 0 configure:2493: result: configure:2515: checking whether we are cross compiling configure:2523: gcc -o conftest -I/usr/local/opt/openssl/include/ -I/usr/local/opt/openssl/include/ -L/usr/local/opt/openssl/lib conftest.c >&5 configure:2527: $? = 0 configure:2534: ./conftest configure:2538: $? = 0 configure:2553: result: no configure:2558: checking for suffix of object files configure:2580: gcc -c -I/usr/local/opt/openssl/include/ -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:2584: $? = 0 configure:2605: result: o configure:2609: checking whether we are using the GNU C compiler configure:2628: gcc -c -I/usr/local/opt/openssl/include/ -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:2628: $? = 0 configure:2637: result: yes configure:2646: checking whether gcc accepts -g configure:2666: gcc -c -g -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:2666: $? = 0 configure:2707: result: yes configure:2724: checking for gcc option to accept ISO C89 configure:2787: gcc -c -I/usr/local/opt/openssl/include/ -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:2787: $? = 0 configure:2800: result: none needed configure:2820: checking whether make sets $(MAKE) configure:2842: result: yes configure:2858: checking for an ANSI C-conforming const configure:2924: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:2924: $? = 0 configure:2931: result: yes configure:2946: checking how to run the C preprocessor configure:2977: gcc -E -I/usr/local/opt/openssl/include/ conftest.c configure:2977: $? = 0 configure:2991: gcc -E -I/usr/local/opt/openssl/include/ conftest.c conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found #include ^~~~~~~~~~~~~~~~~~ 1 error generated. configure:2991: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "tls" | #define PACKAGE_TARNAME "tls" | #define PACKAGE_VERSION "1.0.10" | #define PACKAGE_STRING "tls 1.0.10" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | /* end confdefs.h. */ | #include configure:3016: result: gcc -E configure:3036: gcc -E -I/usr/local/opt/openssl/include/ conftest.c configure:3036: $? = 0 configure:3050: gcc -E -I/usr/local/opt/openssl/include/ conftest.c conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found #include ^~~~~~~~~~~~~~~~~~ 1 error generated. configure:3050: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "tls" | #define PACKAGE_TARNAME "tls" | #define PACKAGE_VERSION "1.0.10" | #define PACKAGE_STRING "tls 1.0.10" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | /* end confdefs.h. */ | #include configure:3079: checking for grep that handles long lines and -e configure:3137: result: /usr/bin/grep configure:3142: checking for egrep configure:3204: result: /usr/bin/grep -E configure:3209: checking for ANSI C header files configure:3229: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3229: $? = 0 configure:3302: gcc -o conftest -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ -L/usr/local/opt/openssl/lib conftest.c >&5 configure:3302: $? = 0 configure:3302: ./conftest configure:3302: $? = 0 configure:3313: result: yes configure:3326: checking for sys/types.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3326: checking for sys/stat.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3326: checking for stdlib.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3326: checking for string.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3326: checking for memory.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3326: checking for strings.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3326: checking for inttypes.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3326: checking for stdint.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3326: checking for unistd.h configure:3326: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3326: $? = 0 configure:3326: result: yes configure:3340: checking for stdlib.h configure:3340: result: yes configure:3350: checking for GNU libc compatible malloc configure:3374: gcc -o conftest -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ -L/usr/local/opt/openssl/lib conftest.c >&5 configure:3374: $? = 0 configure:3374: ./conftest configure:3374: $? = 0 configure:3384: result: yes configure:3405: checking for ANSI C header files configure:3509: result: yes configure:3571: checking for erl configure:3589: found /opt/homebrew/bin/erl configure:3601: result: /opt/homebrew/bin/erl configure:3680: checking for erlc configure:3698: found /opt/homebrew/bin/erlc configure:3710: result: /opt/homebrew/bin/erlc configure:3743: checking for SSL_free in -lssl configure:3768: gcc -o conftest -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ -L/usr/local/opt/openssl/lib conftest.c -lssl >&5 ld: warning: ignoring file /usr/local/opt/openssl/lib/libssl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64: "_SSL_free", referenced from: _main in conftest-069135.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) configure:3768: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "tls" | #define PACKAGE_TARNAME "tls" | #define PACKAGE_VERSION "1.0.10" | #define PACKAGE_STRING "tls 1.0.10" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_MALLOC 1 | #define STDC_HEADERS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char SSL_free (); | int | main () | { | return SSL_free (); | ; | return 0; | } configure:3777: result: no configure:3783: checking for SHA1_Init in -lcrypto configure:3808: gcc -o conftest -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ -L/usr/local/opt/openssl/lib conftest.c -lcrypto >&5 ld: warning: ignoring file /usr/local/opt/openssl/lib/libcrypto.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64: "_SHA1_Init", referenced from: _main in conftest-5fab1d.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) configure:3808: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "tls" | #define PACKAGE_TARNAME "tls" | #define PACKAGE_VERSION "1.0.10" | #define PACKAGE_STRING "tls 1.0.10" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_MALLOC 1 | #define STDC_HEADERS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char SHA1_Init (); | int | main () | { | return SHA1_Init (); | ; | return 0; | } configure:3817: result: no configure:3823: checking openssl/ssl.h usability configure:3823: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3823: $? = 0 configure:3823: result: yes configure:3823: checking openssl/ssl.h presence configure:3823: gcc -E -I/usr/local/opt/openssl/include/ conftest.c configure:3823: $? = 0 configure:3823: result: yes configure:3823: checking for openssl/ssl.h configure:3823: result: yes configure:3829: checking openssl/err.h usability configure:3829: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3829: $? = 0 configure:3829: result: yes configure:3829: checking openssl/err.h presence configure:3829: gcc -E -I/usr/local/opt/openssl/include/ conftest.c configure:3829: $? = 0 configure:3829: result: yes configure:3829: checking for openssl/err.h configure:3829: result: yes configure:3835: checking openssl/sha.h usability configure:3835: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3835: $? = 0 configure:3835: result: yes configure:3835: checking openssl/sha.h presence configure:3835: gcc -E -I/usr/local/opt/openssl/include/ conftest.c configure:3835: $? = 0 configure:3835: result: yes configure:3835: checking for openssl/sha.h configure:3835: result: yes configure:3841: checking openssl/opensslv.h usability configure:3841: gcc -c -I/usr/local/opt/openssl/include/ -Wall -I/usr/local/opt/openssl/include/ conftest.c >&5 configure:3841: $? = 0 configure:3841: result: yes configure:3841: checking openssl/opensslv.h presence configure:3841: gcc -E -I/usr/local/opt/openssl/include/ conftest.c configure:3841: $? = 0 configure:3841: result: yes configure:3841: checking for openssl/opensslv.h configure:3841: result: yes configure:3849: error: OpenSSL 'ssl' library was not found ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_c_compiler_gnu=yes ac_cv_c_const=yes ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value=-I/usr/local/opt/openssl/include/ ac_cv_env_CPPFLAGS_set=set ac_cv_env_CPPFLAGS_value=-I/usr/local/opt/openssl/include/ ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_ERLCFLAGS_set= ac_cv_env_ERLCFLAGS_value= ac_cv_env_ERLC_set= ac_cv_env_ERLC_value= ac_cv_env_ERL_set= ac_cv_env_ERL_value= ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value=-L/usr/local/opt/openssl/lib ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_func_malloc_0_nonnull=yes ac_cv_header_inttypes_h=yes ac_cv_header_memory_h=yes ac_cv_header_openssl_err_h=yes ac_cv_header_openssl_opensslv_h=yes ac_cv_header_openssl_sha_h=yes ac_cv_header_openssl_ssl_h=yes ac_cv_header_stdc=yes ac_cv_header_stdint_h=yes ac_cv_header_stdlib_h=yes ac_cv_header_string_h=yes ac_cv_header_strings_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_unistd_h=yes ac_cv_lib_crypto_SHA1_Init=no ac_cv_lib_ssl_SSL_free=no ac_cv_objext=o ac_cv_path_EGREP='/usr/bin/grep -E' ac_cv_path_GREP=/usr/bin/grep ac_cv_path_ac_pt_ERL=/opt/homebrew/bin/erl ac_cv_path_ac_pt_ERLC=/opt/homebrew/bin/erlc ac_cv_prog_CPP='gcc -E' ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_cc_c89= ac_cv_prog_cc_g=yes ac_cv_prog_make_make_set=yes ## ----------------- ## ## Output variables. ## ## ----------------- ## CC='gcc' CFLAGS='-I/usr/local/opt/openssl/include/ -Wall' CPP='gcc -E' CPPFLAGS='-I/usr/local/opt/openssl/include/' DEFS='' ECHO_C='\c' ECHO_N='' ECHO_T='' EGREP='/usr/bin/grep -E' ERL='/opt/homebrew/bin/erl' ERLC='/opt/homebrew/bin/erlc' ERLCFLAGS='' EXEEXT='' GREP='/usr/bin/grep' LDFLAGS='-L/usr/local/opt/openssl/lib' LIBOBJS='' LIBS='' LTLIBOBJS='' OBJEXT='o' PACKAGE_BUGREPORT='' PACKAGE_NAME='tls' PACKAGE_STRING='tls 1.0.10' PACKAGE_TARNAME='tls' PACKAGE_URL='' PACKAGE_VERSION='1.0.10' PATH_SEPARATOR=':' SET_MAKE='' SHELL='/bin/sh' ac_ct_CC='gcc' bindir='${exec_prefix}/bin' build_alias='' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' gcov='' host_alias='' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='NONE' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' target_alias='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "tls" #define PACKAGE_TARNAME "tls" #define PACKAGE_VERSION "1.0.10" #define PACKAGE_STRING "tls 1.0.10" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define HAVE_STDLIB_H 1 #define HAVE_MALLOC 1 #define STDC_HEADERS 1 configure: exit 1 ```
nosnilmot commented 2 years ago

You have installed OpenSSL 1.1 for arm64 (arch -arm64 brew install openssl@1.1) but the rest of your toolchain and libraries are targetting x86_64, this cannot work.

leeyisoft commented 2 years ago

您已经为 arm64 ( arch -arm64 brew install openssl@1.1) 安装了 OpenSSL 1.1,但是您的工具链和库的其余部分都针对 x86_64,这是行不通的。

What do I need to do? Can you give me some instructions

nosnilmot commented 2 years ago

I don't know why the majority of your toolchain is set up for x86_64 on an M1 mac but the simplest path forward would probably be to install OpenSSL 1.1 without explicitly requesting arm64:

arch -arm64 brew uninstall  openssl@1.1
brew install openssl@1.1

then you should be able to configure & build with:

LDFLAGS="-L/usr/local/opt/openssl@1.1/lib" CPPFLAGS="-I/usr/local/opt/openssl@1.1/include" CFLAGS="-I/usr/local/opt/openssl@1.1/include" ./configure
make

this will produce x86_64 binaries/libraries which will not be most efficient, but fixing that is beyond the scope of this project (and my knowledge).

leeyisoft commented 2 years ago

我不知道为什么您的大多数工具链都是在 M1 mac 上为 x86_64 设置的,但最简单的前进路径可能是在不明确请求 arm64 的情况下安装 OpenSSL 1.1:

arch -arm64 brew uninstall  openssl@1.1
brew install openssl@1.1

那么你应该能够配置和构建:

LDFLAGS="-L/usr/local/opt/openssl@1.1/lib" CPPFLAGS="-I/usr/local/opt/openssl@1.1/include" CFLAGS="-I/usr/local/opt/openssl@1.1/include" ./configure
make

这将产生 x86_64 二进制文件/库,这不是最有效的,但修复它超出了这个项目的范围(和我的知识)。

The chip of my macbook is Apple M1, the system prompts brew to add prefix "arch -arm64" tomorrow.

brew install openssl@1.1

Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
To rerun under ARM use:
    arch -arm64 brew install ...
To install under x86_64, install Homebrew into /usr/local.
nosnilmot commented 2 years ago

This might work:

arch -x86_64 /usr/local/homebrew/bin/brew install openssl@1.1

but multi-arch on mac is not something I am familiar with, you might find more luck seeking help from brew support resources. The ideal solution would be for you to use M1 native arm64 toolchain and libraries throughout, but that is probably going to involve more significant changes to what you already have installed.

leeyisoft commented 2 years ago

这可能有效:

arch -x86_64 /usr/local/homebrew/bin/brew install openssl@1.1

但是我不熟悉 mac 上的多架构,您可能会发现从 brew 支持资源中寻求帮助会更幸运。理想的解决方案是让您始终使用 M1 本机 arm64 工具链和库,但这可能会对您已经安装的内容进行更重大的更改。

Although the problem has not been solved, thank you for your enthusiasm.

I will ignore this problem and run "eturnal" with Docker first to experience its functions

badlop commented 2 years ago

I guess this issue can be closed, as it seems a specific case and you found an alternative workaround.