develooper Front page | perl.perl5.porters | Postings from February 2000

[ID 20000218.005] DynaLoader behavior w.r.t. LD_LIBRARY_PATHconfuses me

Thread Next
February 18, 2000 17:55
[ID 20000218.005] DynaLoader behavior w.r.t. LD_LIBRARY_PATHconfuses me
Message ID:
This is a bug report for perl from,
generated with the help of perlbug 1.26 running under perl 5.00502.

[Please enter your report here]

DynaLoader on solaris 7 seems to ignore libpth and follow LD_LIBRARY_PATH
instead.  I discovered this when some CGI programs of mine using a new
version of mysql began to fail when execute by the server (as nobody)
because of mysql's affection for  I had in /usr/local/lib,
and I see the following in DynaLoader on that machine:

  push(@dl_library_path, split(' ', '/usr/local/lib /lib /usr/lib'));

Nevertheless, was never found unless LD_LIBRARY_PATH was set.  I
wound up having to symlink into /lib.  I tried a couple of other

  BEGIN { $ENV{LD_LIBRARY_PATH} = "/usr/local/lib" }

for example, but that didn't seem to have any effect.

I must be missing something here.  Is there a way other than LD_LIBRARY_PATH
to specify a run-time loading path for Perl modules on Solaris?  If so,
what is it?

Do @dl_library_path and/or libpth have ANYTHING to do with how DynaLoader
actually works on Solaris?

(Please reply via email--was dropped from p5p a while ago when I had
a couple of ~1 day net outages, and haven't bothered to resubscribe.)


Joseph N. Hall, 5 Sigma Productions        mailto:" <joseph> "
Author, Effective Perl Programming . . . . .
Perlfaq Prime  . . . . . . . . . . . . . . . . . .

[Please do not change anything below this line]

Site configuration information for perl 5.00502:

Configured by root at Thu Dec 31 02:40:42 MST 1998.

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos rom 5.7 generic sun4u sparc sunw,ultrasparc-iii-engine '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    cc='gcc -B/usr/ccs/bin/', optimize='-O', gccversion=egcs-2.91.60 19981201 (egcs-1.1.1 release)
    ccflags ='-I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:

@INC for perl 5.00502:

Environment for perl 5.00502:
    LANG (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About