gpt4 book ai didi

compiler-errors - Solaris 10上的LibreSSL 3.0.2编译错误: undefined reference to symbol 'SHA512Final'

转载 作者:行者123 更新时间:2023-12-02 10:45:01 25 4
gpt4 key购买 nike

我们正在尝试在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吗?

我添加一些细节...

使用GNU gcc编译器4.6.2在Solaris 10上针对 i386 进行了编译。我不设置编译位。

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。

问候

最佳答案

编译中显示的错误

'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。我误解了真正的含义。

因此, 将-lmd添加到LDFLAGS变量使编译完成

有关信息,我的编译中使用的LDFLAGS变量的完整内容如下:

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

关于compiler-errors - Solaris 10上的LibreSSL 3.0.2编译错误: undefined reference to symbol 'SHA512Final' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59763468/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com