私はRed Hat Enterprise Linux Serverリリース7.0(Maipo)で作業しています。サーバーはOpenSSL 1.0.1を提供します。 OpenSSLにリンクしようとすると、多くの暗号エラーが発生します。ここで`[email protected] '(および他のもの)への未定義の参照
は私のリンクコマンドのコマンドラインは、(コマンドラインでのような順序)である:私は実行しているとき
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssh2.so.1: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssh2.so.1: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssh2.so.1: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
/lib64/libssl.so.10: undefined reference to `[email protected]'
...
:
ll /usr/lib64/libcrypto.so
をここで
g++ -g -O2 -Wl,-rpath -o output file1.o libprivate_lib1.so -Lprivate_path -llib1 -ldl \
-lpthread -llib2 -lexpat -lgtest -lgtest_main -lboost_regex -lboost_filesystem -llzma \
-lcrypto private_lib2.so private_lib3.so -llib3
は、エラーの一部です
取得中
/usr/lib64/libcrypto.so -> libcrypto.so.1.0.1e
し、実行:
objdump -tT /usr/lib64/libcrypto.so.1.0.1e | grep COMP_zlib
私はそれが私がこのライブラリでそれを持っていることを意味し
000000000013e500 g DF .text 0000000000000002 libcrypto.so.10 COMP_zlib_cleanup
000000000013e460 g DF .text 000000000000009e libcrypto.so.10 COMP_zlib
を取得します。 最も奇妙なことは、Redhat 6.5/4ではリンクできますが、7より上のRedhatでは失敗しているということです。 提案はありますか?
質問は不明であり、潜在的な原因がたくさんある可能性があります。リンクしようとしているものや使用しているツールのバージョン、CLIの使用方法(CLIの引数など)はわかりません。 – ray
おそらく、あなたはlibcryptoにリンクするのを忘れましたか? libsslにリンクするフラグの後に '-lcrypto'リンクフラグ**を追加してください。あるいは、Red Hat 7.0と互換性のないマシンでコンパイルした互換性のないライブラリにリンクしようとしているかもしれません。いずれにしても、問題を詳細に記述することをお勧めします。この出力を生成した実際のコマンドを表示してください。 – nos
私はcrypto lib(コマンドラインを追加)とリンクしています。私はそれがredhat 6.5/4でコンパイルできるので、redhat 7.に関連していると思います。 – yehudahs