[Lazarus] My Lazarus Dream: Cross Compile Linux64 -> Linux32 on Ubuntu 12.04

Alexsander Rosa alexsander.rosa at gmail.com
Wed Aug 22 16:51:27 CEST 2012


Is it even possible? I've seen rumours of people doing this, but every
tutorial I've tried failed.
My /etc/fpc.cfg is now an alphabet soup, my apt-get system is a mess and it
sill does not work.
The setup is: Ubuntu 12.04 64-bit. It seems FPC 2.6.0 is working: the
following test works:
http://wiki.freepascal.org/Cross_compiling#Cross_compiling_the_LCL

Lazarus 64-bit compiles and runs normally. Then I try on ~/lazarus:
$ make all CPU_TARGET=i386
OPT="-Fu/usr/local/lib/fpc/2.6.0/units/i386-linux/*"

It compiles but does not link. The message is:

> /usr/bin/fpc -Pi386 -XPi386-linux- -Xr -gl -dlclgtk2
> -Fu../lcl/units/i386-linux -Fu../lcl/units/i386-linux/gtk2
> -Fu../components/codetools/units/i386-linux
> -Fu../components/synedit/units/i386-linux
> -Fu../components/lazcontrols/lib/i386-linux -Fu../components/custom
> -Fu../components/mpaslex -Fu../ideintf/units/i386-linux -Fu../designer
> -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager
> -Fu../packager/frames -Fu../packager/units/i386-linux
> -Fu../units/i386-linux -Fuframes -Fu.
> -Fu/usr/local/lib/fpc/2.6.0/units/i386-linux/rtl
> -Fu/usr/local/lib/fpc/2.6.0/units/i386-linux/regexpr -Fiinclude
> -Fiinclude/linux -Fi../images -FE.. -FU../units/i386-linux -Flinclude
> -Fl/etc/ld.so.conf.d/*.conf -Fu/usr/local/lib/fpc/2.6.0/units/i386-linux/*
> -di386  lazarus.pp
> Free Pascal Compiler version 2.6.0 [2012/08/22] for i386
> Copyright (c) 1993-2011 by Florian Klaempfl and others
> Target OS: Linux for i386
> Compiling lazarus.pp
> Compiling resource ../units/i386-linux/lazarus.or
> Linking ../lazarus
> ld: warning: ../link.res contains output sections; did you forget -T?
> ld: cannot find -lgdk_pixbuf-2.0
> ld: cannot find -lgtk-x11-2.0
> ld: cannot find -lgdk-x11-2.0
> ld: cannot find -lgobject-2.0
> ld: cannot find -lglib-2.0
> ld: cannot find -lgthread-2.0
> ld: cannot find -lgmodule-2.0
> ld: cannot find -lpango-1.0
> ld: cannot find -latk-1.0
> ld: cannot find -lcairo
> lazarus.pp(130,1) Error: Error while linking


When it happened with X11, the "apt-get install libx11-dev:i386" solved.
However for the other libs it does not work.

-- 
Atenciosamente,
Alexsander da Rosa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120822/16d702eb/attachment-0002.html>


More information about the Lazarus mailing list