1830938 Members
1693 Online
110017 Solutions
New Discussion

perlxs on itanium

 
perlxs on itanium
New Member

perlxs on itanium

We are trying to build a shared library to be used with perl using perlxs. When we try to run perl we are recieving a Unresolved reference error. Looking at the shared library we see that many of the standard functions are undefined.

In previous versions of HP we included the the functions in the shared library using the compiler flag '+A'. With Itanium this flag has been removed and it appears that the standard static libraries are not available. How do we include these functions in the shared library?
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: perlxs on itanium

Shalom perlxs,

Please post:

$SHLIB_PATH value.

compiler flags.

Error output. Your error infro is insufficient.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
perlxs on itanium
New Member

Re: perlxs on itanium

SHLIB_PATH is /lib/hpux32
When running perl I recieve
Can't load '/opt/perl5.10/lib/site_perl/5.10.1/IA64.ARCHREV_0-thread-multi/auto/ProductCenter/ProductCenter.so' for module ProductCenter: Unresolved external at /opt/perl5.10/lib/5.10.1/IA64.ARCHREV_0-thread-multi/DynaLoader.pm line 200.
at exampleCnxn.pl line 4
Compilation failed in require at exampleCnxn.pl line 4.
BEGIN failed--compilation aborted at exampleCnxn.pl line 4.

My linking flags are
-b -Wl,+vnocompatwarnings -L/usr/local/lib -L/usr/lib/hpux32 -L/lib/hpux32
Dennis Handly
Acclaimed Contributor

Re: perlxs on itanium

>Looking at the shared library we see that many of the standard functions are undefined.

Don't look at the shlib. Only look at errors. If your functions are in libc.so, they are always present.

>we included the the functions in the shared library using the compiler flag '+A'.

I don't see how. +A creates an archive only executable and won't work for shlibs.

>How do we include these functions in the shared library?

You don't, that's not supported and violates your license agreement.
dld will automatically get them from libc.so.

>SHLIB_PATH is /lib/hpux32

This isn't valid. The correct setting would be:
export LD_LIBRARY_PATH=/usr/lib/hpux32

Since this is the default, remove it.

>My linking flags are
-b -Wl,+vnocompatwarnings -L/usr/local/lib -L/usr/lib/hpux32 -L/lib/hpux32

You should remove the last two, they are the default.

>Unresolved external at ...

This message is garbage. It doesn't tell you what the unsat is. Unless those lines tell you something?

It looks like you need my show_remaining_imports_elf.sh from this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1261297