Closed leeyisoft closed 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.
您已经为 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
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).
我不知道为什么您的大多数工具链都是在 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.
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.
这可能有效:
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
I guess this issue can be closed, as it seems a specific case and you found an alternative workaround.
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 :
./_build/default/lib/fast_tls/config.log