Mailing List Archive

How to create HP-UX dynamic module?
I'm trying to create a dynamically loaded module on an HP-UX9 machine.
When I compile Perl, it says that:

Making POSIX (static)

Making SDBM_File (static)

so it seems to be linking everything statically into the Perl binary:
cc -o perl perlmain.o libperl.a lib/auto/DynaLoader/DynaLoader.a lib/auto/Fcntl/Fcntl.a lib/auto/POSIX/POSIX.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Socket/Socket.a `cat ext.libs` -lm -ldld

I could easily be mistaken about what it's doing, though, since I'm not
familiar with this situation.

What's the deal with dynamic loading on HP-UX? The compiler seems to
be looking for a shared library object, but Perl's Makemaker doesn't
seem to know about it.

-Eric
Re: How to create HP-UX dynamic module? [ In reply to ]
> I'm trying to create a dynamically loaded module on an HP-UX9 machine.
> When I compile Perl, it says that:
>
> Making POSIX (static)
>
> Making SDBM_File (static)
>
> so it seems to be linking everything statically into the Perl binary:
> cc -o perl perlmain.o libperl.a lib/auto/DynaLoader/DynaLoader.a lib/auto/Fcntl/Fcntl.a lib/auto/POSIX/POSIX.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Socket/Socket.a `cat ext.libs` -lm -ldld
>
> I could easily be mistaken about what it's doing, though, since I'm not
> familiar with this situation.
>
> What's the deal with dynamic loading on HP-UX? The compiler seems to
> be looking for a shared library object, but Perl's Makemaker doesn't
> seem to know about it.

In your config.sh, what is the value of the "dynamic_ext" variable? This
should contain a list of those modules that you want created dynamically.

Mine is:

dynamic_ext='Fcntl POSIX SDBM_File Socket NDBM_File'

Jeff
Re: How to create HP-UX dynamic module? [ In reply to ]
Did you have do run "Configure" manually, or did "Configure -d" create
dynamic_ext='Fcntl POSIX SDBM_File Socket NDBM_File'

for you? I changed that line in my "config.sh", but it built them statically
again, anyway.

Can you send me your config.sh file?

Thanks,
-Eric

> From: Jeff Okamoto <okamoto@hpcc123.corp.hp.com>
> Subject: Re: How to create HP-UX dynamic module?
> To: Eric.Arnold@Corp
>
> > I'm trying to create a dynamically loaded module on an HP-UX9 machine.
> > When I compile Perl, it says that:
> >
> > Making POSIX (static)
> >
> > Making SDBM_File (static)
> >
> > so it seems to be linking everything statically into the Perl binary:
> > cc -o perl perlmain.o libperl.a lib/auto/DynaLoader/DynaLoader.a lib/auto/Fcntl/Fcntl.a lib/auto/POSIX/POSIX.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Socket/Socket.a `cat ext.libs` -lm -ldld
> >
> > I could easily be mistaken about what it's doing, though, since I'm not
> > familiar with this situation.
> >
> > What's the deal with dynamic loading on HP-UX? The compiler seems to
> > be looking for a shared library object, but Perl's Makemaker doesn't
> > seem to know about it.
>
> In your config.sh, what is the value of the "dynamic_ext" variable? This
> should contain a list of those modules that you want created dynamically.
>
> Mine is:
>
> dynamic_ext='Fcntl POSIX SDBM_File Socket NDBM_File'
>
> Jeff
>
Re: How to create HP-UX dynamic module? [ In reply to ]
> > I'm trying to create a dynamically loaded module on an HP-UX9 machine.
> > When I compile Perl, it says that:
> >
> > Making POSIX (static)
> >
> > Making SDBM_File (static)
> >
> > so it seems to be linking everything statically into the Perl binary:
> > cc -o perl perlmain.o libperl.a lib/auto/DynaLoader/DynaLoader.a lib/auto/Fcntl/Fcntl.a lib/auto/POSIX/POSIX.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Socket/Socket.a `cat ext.libs` -lm -ldld
> >
> > I could easily be mistaken about what it's doing, though, since I'm not
> > familiar with this situation.
> >
> > What's the deal with dynamic loading on HP-UX? The compiler seems to
> > be looking for a shared library object, but Perl's Makemaker doesn't
> > seem to know about it.

Bizarre things happen if you set the environment variable LDOPTS=-a archive

For some reason the sysadmin folks here set it in the system profile. Unset'ing
it has always fixed the problem for us.

tog

Terry Greenlaw (on-site @ Lockheed Martin) Encompass Technologies
z50816@mip.lasc.lockheed.com terry@encompass.is.net