Where to put private lib files?

Stephen Hurd shurd at sasktel.net
Tue Feb 23 10:57:49 UTC 2010


Dag-Erling Smørgrav wrote:
> "Ronald" <followait at 163.com> writes:
>   
>> I think the global lib directories is not so good, because it should
>> be for public libs.
>>
>> The libs private to one application, where to put them?
>>     
>
> The canonical location for ports is ${LIBDIR}/${PORTNAME}, but remember
> that unless these are run-time loadable modules, this directory must be
> in the library search path when you run the app.  This means that you
> either have to ldconfig the directory using an rc_subr script (which
> defeats the purpose of having a private library directory) or install a
> wrapper that sets LD_LIBRARY_PATH before execing the real binary.
>   

You can also compile in a search path.



More information about the freebsd-chat mailing list