From owner-freebsd-questions@FreeBSD.ORG Mon Jul 17 22:25:22 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA73816A4DE for ; Mon, 17 Jul 2006 22:25:22 +0000 (UTC) (envelope-from mwm-keyword-freebsdquestions.8c5a2e@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id C05CF43D6E for ; Mon, 17 Jul 2006 22:25:17 +0000 (GMT) (envelope-from mwm-keyword-freebsdquestions.8c5a2e@mired.org) Received: (qmail 4846 invoked by uid 1001); 17 Jul 2006 22:25:17 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Mon, 17 Jul 2006 18:25:16 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17596.3659.286257.639099@bhuda.mired.org> Date: Mon, 17 Jul 2006 18:25:15 -0400 To: Bob In-Reply-To: <44BBFE49.4080602@tania.servebbs.org> References: <44BA98A9.9040903@tamara-b.org> <17594.43423.928991.591165@bhuda.mired.org> <44BACE63.9030800@tania.servebbs.org> <17595.42791.720165.478108@bhuda.mired.org> <44BBFE49.4080602@tania.servebbs.org> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer Cc: freebsd-questions@freebsd.org Subject: Re: LinkLib Issues In freebsd Lazarus X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2006 22:25:23 -0000 In <44BBFE49.4080602@tania.servebbs.org>, Bob typed: > I have been involved in a parallel discussion on the fpc-devel list, and > have discovered a few facts which will impact the manufacture of a > freepascal Lazarus port. In fact, what I have learned will impact the > usability of FPC on freepascal itself. > > The "problem" which initiated this thread was the "wrong naming" of some > libraries. Well, it turns out that this renaming was done mid-stream by > the freebsd development team, and not by the freepascal folks. > > It seems that from freebsd 6.0 to freebsd 6.1 (the one I am using) > library names were arbitrarily changed. The ones I ran into were libgdk, > libgtk, and libglib. In all previous versions (prior to 6.1) of freebsd, > the lib versions 1.2 were named libgdk12, libgtk12, and libglib12 they > were changed in 6.1 to libgdk-12, libgtk-12, and libglib-12 > respectively. I wonder how many more library names were changed? This is > a real blow to any third party software developer, who's software will > likely start to bomb on freebsd6.1, where it ran just fine on 6.0 I can't help with this. I have no idea why it was done - it certainly wasn't discussed on -hackers. > BIG problem! If I compile a program on my 6.1 system, which makes any > dynamic calls to these libraries (and possibly others as yet unknown), > that executable will ONLY run on freebsd 6.1, and bomb on all prior > versions. My "fix" of patching the freepascal 2.0.2, or your method of > sym-linking, while fixing the local problem of compiling Lazarus, breaks > all portability to previous freebsd installs. This is a bad thing the > freebsd folks have done! Well, one solution is to distribute sources - which works especially well if you provide a port. See below for more on that. If you want to distribute binaries, you could simply include the correct libraries in your tarball, and only install them if they aren't installed. > There are some dirty work-arounds, and according to the fpc developers, > they will be implementing some new tools to deal with this in fpc-2.0.4, > who's rc2 has just been released. > > I can see making these kinds of changes from a 5.x version to a 6.x > version, as bad as even that would be, but to make such a change from > within the 6.x branch is pretty inconsiderate IMHO. > > Given the above, it would be senseless to create a "port" of lazarus, > which would require a "port" of the "patched" fpc sources, (as a > dependency), and then have a development system which was tied to a > particular version of freebsd. No, it's not senseless. You can *ask* the various libraries what they need, by runnig "gdk-pixbuf-config --libs", for example. However, you shouldn't need to do that. Adding something like "USE_GNOME=gdkpixbuf" to your port Makefile will cause the Makefile to add all the appropriate dependencies to CFLAGS. Except you may not use CFLAGS, and may have to go back to gdk-pixbuf-config to get the data you need. You may even need to tweak the output to make it accpetable to fpc. Basically, this change is only really painfull if you want to distribute binaries. In that case, you could, as mentioned above,distribute binaries of the libraries as well. Or you could not support anything prior to 6.1 (actually, that's not correct - my 5.5 system has the new library naming). Or - since this change is in the ports system, not FreeBSD proper, and the ports tree can be updated independently of the base system, require that 6.0 users update their ports tree and the libraries in question. Please note, I'm not trying to defend or justify this change - you pointing it out is the first I'd heard of it. I'm just trying to point out some ways you can deal with it. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.