Recent

Author Topic: Problem with EABI version for cross-compiling  (Read 5714 times)

hosune7845

  • Full Member
  • ***
  • Posts: 159
Problem with EABI version for cross-compiling
« on: January 26, 2016, 04:51:23 am »
Hi.

I tried to compile for arm-linux(like RPi) on Win7 host

I successfully compiled fpc by using fpclazup.

And, run set Lazarus -> project Option -> library path and target OS/CPU.

But compiling failed with error message : Error while linking(EABI version doesn't math)

How can I solve this problem?

herux

  • Full Member
  • ***
  • Posts: 102
Re: Problem with EABI version for cross-compiling
« Reply #1 on: January 26, 2016, 08:34:20 am »
there may be no linker, or the compiler does not find it.
did you install it?  binutils for windows ?

hosune7845

  • Full Member
  • ***
  • Posts: 159
Re: Problem with EABI version for cross-compiling
« Reply #2 on: January 26, 2016, 09:00:30 am »
there may be no linker, or the compiler does not find it.
did you install it?  binutils for windows ?


Sure.

I compiled fpc for arm with binutils.

I think, one of options was wrong when i compiled fpc.

I compiled with below option :

fpclazup.exe --installdir="c:\crossfpc" --ostarget="linux" --cputarget="arm" --crossOPT="-CpARMV6 -CfVFPV2" --only="FPCCleanOnly,FPCBuildOnly"


Laksen

  • Hero Member
  • *****
  • Posts: 801
    • J-Software
Re: Problem with EABI version for cross-compiling
« Reply #3 on: January 26, 2016, 09:21:41 am »
Didn't it list the places where the eabi versions didn't match? Something like "file.o was EABI version 0/4, but system.o was EABI version 5".

I think your binutils are either built for non-eabi or too old

hosune7845

  • Full Member
  • ***
  • Posts: 159
Re: Problem with EABI version for cross-compiling
« Reply #4 on: January 26, 2016, 09:32:36 am »
Didn't it list the places where the eabi versions didn't match? Something like "file.o was EABI version 0/4, but system.o was EABI version 5".

I think your binutils are either built for non-eabi or too old

my binutils from CodeTyphon server (I double-checked binutils working)..


DonAlfredo

  • Hero Member
  • *****
  • Posts: 1841
Re: Problem with EABI version for cross-compiling
« Reply #5 on: January 26, 2016, 09:43:39 am »
If you check the fpcup bin directory, you will find some samples for cross-compiling !
I think your Pi Linux is hardfloat

So you need for RPi:

fpclazup.exe --installdir="c:\crossfpc" --ostarget="linux" --cputarget="arm" --fpcOPT="-dFPC_ARMHF" --crossOPT="-CpARMV6 -CfVFPV2 -CaEABIHF" --only="FPCCleanOnly,FPCBuildOnly"


So you need for RPi2:

fpclazup.exe --installdir="c:\crossfpc" --ostarget="linux" --cputarget="arm" --fpcOPT="-dFPC_ARMHF" --crossOPT="-CpARMV7A -CfVFPV3 -OoFASTMATH -CaEABIHF" --only="FPCCleanOnly,FPCBuildOnly"

Edit: use the newest version of fpc(laz)up; there was a problem when cross-compiling, especially  from trunk !
« Last Edit: January 26, 2016, 10:11:17 am by DonAlfredo »

Thaddy

  • Hero Member
  • *****
  • Posts: 18324
  • Here stood a man who saw the Elbe and jumped it.
Re: Problem with EABI version for cross-compiling
« Reply #6 on: January 26, 2016, 10:29:19 am »
Don't use the binutils from CT. Use the fnueabihf toolchain from linaro.org.
http://www.linaro.org/downloads/
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

hosune7845

  • Full Member
  • ***
  • Posts: 159
Re: Problem with EABI version for cross-compiling
« Reply #7 on: January 26, 2016, 10:39:21 am »
If you check the fpcup bin directory, you will find some samples for cross-compiling !
I think your Pi Linux is hardfloat

So you need for RPi:

fpclazup.exe --installdir="c:\crossfpc" --ostarget="linux" --cputarget="arm" --fpcOPT="-dFPC_ARMHF" --crossOPT="-CpARMV6 -CfVFPV2 -CaEABIHF" --only="FPCCleanOnly,FPCBuildOnly"


So you need for RPi2:

fpclazup.exe --installdir="c:\crossfpc" --ostarget="linux" --cputarget="arm" --fpcOPT="-dFPC_ARMHF" --crossOPT="-CpARMV7A -CfVFPV3 -OoFASTMATH -CaEABIHF" --only="FPCCleanOnly,FPCBuildOnly"

Edit: use the newest version of fpc(laz)up; there was a problem when cross-compiling, especially  from trunk !

Thank you! It works
-----------------

Thanks for all answers!

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1841
Re: Problem with EABI version for cross-compiling
« Reply #8 on: January 26, 2016, 10:57:11 am »
Nice !!

If you want to do more than just the basic things with a RPi(2), have a look at the pxl library !

http://asphyre.net/
http://sourceforge.net/projects/asphyre/

IMHO, this is a very well written library.
And also very well suited for RPi(2).

hosune7845

  • Full Member
  • ***
  • Posts: 159
Re: Problem with EABI version for cross-compiling
« Reply #9 on: January 27, 2016, 04:57:52 am »
Nice !!

If you want to do more than just the basic things with a RPi(2), have a look at the pxl library !

http://asphyre.net/
http://sourceforge.net/projects/asphyre/

IMHO, this is a very well written library.
And also very well suited for RPi(2).

Thank you.

I'll check the library is suitable for my project!

---------

Could you let me know how to set gdbserver in Lazarus?
« Last Edit: January 27, 2016, 05:06:47 am by hosune7845 »

 

TinyPortal © 2005-2018