Recent

Author Topic: Not able to create cross compiler for linux i386 from ubuntu 14.04 x86_64  (Read 2616 times)

heejit

  • Full Member
  • ***
  • Posts: 245
Please check attached file for errors

Suggest what new user should do to cross compile specially in ubuntu 14.04 64bit os.

Lazarus 1.6RC1/FPC 3.0.0
« Last Edit: February 02, 2016, 11:41:59 am by jshah »

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: Not able to create cross compiler for linux i386 from ubuntu 14.04 x86_64
« Reply #1 on: February 02, 2016, 11:49:00 am »
Please check attached file for errors

Suggest what new user should do to cross compile specially in ubuntu 14.04 64bit os.

Lazarus 1.6RC1/FPC 3.0.0
That is not a cross compiler but a compiler.Here's to target i386 linux from your 64bit Linux:

sudo make clean all crossall crossinstall OS_TARGET=linux CPU_TARGET=i386

« Last Edit: February 02, 2016, 11:53:33 am by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Not able to create cross compiler for linux i386 from ubuntu 14.04 x86_64
« Reply #2 on: February 02, 2016, 12:00:22 pm »
What exactly step need to create a binary for traget os and cpu.

@thaddy
After running :
sudo make clean all crossall crossinstall OS_TARGET=linux CPU_TARGET=i386
there is error pls check attahed file
« Last Edit: February 02, 2016, 12:31:23 pm by jshah »

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Hello jshah,

Cross compile is a complex thing, at least for me. Fortunately, I now can cross compile from Linux to produce win32-i386 binaries. I wrote steps and reuse it anytime I need. The steps below has been tested on Lazarus 1.6.0 Debian 64-bit + FPC 3.0.0 on Ubuntu Mate 15.10 64-bit.

Code: Pascal  [Select][+][-]
  1. cd /usr/share/fpcsrc/3.0.0
  2. sudo make clean all OS_TARGET=win32 CPU_TARGET=i386
  3. sudo make crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/usr
  4. sudo ln -sf /usr/lib/fpc/3.0.0/ppcross386 /usr/bin/ppcross386

You may need to change the directory name on line no. 1 and 4.

For Linux 64-bit to Linux i386, there are some extra steps, which I still fail to make it work.
« Last Edit: March 28, 2016, 04:43:17 am by Handoko »

 

TinyPortal © 2005-2018