views:

48

answers:

2

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.

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 in libsocket, which is presumably what is being linked against when you build Socket. Instead, it looks like you need to add -lresolv to the LIBS line in the Makefile (I don't know if this is in the Makefile.PL for Socket...).

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.

CanSpice
Thanks for the reply, while searching for solutions on the internet I found this: http://rt.perl.org/rt3/Public/Bug/Display.html?id=2930 , its from the perl bug reports about Socket. The person described a very similar if not identical problem and a way he solved it on Solaris. He mentions adding -lresolv to the library lines as you did. I ll try the whole procedure he describes and report back with my findings.
A: 

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 has inet_pton instead).

But the resolver library (libresolv) does have inet_aton, so a workaround may be to add

-lresolv

to the Makefile's LDFLAGS, and build/install it yourself outside of cpan.

Nick Dixon