LinkLib Issues In freebsd Lazarus
Bob Richards
bob at tamara-b.org
Sun Jul 16 19:51:27 UTC 2006
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
More information about the freebsd-hackers
mailing list