1

Solaris 10 で LibreSSSL 3.0.2 をコンパイルしようとしています。GNU gcc 4.6.2 を使用しており、次の問題があります。

Making all in tests
make[1]: Entering directory `/users/login/e486530/openssh81/libressl-3.0.2/tests'
CCLD     handshake_table
/soft/gnu/lib/gcc/i386-pc-solaris2.10/4.6.2/../../../../i386-pc-solaris2.10/bin/ld: /users/login/e486530/openssh81/libressl-3.0.2/crypto/.libs/libcrypto.a(getentropy_solaris.o): undefined reference to symbol 'SHA512Final'
/soft/gnu/lib/gcc/i386-pc-solaris2.10/4.6.2/../../../../i386-pc-solaris2.10/bin/ld: note: 'SHA512Final' is defined in DSO /lib/libmd.so.1 so try adding it to the linker command line
/lib/libmd.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

エラーは「シンボル 'SHA512Final への未定義参照」です

作成された提案は、「SHA512Final」が DSO /lib/libmd.so.1 で定義されているため、リンカー コマンド ラインに追加してみてくださいしかし、「/lib/libmd.so.1 : シンボルを読み取れませんでした: 無効な操作」というエラーが発生した直後に、コンパイラがこのライブラリからシンボルを読み取ろうとしているようですが、成功しませんでした。

Solaris で LibreSSL をコンパイルして成功させるアイデアはありますか?


私はいくつかの詳細を追加します...

コンパイルは、 i386用の Solaris 10 でGNU gcc コンパイラ 4.6.2 を使用して行われます。コンパイル用のビットを設定しません。

GNU gcc は、オプション -v を使用して次の情報を表示します

$ gcc -v
Using built-in specs.
COLLECT_GCC=/soft/gnu/bin/gcc
COLLECT_LTO_WRAPPER=/soft/gnu/libexec/gcc/i386-pc-solaris2.10/4.6.2/lto-wrapper
Target: i386-pc-solaris2.10
Configured with: ../gcc-4.6.2/configure --prefix=/soft/gnu --with-gnu-ld --with-gnu-as --with-gmp=/soft/gnu --with-mpc=/soft/gnu --with-mpfr=/soft/gnu
Thread model: posix
gcc version 4.6.2 (GCC)

uname -a オプションは次のように表示します。

$ uname -a
SunOS yvas0pd0 5.10 Generic_150401-30 i86pc i386 i86pc

フラグを付けて再コンパイルしました:

CC="gcc -m64"
CXX="g++ -m64"

そして、エラーは今です

/soft/gnu/lib/gcc/i386-pc-solaris2.10/4.6.2/../../../../i386-pc-solaris2.10/bin/ld: /users/login/e486530/openssh81/libressl-3.0.2/crypto/.libs/libcrypto.a(getentropy_solaris.o): undefined reference to symbol 'SHA512Final'
/soft/gnu/lib/gcc/i386-pc-solaris2.10/4.6.2/../../../../i386-pc-solaris2.10/bin/ld: note: 'SHA512Final' is defined in DSO /lib/amd64/libmd.so.1 so try adding it to the linker command line
/lib/amd64/libmd.so.1: could not read symbols: Invalid operation

したがって、現在使用されているライブラリは 64 ビット ライブラリですが、問題は残ります... :-|

それが役に立てば幸い。当面は、正常にコンパイルされる OpenSSL 1.1.1 を使用します。

よろしく

4

1 に答える 1

2

コンパイルで表示されるエラー

'SHA512Final' is defined in DSO /lib/amd64/libmd.so.1 so try adding it to the linker command line
/lib/amd64/libmd.so.1: could not read symbols: Invalid operation

ファイル /lib/amd64/libmd.so.1 がリンカーによって使用されていないことを実際に意味します。本当の意味を誤解しています。

したがって、LDFLAGS 変数に -lmd を追加すると、コンパイルが終了します。

参考までに、コンパイルで使用した LDFLAGS 変数の完全な内容は次のとおりです。

export LDFLAGS="-Wl,-disable-new-dtags,-rpath=/opt/openssh-8.1/lib,-lmd"

于 2020-01-23T12:08:54.653 に答える