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

Bob bob at tania.servebbs.org
Sun Jul 16 22:09:46 CEST 2006


-----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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEup0KAexE5bK/mHkRAmqsAJ9ib0IgapRKv+8Chnr5lODqx/uLBwCeKrMC
zjaYKOZcyRn/wgyahTKl/3Q=
=Pzz8
-----END PGP SIGNATURE-----



More information about the fpc-devel mailing list