Alan Coopersmith-san wrote (02/18/09 06:38 AM):
>
> Takao Fujiwara - Tokyo S/W Center wrote:
>> def _findLib_ldconfig(name):
>> + if not os.path.exists('/sbin/ldconfig'):
>> + return None
>> +
>
> The Solaris equivalent to print the system default library
> path is /usr/bin/crle - default output covers 32-bit apps,
> add -64 flag to get 64-bit library paths.
Cool, I didn't know /usr/bin/crle .
I agree it's better to use os.popen('env LC_MESSAGES=C /usr/bin/crle
2>/dev/null').read().
>
>> @@ -171,8 +174,24 @@
>> return None
>> return res.group(0)
>>
>> + def _findLib_env(name):
>> + paths = os.environ.get('LD_LIBRARY_PATH')
>
> LD_LIBRARY_PATH_32 & LD_LIBRARY_PATH_64 take precedence over
> LD_LIBRARY_PATH if they're set, since they're more specific
> (32-bit only & 64-bit only).
>
>> + if paths:
>> + paths += ':/usr/lib'
>> + else:
>> + paths = '/usr/lib'
>
> Shouldn't /lib be in the default too? (Though crle will
> provide that for you.)
You're definitely right.
Now I think using crle would be better instead of ldconfig and LD_LIBRARY_PATH
is nice to have in this case.
>