[SunHELP] libiconv.so.2

Matthew Weigel unique at idempot.net
Thu May 26 11:49:52 CDT 2005


Clif Smith said:
> So, there's no way I can compile perl so it knows where the library is
> itself vs. telling users to set this and/or me setting it in
> /etc/profile, etc.?

1- Yes, you could fix it as you compile Perl.  I haven't compiled Perl,
but  "-R/path" in the argument list to ld will do it.  That might go
through gcc ("-Wl,-R/path"), or it might not.  If Perl uses autoconf then
adding "-R/path" to your LDFLAGS environment variable (or "-Wl,..." to
CCFLAGS) while running configure should do it.

2- You could also add it to the global library search path using crle(1). 
If you use crle, you have to add *all* paths, not just the non-default
paths... so be sure to check what the current defaults are before doing
anything.

While playing with crle, I recommend having a root shell open that has the
environment variable LD_NOCONFIG set; if you screw up, you may be
completely unable to spawn new processes.  Note that since su strips LD_*
environment variables when it runs, you won't even be able to set
LD_NOCONFIG and then su to root - su attempts to spawn the new process
after LD_NOCONFIG is stripped.  Same applies to sudo if you've installed
that.

Each has pros and cons, if you only want v5.6.1 to see that library path
then you should set its runpath, but it can get tedious to set every
single executable's runpath separately if it doesn't cause conflicts.
-- 
 Matthew Weigel
 hacker
 unique at idempot.net



More information about the SunHELP mailing list