Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jan 2001 21:47:19 -0600
From:      Jeremy Shaffner <jeremy@external.org>
To:        Richard Browne <richb@pobox.com.au>
Cc:        ports@freebsd.org
Subject:   Re: Ports, shared libraries, dependencies and versions
Message-ID:  <20010102214719.A84037@external.org>
In-Reply-To: <002501c0752a$ef9b1c10$0e1a24cb@scorpio>; from richb@pobox.com.au on Wed, Jan 03, 2001 at 01:14:43PM %2B1100
References:  <002501c0752a$ef9b1c10$0e1a24cb@scorpio>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 03, 2001 at 01:14:43PM +1100, Richard Browne wrote:
> I've a couple of questions about the FreeBSD ports system. I'm new to Unix
> so please excuse any misunderstanding on my part. All help/comments will be
> appreciated:
> 
> 1. From what I can make out, in general package dependencies are specified
> using full '-x.y.z' version numbers. For example, packages that depend on
> gtk require 'gtk-1.2.8'. This seems very inflexible to me. For example,
> suppose a new version of gtk comes out - 'gtk-1.2.9'. I can't upgrade easily
> because I have many (possible hundreds) of packages that depend on
> 'gtk-1.2.8'. The GNOME people's convention seems to be that their shared
> libraries are installed as 'libgtk-1.2.so'. This implies that all 1.2
> releases, for example, will be binary compatible. Wouldn't it make sense
> then for FreeBSD ports to depend on 'gtk-1.2.*'?

Don't confuse the naming convention used for ports & packages with the naming
convention used for shared libraries.  You *could* upgrade to 'gtk-1.2.9' 
because the actual dependancy is on "gtk12.2".  You would simply:

# cd /usr/ports/x11-toolkit/gtk12
# make clean (if you didn't clean from last time)
# make
# pkg_delete gtk-1.2.8 (this way you've made sure the new version compiles first)
# make install

Since it's still binary compatible, everything would be fine.  If it's not,
it's GTK's fault.

Your pkg_delete will complain (you may have to force it), but you can ignore
the warnings.

> 2. If I compile the sources from GNOME, 'libgtk-1.2.so' is installed on my
> system. Installing the gtk port/package installs 'libgtk12.so'. The naming
> scheme has been changed for FreeBSD. I suppose it doesn't matter, but why go
> to the effort of changing the established GNOME/Unix convention?

See #4.
 
> 3. Actually, the shared libraries installed seem to be 'libgtk-1.2.so.N' or
> 'libgtk12.so.N'. What does the N indicate?

Minor version.  It's here that a binary incompatibility is likely to show up.
 
> 4. Are there any docs/resources around that discuss shared libraries on
> Unix. In particular, what are the conventions for versioning etc. What does
> one do to handle different apps that require different versions of the same
> shared library?

I can't answer the first two, but FreeBSD names the ports and libraries the
way it does BECAUSE you may have some apps that require different versions
of the same library.  Note that the includes for gtk12 are installed in
/usr/X11R6/include/gtk12.  And the gtk-config app is installed as gtk12-config
, etc.  You could have gtk13 (the development version) installed simultaneously
You couldn't do this if you installed manually.  Many Ports are handled
in this fasion, most notably TCL and Tk.

And it all works out in the end because of the magic provided by ld(1)
and friends.

-- 

---------------------------------------------------------------------
Jeremy Shaffner                         | This space for rent.
jeremy@external.org                     | $ grep happiness life
http://www.external.org/~jeremy/pgp.key | FreeBSD: The Power to Serve


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010102214719.A84037>