Recent

Author Topic: How to cross compile x86_64 program under ubuntu Arm64?  (Read 2808 times)

rarnu

  • New Member
  • *
  • Posts: 14
How to cross compile x86_64 program under ubuntu Arm64?
« on: December 21, 2021, 04:45:51 am »
I have installed ubuntu arm64 on Raspberry Pi, and now I want to cross compile x86_64 programs but there is no cross compiler.

I tried to compile it myself with the steps:

Code: Text  [Select][+][-]
  1. $ sudo apt install crossbuild-essential-amd64
  2. $ cd /usr/bin
  3. $ sudo ln -s x86_64-linux-gnu-as x86_64-linux-as
  4. $ cd ~/Downloads/fpc-3.2.2
  5. $ make clean crossall OVERRIDEVERSIONCHECK=1 TARGET_OS=linux CPU_TARGET=x86_64
  6.  

and the error is:

Code: Text  [Select][+][-]
  1. system.pp(490,1) Fatal: Internal error 2015030501
  2. Fatal: Compilation aborted
  3.  

I attached the full compile log for help.

How can I finish the compile?


PascalDragon

  • Hero Member
  • *****
  • Posts: 4287
  • Compiler Developer
Re: How to cross compile x86_64 program under ubuntu Arm64?
« Reply #1 on: December 21, 2021, 08:59:41 am »
I have installed ubuntu arm64 on Raspberry Pi, and now I want to cross compile x86_64 programs but there is no cross compiler.

It is currently not possible to compile from a non-x86 CPU to a x86 CPU, because the later requires support for the 80-bit floating point type (aka Extended) which is not available for most others.

 

TinyPortal © 2005-2018