Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-01

Is it just me or... trunk cross compile failure on arm-linux

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers

Working on my arm-linux cross compiler (which used to at least build a compiler etc), I currently hit this with fpc trunk: C:/development/fpctrunk/compiler/ppcrossarm.exe -Tlinux -Parm -XParm-linux- -Xr -Ur -Xs -O2 -n -Fuarm -Fusystems -FuC:/development/fpctrunk/rtl/units/arm-linux -Fiarm -FDC:\development\cross\bin\arm-linux -FE. -FUarm/units/arm-linux -dRELEASE -XParm-linux- -fPIC -CpARMV6 -CaEABI -CfVFPV2 -dFPC_ARMHF -Xd -FlC:\development\cross\lib\arm-linux -darm -dGDB -dBROWSERLOG -Sew -XParm-linux- -fPIC -CpARMV6 -CaEABI -CfVFPV2 -dFPC_ARMHF -darm -dGDB -dBROWSERLOG -Sew pp.pas
...
C:\development\cross\bin\arm-linux\arm-linux-ld.exe: cannot find arm\units\arm-linux\pexpr.o
pp.pas(238,36) Error: Error while linking
pp.pas(238,36) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
make.exe[3]: *** [ppcarm] Error 1
make.exe[3]: Leaving directory `C:/development/fpctrunk/compiler'

c:\development\fpctrunk\compiler\arm\units\arm-linux\pexpr.o is indeed missing; pexpr.ppu does exist there.

Am I doing something wrong or is it FPC ;)

Pierre Free Pascal
to Reinier Olislagers
Show quoted text 26 lines
-----Message d'origine----- De : [mailto:fpc-pascal- De la part de Reinier Olislagers Envoyé : mercredi 8 janvier 2014 13:58 À : FPC Mailing list Objet : [fpc-pascal] Is it just me or... trunk cross compile failure on arm-linux Working on my arm-linux cross compiler (which used to at least build a compiler etc), I currently hit this with fpc trunk: C:/development/fpctrunk/compiler/ppcrossarm.exe -Tlinux -Parm -XParm-linux- -Xr -Ur -Xs -O2 -n -Fuarm -Fusystems -FuC:/development/fpctrunk/rtl/units/arm-linux -Fiarm -FDC:\development\cross\bin\arm-linux -FE. -FUarm/units/arm-linux -dRELEASE -XParm-linux- -fPIC -CpARMV6 -CaEABI -CfVFPV2 -dFPC_ARMHF -Xd -FlC:\development\cross\lib\arm-linux -darm -dGDB -dBROWSERLOG -Sew -XParm-linux- -fPIC -CpARMV6 -CaEABI -CfVFPV2 -dFPC_ARMHF -darm -dGDB -dBROWSERLOG -Sew pp.pas ... C:\development\cross\bin\arm-linux\arm-linux-ld.exe: cannot find arm\units\arm-linux\pexpr.o pp.pas(238,36) Error: Error while linking pp.pas(238,36) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make.exe[3]: *** [ppcarm] Error 1 make.exe[3]: Leaving directory `C:/development/fpctrunk/compiler'

I just completed a cycle on a native arm linux
using just:
make cycle OPT="-n -gl"
starting with installed 2.6.0 ppcarm for raspberrypi (armhf) The cycle completed successfully.

-CaEABI fails for me,
now the correct option is -CaEABIHF

I was also able to cycle successfully this:
make distclean cycle OPT="-n -gl -CpARMV6 -CaEABIHF -CfVFPV2 -dFPC_ARMHF"

Did you check the obvious, like free disk space?
Try to do
make distclean
and restart...

Pierre Muller

Reinier Olislagers
to Pierre Free Pascal
Pierre Free Pascal wrote 12 lines
> -----Message d'origine----- > Objet : [fpc-pascal] Is it just me or... trunk cross compile failure on > arm-linux > C:\development\cross\bin\arm-linux\arm-linux-ld.exe: cannot find > arm\units\arm-linux\pexpr.o > pp.pas(238,36) Error: Error while linking I just completed a cycle on a native arm linux using just: make cycle OPT="-n -gl" starting with installed 2.6.0 ppcarm for raspberrypi (armhf) The cycle completed successfully.

