Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Feb 1999 14:54:38 +1030 (CST)
From:      Kris Kennaway <kkennawa@physics.adelaide.edu.au>
To:        Marc van Kempen <marc@bowtie.nl>
Cc:        ports@FreeBSD.ORG
Subject:   Re: Shared library problem
Message-ID:  <Pine.OSF.4.05.9902091442570.13062-100000@mercury.physics.adelaide.edu.au>
In-Reply-To: <199902082018.VAA15439@bowtie.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Feb 1999, Marc van Kempen wrote:

> I'm having a discussion on the gtk development list about the linking
> scheme that is imposed when configuring for FreeBSD 2.2.x.

> At the moment symlinks as follows are created when installing the beast
> (gtk+-1.1.15 and glib-1.1.15)
> 
> 	libgtk-1.1.so.14.1
> 	libgtk.a
> 	libgtk.la
> 	libgtk.so -> libgtk-1.1.so.14.1
> 
> If I leave out the link below:
> 
> 	libgtk.so.14.1 -> libgtk-1.1.so.14.1
> 
> Things go wrong when trying to link, since gtk-config (a shell script to
> return library flags and compiler flags) returns -lgtk, and thus the 
> aout linker tries to link with libgtk.a
> 
> My proposed solution (adding the link) was rejected because that would get
> in the way of versioning, since after the gtk-1.2 is released they will
> continue with gtk-1.3 and multiple libraries must be able to coexist.
> 
> To cut a long story short, another solution is to have 'gtk-config' specify
> -lgtk-1.1 as the library to link with, however is the following reason
> valid to determine this case:
> 
>  "if the version_type is sunos, or freebsd-aout, and no
>   soname_spec is set, then put -lgtk-1.1 into gtk-config."
> 
> Or to put it more simply, when freebsd-aout is found is it safe to
> assume that -lgtk-1.1 is necessary?

If you're linking against GTK 1.1.x, you want -lgtk11d ('d' for development), 
for /usr/ports/x11-toolkits/gtk11-devel, currently gtk 1.1.14. -lgtk11 is
/usr/ports/x11-toolkits/gtk11, currently 1.1.3 or something. -lgtk10 is GTK
1.0.6. Similar naming conventions apply to the glib* ports.

I don't believe FreeBSD installs libgtk.* libraries using the port, since
these would stomp on top of one another when the latest port you installed
tries to set itself up as the default.

The reason for this naming convention is to allow different ports and versions
(1.0/1.1) to coexist (and there are significant differences between the three 
versions current in the ports tree) - something designed for one will often
not work with a higher version, especially trying to replace 1.0 with 1.1.

This doesn't affect ports too much for those using GNU configure, since you
can always point the GTK_CONF/GLIB_CONF (sp?) environment variables at the
location of the gtk-config/glib-config script (e.g.
/usr/X11R6/bin/gtk11d-config) and have it pick up the correct libraries to
link against.

For ports which aren't quite so smart, you may have to manually exit the
reference to gtk-config to point to the correct copy. It's still quite easy to
do..I don't know that it's something which the GTK folks need to change about
their build process (except, possibly, to stop breaking backwards
compatability with the API). On the other hand, perhaps we should consider
naming our libraries libgtk-1.1{d}.so.* instead of libgtk11d.so.* to bring
ourselves more into line with what the rest of the GTK world uses.

Kris

-----
(ASP) Microsoft Corporation (MSFT) announced today that the release of its 
productivity suite, Office 2000, will be delayed until the first quarter
of 1901.


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?Pine.OSF.4.05.9902091442570.13062-100000>