apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <wsanc...@MIT.EDU>
Subject Re: library versioning name
Date Thu, 19 Sep 2002 21:53:37 GMT
On Monday, September 16, 2002, at 06:00  PM, Greg Stein wrote:

>> Now, I have few binaries that I still didn't recompile that are using 
>> DB-3.3
>> (I just brought them over from an old system) but when I ldd them:
>
> Yup. But try and build those *today* and have them still link against
> DB-3.3. You need the parallel install stuff.

   The problem isn't solved by making everyone use -lapr-1.  You also 
have to (as noted in the document Ben sent us) make everyone #include 
<apr-1/foo.h>, otherwise you are linking to a library other than the 
one your headers correspond to.  So unless you are going to do that as 
well, I think the exercise is a waste of time, pretending to fix 
something, but falling short in ways that could create some 
interestingly hard to find bugs.

   You also have to bump the version whenever the library is no longer 
backwards-compatible, such as adding an argument to an existing 
function, or deleting a function.

   Now the drag is that if you upgrade APR, you have to go through all 
your code and fix the #includes.  That kinda sucks.

   So maybe encapsulating the whole install in versioned directories is 
a better option.

   Pier, frameworks do provide the right information for all versions, 
but there is no compiler flag in OS X to build and link against an old 
version, which is moderately lame.  I do think it would be swell if the 
GNU folks could be convinced to add something like -framework to 
standard gcc, though it could probably use some improvement over the 
current model in Darwin.

	-wsv


Mime
View raw message