为什么我无法在 Solaris 10 上构建加载 Socket.so 的 Perl 模块?
我正在尝试构建 Convert::ASN1 模块,但在此过程中出现错误。我在 Solaris 10 上使用 Perl 5.12.0。 perl Makefile.PL
运行没有问题,与 make
相同,但“make test”抛出此错误:
最关键的部分IT IMO:
t/00prim.t ....... Can't load '/usr/local/lib/perl5/5.12.0/sun4-solari +s/auto/Socket
/Socket.so' for module Socket: ld.so.1: perl5.12.0: fata +l:
relocation error: file /usr/local/lib/perl5/5.12.0/sun4-solaris/au +to/Socket/Socket.so:
symbol inet_aton: referenced symbol not found at + /usr/local/lib/perl5/5.12.0/XSLoader.pm
line 70.
当我尝试安装 IO::Socket 时,发生了同样的错误。我认为Socket核心模块一定有问题。这不是错误日志的全部,而是主要部分。
I am trying to build Convert::ASN1 module but I get an error in the process. I am using Perl 5.12.0 on Solaris 10. perl Makefile.PL
runs without trouble, same for make
, but 'make test' throws this error:
MOST CRUCIAL PART OF IT IMO:
t/00prim.t ....... Can't load '/usr/local/lib/perl5/5.12.0/sun4-solari +s/auto/Socket
/Socket.so' for module Socket: ld.so.1: perl5.12.0: fata +l:
relocation error: file /usr/local/lib/perl5/5.12.0/sun4-solaris/au +to/Socket/Socket.so:
symbol inet_aton: referenced symbol not found at + /usr/local/lib/perl5/5.12.0/XSLoader.pm
line 70.
Same error occured when I tried to install IO::Socket. I think something must be wrong with the Socket core module. This is not all of the error log but the main part.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
注意:这个答案纯粹是猜测,因为我没有 Solaris 机器来测试它。
Solaris 似乎没有将
inet_aton
放入libsocket
中,这可能是您构建Socket
时所链接的内容。相反,看起来您需要将-lresolv
添加到 Makefile 中的LIBS
行(我不知道这是否在Makefile.PL< /code> 用于
套接字
...)。正如我所说,这纯粹是猜测。我主要从 DBMail 的错误报告中提取这个答案< /a>.不过,我希望它能让你有所收获。
Note: this answer is pure conjecture as I don't have a Solaris machine to test this on.
It looks like Solaris doesn't put
inet_aton
inlibsocket
, which is presumably what is being linked against when you buildSocket
. Instead, it looks like you need to add-lresolv
to theLIBS
line in the Makefile (I don't know if this is in theMakefile.PL
forSocket
...).Like I said, this is pure conjecture. I'm pulling this answer mostly from this bug report for DBMail. I hope it gets you somewhere, though.
我没有安装 Perl 5.12,但我可以访问 Solaris 10,并且我可以确认 Solaris 的 libsocket 没有
inet_aton
(它有inet_pton
) )。但解析器库 (
libresolv
) 确实有 inet_aton,因此解决方法可能是添加到 Makefile 的 LDFLAGS,并在 cpan 之外自行构建/安装它。
I don't have a Perl 5.12 installation, but I do have access to Solaris 10, and I can confirm that Solaris' libsocket does not have
inet_aton
(it hasinet_pton
instead).But the resolver library (
libresolv
) does have inet_aton, so a workaround may be to addto the Makefile's LDFLAGS, and build/install it yourself outside of cpan.