问题:linux上编译openssl-1.0.2t动态库版本
编译命令:
./Configure --prefix=/home/greatwall/thirdparty/openssl-1.0.2t/shared shared linux-aarch64
make -j4 CC=clang CXX=clang++
报错如下:
/usr/bin/ld: libcrypto.a(gost_eng.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `stderr@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: libcrypto.a(gost_eng.o)(.text+0x2a8): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
/usr/bin/ld: final link failed: Bad value
原因:
之前编译完成静态库,没有清理干净,出现问题