安装Rosetta 2
|
1 |
/usr/sbin/softwareupdate --install-rosetta |
打开一个Rosetta终端
|
1 |
arch -x86_64 /usr/bin/env bash |
|
1 |
arch -x86_64 /usr/bin/env zsh |
编译相关
zlib
- 开始编译
编译openssl
- 拉代码
rosetta- 需要
M2下编译x86_64
- 需要
|
1 |
arch -x86_64 /usr/bin/env zsh |
- 配置
|
1 |
./Configure darwin64-x86_64-cc no-shared --prefix=`pwd`/out |
|
1 |
./Configure darwin64-x86_64-cc --prefix=`pwd`/out |
- 编译安装
- 安装上面所指定的路径,将会安装在当前路径下的
out文件夹里面
- 安装上面所指定的路径,将会安装在当前路径下的
|
1 2 |
make make install |
macOS编译libcurl
- 创建配置
|
1 |
./buildconf |
- 如果提示
Do not use buildconf. Instead, just use: autoreconf -fi- 进行下面
automake安装
- 进行下面
|
1 |
brew install automake |
- 检查
automake
|
1 2 |
which automake which aclocal |
- 如果安装了
automake,但是路径不在环境变量里(上面的检查检查不到)- 进行手动配置
|
1 |
export PATH=$PATH:/path/to/automake:/path/to/aclocal |
- 安装好之后,按照上面的提示,重新配置
|
1 |
autoreconf -fi |
- 配置选项
- 示例编译静态库
- 带
openssl
|
1 |
./configure --disable-shared --enable-static --with-ssl=/Users/enlink/Downloads/openssl-1.1.1v/out --prefix=$(pwd)/out |
|
1 |
./configure --disable-shared --enable-static --with-ssl=/Users/enlink/Downloads/openssl-1.1.1v/ --with-libssl-prefix=/Users/enlink/Downloads/openssl-1.1.1v/ --with-libssl-include=/Users/enlink/Downloads/openssl-1.1.1v/include --with-libssl-lib=/Users/enlink/Downloads/openssl-1.1.1v/lib --prefix=$(pwd)/out |
makemake install
声明:本文为原创文章,版权归Aet所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ Visual Studio:内存泄露AddressSanitizer(跨平台)03/14
- ♥ X86_64汇编学习记述四08/09
- ♥ Zlib记述:一09/17
- ♥ VMaware:安装MacOS 10.14.610/16
- ♥ Macos进入Recovery界面关闭SIP09/19
- ♥ Cef:介绍06/29
热评文章
- lldb调试 0
- 各平台调试方法总结记述一 0
- Macos编译x86_64相关一 0
- macOS应用记述一 0
- Macos用户类型相关 0
- Macos蓝牙相关 0