[SunHELP] libiconv.so.2

Steve Sandau ssandau at gwi.net
Thu May 26 20:28:17 CDT 2005


Matthew Weigel wrote:
> 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.
> 

I usually use crle so that all programs will find the libraries I use. 
Typically I will run crle to see the current paths then run crle -l 
/usr/lib:/usr/local/lib + whatever other paths I need. My current Ultra2 
workstation shows me this with crle:


Configuration file [version 3]: /var/ld/ld.config
   Default Library Path (ELF): 
/usr/lib:/usr/local/lib:/usr/local/csw/lib:/opt/sfw/lib:/usr/local/ssl/lib
   Trusted Directories (ELF):	/usr/lib/secure  (system default)

Command line:
   crle -c /var/ld/ld.config -l 
/usr/lib:/usr/local/lib:/usr/local/csw/lib:/opt/sfw/lib:/usr/local/ssl/lib

Steve



More information about the SunHELP mailing list