[OpenIndiana-discuss] How many versions of libs/apps should OI provide?

Peter Tribble peter.tribble at gmail.com
Fri Dec 23 11:10:25 UTC 2016


On Thu, Dec 22, 2016 at 6:14 PM, Jay F. Shachter <jay at m5.chicago.il.us>
wrote:

>
> Now, imagine a png package that contains the old header files, call it
> png-devel version 1, and a png package that contains the new header
> files, call it png-devel version 2.  The discussion on this mailing
> list seems to be whether hipster should publish more than one version
> of a library.  But this question can only arise with respect to
> binaries, because libraries contain version numbers, so that
> whizbang.so.1 and whizbang.so.2 can coexist on the same system.  With
> respect to header files, two versions cannot coexist on the same
> system.  Version 1 of the png-devel package will contain the file
> /usr/include/png.h and version 2 of the png-devel package will also
> contain the file /usr/include/png.h and consequently installing one of
> the versions will overwrite a file that belonged to the other version.
>

Not so. In the case of libpng, the header files are also versioned so that
you
can tell it which version to compile against. The bare /usr/include/png.h
is a
symlink to whatever you've chosen as your default version. (And the
libraries
for different versions have different names.) So to build against, say
libpng
version 1.2.x, you would have

-I/usr/include/libpng12

and

-lpng12

This shows, by the way, that the possible solutions depend on which package
you're discussing.

(It's not plain sailing, even with something like png. You can end up with
something pulling in both libpng12 and libpng14, for example, if you haven't
updated all the dependent libraries as well.)

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/


More information about the openindiana-discuss mailing list