tar zxf openssl-3.0.1.tar.gz
cd openssl-3.0.1/
mkdir openssl_install
./config no-asm shared --prefix=/home/test/share/otherLibs/curl/openssl-3.0.1/openssl_install --cross-compile-prefix=aarch64-linux-gnu-
./config no-asm shared --prefix=$(pwd)/openssl_install --cross-compile-prefix=aarch64-linux-gnu-
gedit Makefile
#编辑Makefile文件 搜索-m64 都去掉,保存(参考下图),不去掉编译会报错。
make -j8
make install
sudo apt build-dep curl
tar -zxf curl-7.80.0.tar.gz
cd curl-7.80.0/
mkdir curl_install
./configure -disable-ldap --disable-ldaps --enable-static --prefix=$(pwd)/curl_install --host=arm-linux CC=aarch64-linux-gnu-gcc CFLAGS="-fPIC" -with-ssl=/home/test/share/otherLibs/curl/openssl-3.0.1/openssl_install --with-openssl=/home/test/share/otherLibs/curl/openssl-3.0.1/openssl_install
make -j8
make install
使用有下面错误 解决方法 -lcurl -lcrypto -lssl 这几个链接库放在最后链接
loud::OSS::ComputeContentMD5[abi:cxx11](char const*, unsigned long)':
Utils.cc:(.text+0xf00): undefined reference to `MD5'
Utils.cc:(.text+0xf10): undefined reference to `EVP_EncodeBlock'
../libs/\libalibabacloud-oss-cpp-sdk-static.a(Utils.cc.o): In function `AlibabaC
loud::OSS::ComputeContentMD5[abi:cxx11](std::istream&)':
Utils.cc:(.text+0xf64): undefined reference to `EVP_MD_CTX_new'
Utils.cc:(.text+0xf74): undefined reference to `EVP_MD_CTX_reset'
Utils.cc:(.text+0xf80): undefined reference to `EVP_MD_CTX_set_flags'
Utils.cc:(.text+0xf84): undefined reference to `EVP_md5'
Utils.cc:(.text+0xf94): undefined reference to `EVP_DigestInit_ex'
Utils.cc:(.text+0x1094): undefined reference to `EVP_DigestUpdate'
Utils.cc:(.text+0x10b0): undefined reference to `EVP_DigestFinal_ex'
Utils.cc:(.text+0x10b8): undefined reference to `EVP_MD_CTX_free'
Utils.cc:(.text+0x1108): undefined reference to `EVP_EncodeBlock'
../libs/\libalibabacloud-oss-cpp-sdk-static.a(Utils.cc.o): In function `AlibabaC