[Lazarus] RE : Lazarus on Solaris 10

Ludo Brands ludo.brands at free.fr
Sat Jul 2 16:24:12 CEST 2011


> /Very/ well done :-) Please do write it up, particularly if 
> you have a 
> record of what libraries you had to pull in (SFW or whatever).
> 

This is the procedure to get lazarus trunk and fpc trunk up and running
starting from a clean system (adapt to your processor, I'm on x86):

-Get and install fpc 2.4.4 from
http://www.freepascal.org/down/i386/solaris-ftp.freepascal.org.var

-Install following packages from http://sunfreeware.com/. This is a long
list because gnu binutils, make, subversion (a lot of dependencies) and gtk2
are pulled in:
apache-2.2.19
atk-1.18.0
binutils-2.21.1
cairo-1.4.10
coreutils-8.11
expat-2.0.1
fontconfig-2.8.0
freetype-2.4.2
gcc-3.4.6
gdb-6.8
glib-2.25.13
gtk+-2.12.0
jpeg-8a
libiconv-1.13.1
libintl-3.4.0
make-3.82
ncurses-5.7
neon-0.29.5
openldap-2.4.24
openssl-1.0.0d
pango-1.18.2
render-0.8-sol10-intel-local
renderproto-0.9.3
sasl-2.1.21
subversion-1.6.12
tiff-3.9.4
xft-2.1.2-sol10-intel-local
xrender-0.8.3-sol10-intel-local
zlib-1.2.5

These versions are all available for SPARC.

-export PATH=/usr/local/bin:$PATH    (in the beginning of the path to get
the gnu binutils)
-export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH 

-run gtk-demo to check your GTK2 installation

-get fpc from svn. 
make clean all 
make install INSTALL_PREFIX=/usr 
Nothing special, /etc/fpc.cfg installed with 2.4.4 is fine for 2.5.1. 

-get lazarus from svn. 
make clean all OPT="-k-lumem"
There is a problem with the solaris libc and glib2. Lazarus crashes with a
"Glib-Error (recursed) ** :gmem.c:140: failed to allocate 42 bytes".
Strangely enough, when testing the different packages from SFW, I got at one
point into the strange situation that lazarus ran but every program created
with lazarus crashed with this error. There is something non-repetitive in
the problem. I tried debugging this and found out that, when breaking on
gtk2int.pas:INTERNALINIT, just before the crash point, calling g_malloc(42)
failed while malloc(42) was ok. The solution I found is to use libumem which
is the "better" memory manager for Solaris and shipped standard since
Solaris 9 update 3. Running lazarus with "LD_PRELOAD=libumem.so ./lazarus"
solved the problem. Hence the make option OPT="-k-lumem" to load libumem
before libc. Note that the parameter -k-lumem needs to be added to every
lazarus project. Without, the program will run fine in the IDE but crash
when ran standalone. Adding {$linklib umem} to the program has the same
affect. 

-enjoy lazarus! (configure for fpc 2.5.1 and rebuild if that is what you
want)

So far only 1 problem: when closing all editor files or opening another
project I'm getting an accessviolation at line 4683 of project.PP. This is
in procedure Search in TProject.UpdateUnitComponentDependencies. I'm trying
to debug this. TypeInfo:=TypeData^.ParentInfo seems to return garbage...  

Can you update us on how this works on SPARC? If that goes well, I'll turn
this into a wiki page.

Ludo



 






More information about the Lazarus mailing list