Recent

Author Topic: Cross compile from linux 64 to linux 32  (Read 5856 times)

thierrydijoux

  • New Member
  • *
  • Posts: 21
Cross compile from linux 64 to linux 32
« on: April 30, 2014, 11:51:32 pm »
Hi all,
I managed to get my chain cross compilation (with the help of wiki http://wiki.lazarus.freepascal.org/Cross_compiling, but when I want to compile a single project, I get the following message:
fcllaz.pas (0,0) Fatal: Can not find unit system used by fcllaz package of FCL.
and when i try to build lazarus with target i386, i've got the same message.

i tried different things, and it does not work... so if someone could give me a hand !

Edit
i'm using lazarus 1.2.2, fpc 2.6.4 on ubuntu 14.04
« Last Edit: April 30, 2014, 11:56:45 pm by thierrydijoux »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross compile from linux 64 to linux 32
« Reply #1 on: May 01, 2014, 04:49:04 am »
Show -Fu lines in your fpc.cfg and your fpc installation layout (both host and cross compiler).

thierrydijoux

  • New Member
  • *
  • Posts: 21
Re: Cross compile from linux 64 to linux 32
« Reply #2 on: May 01, 2014, 09:48:27 am »
Thanks for your reply Leldumbo, i had a look in the fpc.cfg and now it works BUT here are the new messages :
/usr/bin/ld: Avertissement: link.res contient des sections de sortie; avez-vous oublié -T?
/usr/bin/ld: can't find -lX11
/usr/bin/ld: can't find -lgdk_pixbuf-2.0
/usr/bin/ld: can't find -lgtk-x11-2.0
/usr/bin/ld: can't find -lgdk-x11-2.0
/usr/bin/ld: can't find -lgobject-2.0
/usr/bin/ld: can't find -lglib-2.0
/usr/bin/ld: can't find -lgthread-2.0
/usr/bin/ld: can't find -lgmodule-2.0
/usr/bin/ld: can't find -lpango-1.0
/usr/bin/ld: ne peut trouver -lcairo
/usr/bin/ld: ne peut trouver -latk-1.0

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Cross compile from linux 64 to linux 32
« Reply #3 on: May 01, 2014, 10:43:47 am »
@thierrydijoux: if you want to cross compile from i386 linux to x86_64 you must install 64bit libs so linker won't scream about missing libraries. On modern distros usually 64bit distro have all needed packages for i386 (i686) but never seen vice versa.
In my case: I'm using 32bit distro, and I've copied libs into /usr/lib64 and /lib64 from distro installed in virtual box. Just change path for libs in fpc. cfg. eg this is mine:
# searchpath for libraries
#ifdef cpux86_64
-Fl/usr/lib64
#endif

 

TinyPortal © 2005-2018