[cvsnt-dev] CVSLIB & standard cvsnt installation conflict

Jens Miltner jum at mac.com
Wed Feb 22 23:08:12 UTC 2006


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Hello everybody,

In MacCvsX, I have currently 'embedded' cvsnt in the application  
package (i.e. it's a subfolder of the application): instead of  
requiring the user to install cvsnt on their system, MacCvsX uses the  
cvsnt distribution inside it's application's Resources folder by  
settings the DYLD_LIBRARY_PATH and CVSLIB environment variables to  
point to that place inside the application package.

This works fairly well as long as no cvsnt installation is available  
in the standard location (i.e. /usr/lib for the cvsnt modules). _If_  
there is a standard installation in /usr, the protocol modules are  
loaded from that location. The reason is that even though cvsnt  
searches for them in the CVSLIB directory and loads them from there,  
what cvsnt passes to dlopen is the libtool-generated .la file, which  
contains a reference to the standard location in /usr/lib/cvsnt. If  
there is a file available at that location, it is loaded regardless  
of the settings of DYLD_LIBRARY_PATH. Here's the pserver_protocol.la  
file as an example:

> # pserver_protocol.la - a libtool library file
> # Generated by ltmain.sh - GNU libtool 1.5.6 (1.1220.2.95  
> 2004/04/11 05:50:42) Debian: 224 $
> #
> # Please DO NOT delete this file!
> # It is necessary for linking the library.
>
> # The name that we can dlopen(3).
> dlname='pserver_protocol.so'
>
> # Names of this library.
> library_names='pserver_protocol.so pserver_protocol.so  
> pserver_protocol.so'
>
> # The name of the static archive.
> old_library=''
>
> # Libraries that this one depends upon.
> dependency_libs=' -L/Users/jens/Development/Entwicklung/cvsnt/cvsnt/ 
> build/osx /usr/lib/libiconv.la'
>
> # Version information for pserver_protocol.
> current=0
> age=0
> revision=0
>
> # Is this an already installed library?
> installed=yes
>
> # Should we warn about portability when linking against -modules?
> shouldnotlink=yes
>
> # Files to dlopen/dlpreopen
> dlopen=''
> dlpreopen=''
>
> # Directory that this library needs to be installed in:
> libdir='/usr/lib/cvsnt'

That last line is the hint causing the problem if a standard  
installation is available.
(I found out about this problem because the version I had embedded  
was much older than the installed version, so some symbols were  
missing from it's shared protocol support DLL, which causes the  
pserver protocol to fail to load because the shared protocol support  
lib was already loaded from the embedded location.)
This is a really nasty problem, since libraries from the standard  
installation and the embedded installation would be mixed and most  
likely strange things would happen if they are not exactly the same  
version!

Since I don't know too much about the libtool details: does anybody  
have an idea how to get libtool to leave out this explicit location  
hint (short of specifying some crappy PREFIX in the configuration,  
hoping that path would never exist)?

Thanks,
</jum>



More information about the cvsnt-dev mailing list