Good to know, thanks.

-CaEABI fails for me, now the correct option dis -CaEABIHF

Mmm, interesting. Seems opposite on trunk. -CaEABI works; -CaEABIHF fails (I'm using current trunk as a starting compiler)

I was also able to cycle successfully this: make distclean cycle OPT="-n -gl -CpARMV6 -CaEABIHF -CfVFPV2 -dFPC_ARMHF" Did you check the obvious, like free disk space?

More than enough.
Also noticed a lot of other .o files in the arm-linux directory, just not the pexpr one....

Try to do make distclean

1. Had previously removed all .ppu, .a, .o, recursively, then did an svn revert --recursive/svn up
2. make distclean doesn't make a difference

and restart...

The compiler I hope you mean - not the machine. I mean, I know I'm on Windows but .... ;)

Pierre Muller

I'll probably try tomorrow with FPC 2.6.2 as a bootstrap compiler... Will squeak again if needed.

Thanks,
Reinier

Pierre Free Pascal
to Reinier Olislagers
Show quoted text 28 lines
-----Message d'origine----- De : [mailto:fpc-pascal- De la part de Reinier Olislagers Envoyé : mercredi 8 janvier 2014 17:05 À : FPC Mailing list Objet : Re: [fpc-pascal] Is it just me or... trunk cross compile failure on arm-linux On 08/01/2014 16:40, Pierre Free Pascal wrote: >> -----Message d'origine----- >> Objet : [fpc-pascal] Is it just me or... trunk cross compile failure on >> arm-linux >> C:\development\cross\bin\arm-linux\arm-linux-ld.exe: cannot find >> arm\units\arm-linux\pexpr.o >> pp.pas(238,36) Error: Error while linking > I just completed a cycle on a native arm linux > using just: > make cycle OPT="-n -gl" > starting with installed 2.6.0 ppcarm for raspberrypi (armhf) > The cycle completed successfully. > Good to know, thanks. > -CaEABI fails for me, > now the correct option dis -CaEABIHF Mmm, interesting. Seems opposite on trunk. -CaEABI works; -CaEABIHF fails (I'm using current trunk as a starting compiler)

Sorry, in fact, you need to compile the cross-compiler with -dFPC_ARMHF for this...
without this only -CaEABI works indeed...
I suppose that this restriction was added to reduce the risks of changing ABI and getting failure down the row...

Pierre

Sven Barth
to Reinier Olislagers: Good to know, thanks. Mmm, interesting. Seems opposite on trunk. -CaEABI works; -CaEABIHF…

Am 08.01.2014 17:08 schrieb "Reinier Olislagers" <

: Mmm, interesting. Seems opposite on trunk. -CaEABI works; -CaEABIHF fails (I'm using current trunk as a starting compiler)

*sigh* I thought you were one of those who already knows this, but it seems not: *ALWAYS* compile using the last release as starting compiler. We won't provide support if a trunk version (be it a non-released fixes or the main dev one) is used. The only exception is the compilation of a cross compiler using the exact same revision.
(and yes that even includes if compiling with the last release results in the same error AMD thus might point to a different problem)

I'll probably try tomorrow with FPC 2.6.2 as a bootstrap compiler...

You better do that.

Regards,
Sven

Reinier Olislagers
to Pierre Free Pascal: Sorry, in fact, you need to compile the cross-compiler with -dFPC_ARMHF for this...…
Pierre Free Pascal wrote 19 lines
> -----Message d'origine----- > De : [mailto:fpc-pascal- > De la part de Reinier Olislagers > Envoyé : mercredi 8 janvier 2014 17:05 > À : FPC Mailing list > Objet : Re: [fpc-pascal] Is it just me or... trunk cross compile > failure on arm-linux > > On 08/01/2014 16:40, Pierre Free Pascal wrote: >> -CaEABI fails for me, >> now the correct option dis -CaEABIHF > Mmm, interesting. Seems opposite on trunk. -CaEABI works; -CaEABIHF > fails (I'm using current trunk as a starting compiler) Sorry, in fact, you need to compile the cross-compiler with -dFPC_ARMHF for this... without this only -CaEABI works indeed...

Yes, I'm passing -dFPC_ARMHF in crossopt; see my original mail.

Reinier Olislagers
to Sven Barth: Am 08.01.2014 17:08 schrieb "Reinier Olislagers" < *sigh* I thought you were one of those…
Sven Barth wrote
*sigh* I thought you were one of those who already knows this, but it seems not: *ALWAYS* compile using the last release as starting compiler.

I do know this and...

We won't provide support if a trunk version (be it a non-released fixes or the main dev one) is used. The only exception is the compilation of a cross compiler using the exact same revision.

... I know this, too. That's why I exclude the svn update step for FPC in my fpcup cross compile settings.

(and yes that even includes if compiling with the last release results in the same error AMD thus might point to a different problem)

Which is one of the reasons I posted this: even with my limited understanding of the build process, linking etc, I sometimes manage to bring build problems to light.
Also, often more knowledgeable people are able to immediately pinpoint my mistakes which is a great help.

Florian Klämpfl
to Reinier Olislagers: Yes, I'm passing -dFPC_ARMHF in crossopt; see my original mail.
Show quoted text 23 lines
On 08/01/2014 18:01, Pierre Free Pascal wrote: > > >> -----Message d'origine----- >> De : [mailto:fpc-pascal- >> De la part de Reinier Olislagers >> Envoyé : mercredi 8 janvier 2014 17:05 >> À : FPC Mailing list >> Objet : Re: [fpc-pascal] Is it just me or... trunk cross compile >> failure on arm-linux >> >> On 08/01/2014 16:40, Pierre Free Pascal wrote: >>> -CaEABI fails for me, >>> now the correct option dis -CaEABIHF >> Mmm, interesting. Seems opposite on trunk. -CaEABI works; -CaEABIHF >> fails (I'm using current trunk as a starting compiler) > > Sorry, in fact, you need to compile the cross-compiler with -dFPC_ARMHF for > this... > without this only -CaEABI works indeed... Yes, I'm passing -dFPC_ARMHF in crossopt; see my original mail.

This is wrong. You have to pass FPC_ARMHF when the ARM compiler is built because armhf is considered as separate architecture. - Cparmv6 must be passed to CROSSOPT though. Nothing else is needed except when you have some strange setup.

_______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reinier Olislagers
to Florian Klämpfl
Florian Klämpfl wrote 24 lines
Reinier Olislagers schrieb: > On 08/01/2014 18:01, Pierre Free Pascal wrote: >>> -----Message d'origine----- >>> De : [mailto:fpc-pascal- >>> De la part de Reinier Olislagers >>> Envoyé : mercredi 8 janvier 2014 17:05 >>> À : FPC Mailing list >>> Objet : Re: [fpc-pascal] Is it just me or... trunk cross compile >>> failure on arm-linux >>> >>> On 08/01/2014 16:40, Pierre Free Pascal wrote: >>>> -CaEABI fails for me, >>>> now the correct option dis -CaEABIHF >>> Mmm, interesting. Seems opposite on trunk. -CaEABI works; -CaEABIHF >>> fails (I'm using current trunk as a starting compiler) >> >> Sorry, in fact, you need to compile the cross-compiler with > -dFPC_ARMHF for >> this... >> without this only -CaEABI works indeed... > > Yes, I'm passing -dFPC_ARMHF in crossopt; see my original mail. This is wrong. You have to pass FPC_ARMHF when the ARM compiler is built because armhf is considered as separate architecture. - Cparmv6 must be passed to CROSSOPT though. Nothing else is needed except when you have some strange setup.

Ah, thanks a lot - that helps!
Now passing
--fpcopt=-fPIC -dFPC_ARMHF
--crossopt=-CpARMV6 -CaEABIHF -CfVFPV2
with trunk compiler as a bootstrap compiler works nicely

Thanks again,
Reinier