[fpc-devel] LinkLib Issues In Lazarus and in FPC-2.0.2

Aleš Katona almindor at gmail.com
Sun Jul 16 22:36:00 CEST 2006


Hi Bob and welcome to the world of crap.

Seriously and honestly, the FreeBSD porters made a big bad pile of crap
when they some years ago decided to name "gtk-12" and others as "gtk12".

Then they added to this pile of crap by renaming it back sometime after
6.0 release.

Long story short, it's not our fault.

Btw. fpc 2.0.2 is in ports now.

You need to symlink those libraries or patch manualy, but we can't
change it to the new ones since anyone with FreeBSD 6.0 or older (if
they didn't portupgrade) won't work then.

FPC 2.0.4 will have a new mechanism of "libalias" which will enable us
to fix this by just adding either command line params (eg: fpc
-Laglib=glib-12.so) or changing it in fpc.cfg for all compilations
(preffered and porters can do this)

Welcome to the world of shit.. eh sorry I ment unix.

It was written in C what would you expect?

Ales

On Ne, 2006-07-16 at 16:09 -0400, Bob wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Greetings to the Fpc-Devel list:
> 
> 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 Lazaruz, and here is where I
> have run into troubles.
> 
> A tar-ball (lazarus-0.9.16-0.tar.gz) install of Lazarus ran well until
> Lazarus was being Linked. The errors were all linklib related:
> 
> 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 read:
> 
>   {$ifdef FreeBSD}
>      gtkdll='gtk-12';
>      {$linklib gtk-12}
> 
> For all three libraries; since freebsd names these libraries with a "-"
> Was this the correct thing to do???
> 
> I recompiled and reinstalled FPC-2.0.2 with the above 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 pount 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" !!
> 
> 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 installed
> Lazarus on FreeBSD. The Lazarus website says Lazarus will run on
> FreeBSD, my question is how to make it so?
> 
> TIA
> Bob
> 





More information about the fpc-devel mailing list