From owner-freebsd-ports Mon Feb 8 20:24:46 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA00877 for freebsd-ports-outgoing; Mon, 8 Feb 1999 20:24:46 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from adelphi.physics.adelaide.edu.au (adelphi.physics.adelaide.edu.au [129.127.36.247]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA00872 for ; Mon, 8 Feb 1999 20:24:43 -0800 (PST) (envelope-from kkennawa@physics.adelaide.edu.au) Received: from mercury (mercury [129.127.36.44]) by adelphi.physics.adelaide.edu.au (8.8.8/8.8.8/UofA-1.5) with SMTP id OAA04629; Tue, 9 Feb 1999 14:54:40 +1030 (CST) Received: from localhost by mercury; (5.65v3.2/1.1.8.2/27Nov97-0404PM) id AA13959; Tue, 9 Feb 1999 14:54:39 +1030 Date: Tue, 9 Feb 1999 14:54:38 +1030 (CST) From: Kris Kennaway To: Marc van Kempen Cc: ports@FreeBSD.ORG Subject: Re: Shared library problem In-Reply-To: <199902082018.VAA15439@bowtie.nl> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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