From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 16 19:51:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7853216A4E1 for ; Sun, 16 Jul 2006 19:51:27 +0000 (UTC) (envelope-from bob@tamara-b.org) Received: from mail1.panix.com (mail1.panix.com [166.84.1.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id C631343D82 for ; Sun, 16 Jul 2006 19:51:19 +0000 (GMT) (envelope-from bob@tamara-b.org) Received: from mailspool3.panix.com (mailspool3.panix.com [166.84.1.78]) by mail1.panix.com (Postfix) with ESMTP id 38B0C58879 for ; Sun, 16 Jul 2006 15:51:19 -0400 (EDT) Received: from [192.168.1.100] (pool-71-247-9-241.nycmny.east.verizon.net [71.247.9.241]) by mailspool3.panix.com (Postfix) with ESMTP id 78F69AF0261 for ; Sun, 16 Jul 2006 15:51:15 -0400 (EDT) Message-ID: <44BA98A9.9040903@tamara-b.org> Date: Sun, 16 Jul 2006 15:51:05 -0400 From: Bob Richards User-Agent: Thunderbird 1.5 (X11/20060628) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: LinkLib Issues In freebsd Lazarus X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2006 19:51:27 -0000 Hi Folks: I believe this is a "hacker" issue, at least any possible solution is. I recently moved from Linux to FreeBSD as my primary work environment. My development system of choice is FreePascal. I installed FPC-2.0.2 from the official FreePascal distribution tar ball, and all compiled/installed without a hitch; all my CVS sources compile and run. My next step was to install Lazarus, the FPC IDE, and here is where I have run into troubles. A tar-ball install ran well until Lazarus was being Linked. The errors were: the following libraries were not found by ld: glib12, gdk12, and gtk12. a grep -r in the FPC-2.0.2 source tree revealed the problems, in every case of: packages/extra/ glib, gtk, and gdk the linklib statements were wrong thus: {$ifdef FreeBSD} gtkdll='gtk12'; {$linklib gtk12} So, I created a patch to fix the above constructs to: {$ifdef FreeBSD} gtkdll='gtk-12'; {$linklib gtk-12} For all three libraries; since freebsd names these libraries with a "-" I recompiled and reinstalled FPC-2.0.2 with the patches applied, re-tested the compiler; all OK! I went back to the Lazarus source tree gmake clean; gmake and received the following error: Free Pascal Compiler version 2.0.2 [2006/07/14] for i386 Copyright (c) 1993-2005 by Florian Klaempfl Target OS: FreeBSD/ELF for i386 Compiling lazarus.pp Linking ../lazarus /usr/bin/ld: cannot find -lgdk_pixbuf lazarus.pp(113,1) Error: Error while linking a locate gdk_pixbuf finds: /usr/X11R6/lib/libgdk_pixbuf-2.0 So, at this point I just sym-linked my libgdk_pixbuf-2.0 to libgdk_pixbuf: ln -s libgdk_pixbuf-2.0.a libgdk_pixbuf.a and ran gmake again, only to produce: Linking ../lazarus /usr/home/bob/lazarus/lcl/units/i386-freebsd/gtk/gtkint.o(.text+0x6f65): In function `DATASOURCEINITIALIZE': gtkobject.inc:2309: undefined reference to `gdk_pixbuf_get_from_drawable' Many many more "undefined reference" to something missing in gdk_pixbuf. so: freebsd's stock-installed gdk_pixbuf does not contain the functions needed! So, I went to ports and found "ruby18-gdk_pixbuf2-0.14.1" a make install provided "gdk_pixbuf2.so" but no "gdk_pixbuf2.a" !! I find it odd that no provision is provided to link to this lib! Funny! I moved away from Linux mainly because of Library-Hell issues :-) Any thoughts on this would be greatly appreciated. I seem to have run out of things to try here. Surely someone has successfully compiled Lazarus on freebsd.... Bob