Sign in Join

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

Mailing lists / lazarus / 2013-05

ARMV7

20 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Kjow

Hi all,

I'm trying to build androidlcl test project with ARMV7 VFPV3, but there are problems.

First of all, I'm using Lazarus 1.1 (svn trunk) and FPC 2.7.1 (svn trunk) and I can compile that project and build apk from Windows 8 pro well. My Samsung Galaxy Note 1 can execute androidlcl... but very-very slowly.

I compiled FPC with this command:

make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV6" INSTALL_PREFIX=C:\Develop\fpc\2.7.x PP=c:\Develop\fpc\2.6.0\bin\i386-win32\fpc.exe
BINDIR=C:\Android\NDK\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows-x86_64\arm-linux-androideabi\bin CROSSBINDIR=C:\Android\NDK\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows-x86_64\bin BINUTILSPREFIX=arm-linux-androideabi-

It compiles like a charm.

Trying other parameters for CROSSOPT there are problems... I can't build FPC with -CpARMV7 (error on FPC compiling) and if I use only CROSSOPT="-CfVFPV3 -OoFASTMATH", FPC compiles well, but lazarus can't build the project:

Hint: Start of reading config file
C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg
Hint: End of reading config file C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.7.1 [2013/05/14] for arm Copyright (c) 1993-2013 by Florian Klaempfl and others Target OS: Android for ARMEL
Compiling fcllaz.pas
PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode PPU Loading C:\Develop\fpc\2.7.x\\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\..\fpc\2.7.x\units\arm-android\rtl\system.ppu

Of course, I changed Project Options -> Other -> -CfSOFT to -CfVFPV3

Can I solve both ARMV7 and VFPV3?

Hoping this will boost performance a lot.

Thank you,
Best Regards,
Kjow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130514/1bc40d2f/attachment.html>

Reply by email

leledumbo
to Kjow

Isn't the error message clear enough?

PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode

The compiler tries to load the system unit, but it's compiled with different FPU mode that the one you're targetting with. Try cleaning up your arm-android installation and ensure that second FPC compilation really works.

error on FPC compiling

I haven't tried, but please be verbose about the error.

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-ARMV7-tp4031329p4031331.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Kjow
to leledumbo

Hi,

2013/5/15 leledumbo

Isn't the error message clear enough?

The error is clear, but the solution is not...

Show quoted text 9 lines
> PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu > Trying to use a unit which was compiled with a different FPU mode The compiler tries to load the system unit, but it's compiled with different FPU mode that the one you're targetting with. Try cleaning up your arm-android installation and ensure that second FPC compilation really works.

How to clean arm-android installation? When I call "make" I use:

make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm ...etc

Show quoted text 5 lines
> error on FPC compiling I haven't tried, but please be verbose about the error.

With:

CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV7"

...
...
...
c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:59995: Error: lo register required -- `ldmfd r13!,{r4,r15}'
c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60007: Error: lo register required -- `stmfd r13!,{r4,r14}'
c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60105: Error: lo register required -- `ldmfd r13!,{r4,r15}'
c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60167: Error: lo register required -- `ldr r12,[r0]'
c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60168: Error: lo register required -- `ldr r12,[r12,#100]'
system.pp(379) Error: Error while assembling exitcode 1 system.pp(379) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted
make[4]: *** [system.ppu] Error 1
make[4]: Leaving directory `c:/Develop/fpc/2.7.x/rtl/android' make[3]: *** [android_all] Error 2
make[3]: Leaving directory `c:/Develop/fpc/2.7.x/rtl' make[2]: *** [rtl_all] Error 2
make[2]: Leaving directory `c:/Develop/fpc/2.7.x'
make[1]: *** [build-stamp.arm-android] Error 2
make[1]: Leaving directory `c:/Develop/fpc/2.7.x'
make: *** [crossall] Error 2

c:\Develop\fpc\2.7.x>

With (but lazarus build error):

CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV6"

...
...
...
Installing package tcl
Installation package tcl for target arm-android succeeded Skipped package univint which has been disabled for target arm-android Skipped package unixutil which has been disabled for target arm-android Installing package unzip
Installation package unzip for target arm-android succeeded Skipped package users which has been disabled for target arm-android Skipped package utmp which has been disabled for target arm-android Skipped package uuid which has been disabled for target arm-android Skipped package winceunits which has been disabled for target arm-android Skipped package winunits-base which has been disabled for target arm-android Skipped package winunits-jedi which has been disabled for target arm-android Skipped package x11 which has been disabled for target arm-android Skipped package xforms which has been disabled for target arm-android Installing package zlib
Installation package zlib for target arm-android succeeded Skipped package zorba which has been disabled for target arm-android Installing package fpc-all
Installation package fpc-all for target arm-android succeeded make[4]: Leaving directory `c:/Develop/fpc/2.7.x/packages' make[3]: Leaving directory `c:/Develop/fpc/2.7.x'
make[2]: Leaving directory `c:/Develop/fpc/2.7.x'
make[1]: Leaving directory `c:/Develop/fpc/2.7.x'

c:\Develop\fpc\2.7.x>

Thank you,
Kjow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130515/4ab15c18/attachment-0001.html>

Reply by email

Kjow
to Kjow

2013/5/15 Kjow

Show quoted text 25 lines
Hi, 2013/5/15 leledumbo > Isn't the error message clear enough? > The error is clear, but the solution is not... > > PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu > > Trying to use a unit which was compiled with a different FPU mode > > The compiler tries to load the system unit, but it's compiled with > different > FPU mode that the one you're targetting with. Try cleaning up your > arm-android installation and ensure that second FPC compilation really > works. > How to clean arm-android installation? When I call "make" I use: make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm ...etc

PS also physically deleting C:\Develop\fpc\2.7.x\units\arm-android directory and recompiling fpc with CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV6" I get the same error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130515/56cdab44/attachment.html>

Reply by email

leledumbo
to Kjow
also physically deleting C:\Develop\fpc\2.7.x\units\arm-android directory

and recompiling fpc with CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV6" I get the same error.

This is what I actually mean by "cleaning up your arm-android installation". If you've done that, then retry:

if I use only CROSSOPT="-CfVFPV3 -OoFASTMATH", FPC compiles well

and ensure it really compiles.

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-ARMV7-tp4031329p4031335.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Kjow
to leledumbo

2013/5/15 leledumbo

Show quoted text 12 lines
> also physically deleting C:\Develop\fpc\2.7.x\units\arm-android directory and recompiling fpc with CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV6" I get the same error. This is what I actually mean by "cleaning up your arm-android installation". If you've done that, then retry: > if I use only CROSSOPT="-CfVFPV3 -OoFASTMATH", FPC compiles well and ensure it really compiles.

Yes, I'm doing this way.
I deleted arm-android directory and recompiled with:

make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV6"
INSTALL_PREFIX=C:\Develop\fpc\2.7.x
PP=c:\Develop\fpc\2.6.0\bin\i386-win32\fpc.exe
BINDIR=C:\Android\NDK\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows-x86_64\arm-linux-androideabi\bin CROSSBINDIR=C:\Android\NDK\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows-x86_64\bin BINUTILSPREFIX=arm-linux-androideabi-

...
...
...
Installing package tcl
Installation package tcl for target arm-android succeeded Skipped package univint which has been disabled for target arm-android Skipped package unixutil which has been disabled for target arm-android Installing package unzip
Installation package unzip for target arm-android succeeded Skipped package users which has been disabled for target arm-android Skipped package utmp which has been disabled for target arm-android Skipped package uuid which has been disabled for target arm-android Skipped package winceunits which has been disabled for target arm-android Skipped package winunits-base which has been disabled for target arm-android Skipped package winunits-jedi which has been disabled for target arm-android Skipped package x11 which has been disabled for target arm-android Skipped package xforms which has been disabled for target arm-android Installing package zlib
Installation package zlib for target arm-android succeeded Skipped package zorba which has been disabled for target arm-android Installing package fpc-all
Installation package fpc-all for target arm-android succeeded make[4]: Leaving directory `c:/Develop/fpc/2.7.x/
packages'
make[3]: Leaving directory `c:/Develop/fpc/2.7.x'
make[2]: Leaving directory `c:/Develop/fpc/2.7.x'
make[1]: Leaving directory `c:/Develop/fpc/2.7.x'

c:\Develop\fpc\2.7.x>

C:\Develop\fpc\2.7.x\units\arm-android reappeared, Lazarus can't compile:

Hint: Start of reading config file C:\Develop\fpc\2.7.x\bin\i386- win32\fpc.cfg
Hint: End of reading config file C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.7.1 [2013/05/14] for arm Copyright (c) 1993-2013 by Florian Klaempfl and others Target OS: Android for ARMEL
Compiling fcllaz.pas
PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode PPU Loading C:\Develop\fpc\2.7.x\\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\..\fpc\2.7.x\units\arm-android\rtl\system.ppu

Same procedure, but with CROSSOPT="-CfSOFT ...etc", everything is ok. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130515/c5e17494/attachment.html>

Reply by email

Kjow
to Kjow: I'm trying to build androidlcl test project with ARMV7 VFPV3, but there are problems.…

2013/5/14 Kjow

Show quoted text 5 lines
Hi all, I'm trying to build androidlcl test project with ARMV7 VFPV3, but there are problems.

[cut]

Can I solve both ARMV7 and VFPV3?

Well, about ARMV7 I think I have understood now. According to http://en.wikipedia.org/wiki/ARM_architecture I need to pass -CpARMV7A options, indeed in this way FPC compiles well. ( CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV7A" )

The big issue is that Lazarus won't compile androidlcl test project if FPC is compiled with -CfVFPV3 "crossoption"...

Hint: Start of reading config file
C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg
Hint: End of reading config file C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.7.1 [2013/05/15] for arm Copyright (c) 1993-2013 by Florian Klaempfl and others Target OS: Android for ARMEL
Compiling fcllaz.pas
PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode PPU Loading C:\Develop\fpc\2.7.x\\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\..\fpc\2.7.x\units\arm-android\rtl\system.ppu

I tried with CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV7A" and it works! Lazarus can build ARMV7A projects, but no luck with VFPV3. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130515/11ad2d8f/attachment.html>

Reply by email

Marc Santhoff
to Kjow: 2013/5/14 Kjow [cut] Well, about ARMV7 I think I have understood now. According to…
Kjow wrote 13 lines
2013/5/14 Kjow > Hi all, > > I'm trying to build androidlcl test project with ARMV7 VFPV3, but there > are problems. > [cut] > Can I solve both ARMV7 and VFPV3? >

Since noone answers you - the pros must be away for holidays or so ...

But beware, I'm really no expert in cross compiling.

Show quoted text 17 lines
Well, about ARMV7 I think I have understood now. According to http://en.wikipedia.org/wiki/ARM_architecture I need to pass -CpARMV7A options, indeed in this way FPC compiles well. ( CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV7A" ) The big issue is that Lazarus won't compile androidlcl test project if FPC is compiled with -CfVFPV3 "crossoption"... Hint: Start of reading config file C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg Hint: End of reading config file C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.7.1 [2013/05/15] for arm Copyright (c) 1993-2013 by Florian Klaempfl and others Target OS: Android for ARMEL Compiling fcllaz.pas PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode

I think this message says, you will have to recompile the RTL using the new set of compiler options you have found to work.

IIRC cd'ing to <...>\arm-android\rtl and doing a "make clean all" _could_ be sufficient.

HTH anyways,
Marc

Show quoted text 12 lines
PPU Loading C:\Develop\fpc\2.7.x\\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\..\fpc\2.7.x\units\arm-android\rtl\system.ppu I tried with CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV7A" and it works! Lazarus can build ARMV7A projects, but no luck with VFPV3. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Marc Santhoff

Reply by email

Kjow
to Marc Santhoff

2013/5/17 Marc Santhoff

Since noone answers you - the pros must be away for holidays or so ... But beware, I'm really no expert in cross compiling.

Thank you for the answer, but...

Show quoted text 9 lines
I think this message says, you will have to recompile the RTL using the new set of compiler options you have found to work. IIRC cd'ing to <...>\arm-android\rtl and doing a "make clean all" _could_ be sufficient. HTH anyways, Marc

...the problem is exactly here. Everytime, I recompile FPC with relative options (erasing old compiled arm-android units) and edit relative project parameters, e.g.:

FPC:
make ... CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV6" ... Lazarus:
project->project options-> Other-> -CfSOFT -OoFASTMATH -CpARMV6

This works well.

FPC:
make ... CROSSOPT="-CfVFPV2 -OoFASTMATH -CpARMV7A" ... Lazarus:
project->project options-> Other-> -CfVFPV2 -OoFASTMATH -CpARMV7A

This doesn't work.

PS both -CfVFPV2 and -CfVFPV3 give the same result.

Kjow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/7da0cddc/attachment.html>

Reply by email

Sven Barth
to Kjow: 2013/5/15 leledumbo The error is clear, but the solution is not... How to clean…
Kjow wrote 37 lines
> error on FPC compiling I haven't tried, but please be verbose about the error. With: CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV7" ... ... ... c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:59995: Error: lo register required -- `ldmfd r13!,{r4,r15}' c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60007: Error: lo register required -- `stmfd r13!,{r4,r14}' c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60105: Error: lo register required -- `ldmfd r13!,{r4,r15}' c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60167: Error: lo register required -- `ldr r12,[r0]' c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60168: Error: lo register required -- `ldr r12,[r12,#100]' system.pp(379) Error: Error while assembling exitcode 1 system.pp(379) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted make[4]: *** [system.ppu] Error 1 make[4]: Leaving directory `c:/Develop/fpc/2.7.x/rtl/android' make[3]: *** [android_all] Error 2 make[3]: Leaving directory `c:/Develop/fpc/2.7.x/rtl' make[2]: *** [rtl_all] Error 2 make[2]: Leaving directory `c:/Develop/fpc/2.7.x' make[1]: *** [build-stamp.arm-android] Error 2 make[1]: Leaving directory `c:/Develop/fpc/2.7.x' make: *** [crossall] Error 2

Would you please report this as a bug? (you could also mention that this happens with -CpARMV6 as well)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/e794e0c4/attachment.html>

Reply by email

Sven Barth
to Sven Barth
Sven Barth wrote 40 lines
Am 15.05.2013 09:49, schrieb Kjow: > > > > error on FPC compiling > > I haven't tried, but please be verbose about the error. > > > With: > > CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV7" > > ... > ... > ... > c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:59995: Error: lo > register required -- `ldmfd r13!,{r4,r15}' > c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60007: Error: lo > register required -- `stmfd r13!,{r4,r14}' > c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60105: Error: lo > register required -- `ldmfd r13!,{r4,r15}' > c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60167: Error: lo > register required -- `ldr r12,[r0]' > c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60168: Error: lo > register required -- `ldr r12,[r12,#100]' > system.pp(379) Error: Error while assembling exitcode 1 > system.pp(379) Fatal: There were 2 errors compiling module, stopping > Fatal: Compilation aborted > make[4]: *** [system.ppu] Error 1 > make[4]: Leaving directory `c:/Develop/fpc/2.7.x/rtl/android' > make[3]: *** [android_all] Error 2 > make[3]: Leaving directory `c:/Develop/fpc/2.7.x/rtl' > make[2]: *** [rtl_all] Error 2 > make[2]: Leaving directory `c:/Develop/fpc/2.7.x' > make[1]: *** [build-stamp.arm-android] Error 2 > make[1]: Leaving directory `c:/Develop/fpc/2.7.x' > make: *** [crossall] Error 2 > Would you please report this as a bug? (you could also mention that this happens with -CpARMV6 as well)

Hmm... wait. I've now read your other mail regarding ARMV7A as well and will answer there.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/2290b425/attachment.html>

Reply by email

Sven Barth
to Kjow: 2013/5/14 Kjow [cut] Well, about ARMV7 I think I have understood now. According to…
Kjow wrote 39 lines
2013/5/14 Kjow < <mailto:>> Hi all, I'm trying to build androidlcl test project with ARMV7 VFPV3, but there are problems. [cut] Can I solve both ARMV7 and VFPV3? Well, about ARMV7 I think I have understood now. According to http://en.wikipedia.org/wiki/ARM_architecture I need to pass -CpARMV7A options, indeed in this way FPC compiles well. ( CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV7A" ) The big issue is that Lazarus won't compile androidlcl test project if FPC is compiled with -CfVFPV3 "crossoption"... Hint: Start of reading config file C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg Hint: End of reading config file C:\Develop\fpc\2.7.x\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.7.1 [2013/05/15] for arm Copyright (c) 1993-2013 by Florian Klaempfl and others Target OS: Android for ARMEL Compiling fcllaz.pas PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode PPU Loading C:\Develop\fpc\2.7.x\\units\arm-android\rtl\system.ppu Trying to use a unit which was compiled with a different FPU mode fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\..\fpc\2.7.x\units\arm-android\rtl\system.ppu I tried with CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV7A" and it works! Lazarus can build ARMV7A projects, but no luck with VFPV3.

Thinking about it a bit the problem is not the compiler or the units, but the settings in Lazarus. If you compiled the RTL with VFPV3 and ARMV7A you also need to apply these settings to other units you compile (the compiler won't set them automatically). So you either need to add "-CfSOFT -CpARMV7A" (and "-OoFASTMATH" if you need it...) to your project settings, the settings of all packages you use and the IDE settings which are used to recompile the FCLLaz and LCL packages or you add the options to your fpc.cfg in an "IFDEF CPUARM ... ENDIF" block.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/96872422/attachment-0001.html>

Reply by email

Kjow
to Sven Barth

2013/5/17 Sven Barth

Show quoted text 12 lines
I tried with CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV7A" and it works! Lazarus can build ARMV7A projects, but no luck with VFPV3. Thinking about it a bit the problem is not the compiler or the units, but the settings in Lazarus. If you compiled the RTL with VFPV3 and ARMV7A you also need to apply these settings to other units you compile (the compiler won't set them automatically). So you either need to add "-CfSOFT -CpARMV7A" (and "-OoFASTMATH" if you need it...) to your project settings, the settings of all packages you use and the IDE settings which are used to recompile the FCLLaz and LCL packages or you add the options to your fpc.cfg in an "IFDEF CPUARM ... ENDIF" block.

Thank you for reply, but I'm already doing this... as I wrote in my latest email:

"Everytime, I recompile FPC with relative options (erasing old compiled arm-android units) and edit relative project parameters, e.g.:

FPC:
make ... CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV6" ... Lazarus:
project->project options-> Other-> -CfSOFT -OoFASTMATH -CpARMV6

This works well.

FPC:
make ... CROSSOPT="-CfVFPV2 -OoFASTMATH -CpARMV7A" ... Lazarus:
project->project options-> Other-> -CfVFPV2 -OoFASTMATH -CpARMV7A

This doesn't work."

So, it always works with -CfSOFT (armv6 or armv7a), but never with -CfVFPV2, -CfVFPV3, -CfVFPV3_D16, etc

Kjow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/d5089477/attachment.html>

Reply by email

Sven Barth
to Kjow
Kjow wrote 38 lines
2013/5/17 Sven Barth < <mailto:>> > I tried with CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV7A" and it > works! Lazarus can build ARMV7A projects, but no luck with VFPV3. Thinking about it a bit the problem is not the compiler or the units, but the settings in Lazarus. If you compiled the RTL with VFPV3 and ARMV7A you also need to apply these settings to other units you compile (the compiler won't set them automatically). So you either need to add "-CfSOFT -CpARMV7A" (and "-OoFASTMATH" if you need it...) to your project settings, the settings of all packages you use and the IDE settings which are used to recompile the FCLLaz and LCL packages or you add the options to your fpc.cfg in an "IFDEF CPUARM ... ENDIF" block. Thank you for reply, but I'm already doing this... as I wrote in my latest email: "Everytime, I recompile FPC with relative options (erasing old compiled arm-android units) and edit relative project parameters, e.g.: FPC: make ... CROSSOPT="-CfSOFT -OoFASTMATH -CpARMV6" ... Lazarus: project->project options-> Other-> -CfSOFT -OoFASTMATH -CpARMV6 This works well. FPC: make ... CROSSOPT="-CfVFPV2 -OoFASTMATH -CpARMV7A" ... Lazarus: project->project options-> Other-> -CfVFPV2 -OoFASTMATH -CpARMV7A This doesn't work." So, it always works with -CfSOFT (armv6 or armv7a), but never with -CfVFPV2, -CfVFPV3, -CfVFPV3_D16, etc

And as I wrote in my mail you need to apply this to all other packages AND the IDE options (because these are used for the packages FCLLaz and LCL) as well (or add it to your fpc.cfg). You are NOT doing this by adding the options to Other.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/2595dd8a/attachment.html>

Reply by email

Marc Santhoff
to Kjow: 2013/5/15 leledumbo The error is clear, but the solution is not... How to clean…
Kjow wrote 63 lines
Hi, 2013/5/15 leledumbo > Isn't the error message clear enough? > The error is clear, but the solution is not... > > PPU Loading C:\Develop\fpc\2.7.x\units\arm-android\rtl\system.ppu > > Trying to use a unit which was compiled with a different FPU mode > > The compiler tries to load the system unit, but it's compiled with > different > FPU mode that the one you're targetting with. Try cleaning up your > arm-android installation and ensure that second FPC compilation really > works. > How to clean arm-android installation? When I call "make" I use: make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm ...etc > > > error on FPC compiling > > I haven't tried, but please be verbose about the error. > With: CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV7" ... ... ... c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:59995: Error: lo register required -- `ldmfd r13!,{r4,r15}' c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60007: Error: lo register required -- `stmfd r13!,{r4,r14}' c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60105: Error: lo register required -- `ldmfd r13!,{r4,r15}' c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60167: Error: lo register required -- `ldr r12,[r0]' c:\Develop\fpc\2.7.x\rtl\units\arm-android\system.s:60168: Error: lo register required -- `ldr r12,[r12,#100]' system.pp(379) Error: Error while assembling exitcode 1 system.pp(379) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted make[4]: *** [system.ppu] Error 1 make[4]: Leaving directory `c:/Develop/fpc/2.7.x/rtl/android' make[3]: *** [android_all] Error 2 make[3]: Leaving directory `c:/Develop/fpc/2.7.x/rtl' make[2]: *** [rtl_all] Error 2 make[2]: Leaving directory `c:/Develop/fpc/2.7.x' make[1]: *** [build-stamp.arm-android] Error 2 make[1]: Leaving directory `c:/Develop/fpc/2.7.x' make: *** [crossall] Error 2 c:\Develop\fpc\2.7.x>

This error clearly looks like a bug in fpc, in the code generator for ARMv7 or the CPU/OS binding, I think.

Show quoted text 40 lines
With (but lazarus build error): CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV6" ... ... ... Installing package tcl Installation package tcl for target arm-android succeeded Skipped package univint which has been disabled for target arm-android Skipped package unixutil which has been disabled for target arm-android Installing package unzip Installation package unzip for target arm-android succeeded Skipped package users which has been disabled for target arm-android Skipped package utmp which has been disabled for target arm-android Skipped package uuid which has been disabled for target arm-android Skipped package winceunits which has been disabled for target arm-android Skipped package winunits-base which has been disabled for target arm-android Skipped package winunits-jedi which has been disabled for target arm-android Skipped package x11 which has been disabled for target arm-android Skipped package xforms which has been disabled for target arm-android Installing package zlib Installation package zlib for target arm-android succeeded Skipped package zorba which has been disabled for target arm-android Installing package fpc-all Installation package fpc-all for target arm-android succeeded make[4]: Leaving directory `c:/Develop/fpc/2.7.x/packages' make[3]: Leaving directory `c:/Develop/fpc/2.7.x' make[2]: Leaving directory `c:/Develop/fpc/2.7.x' make[1]: Leaving directory `c:/Develop/fpc/2.7.x' c:\Develop\fpc\2.7.x> Thank you, Kjow -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Marc Santhoff

Reply by email

Kjow
to Sven Barth: And as I wrote in my mail you need to apply this to all other packages AND the IDE…

2013/5/17 Sven Barth

Show quoted text 8 lines
And as I wrote in my mail you need to apply this to all other packages AND the IDE options (because these are used for the packages FCLLaz and LCL) as well (or add it to your fpc.cfg). You are NOT doing this by adding the options to Other. Regards, Sven

Whops, I'm sorry I misunderstood your email.
Well, now it works :)

Unfortunately performances are the same, so they are terrible.

Anyway, I compiled FPC with:

c:\Develop\fpc\2.7.x_src>make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm CROSSOPT="-CfVFPV3 -OoFASTMATH -CpARMV7A" INSTALL_PREFIX=C:\Develop\fpc\2.7.x
PP=c:\Develop\fpc\2.6.0\bin\i386-win32\fpc.exe
BINDIR=C:\Android\NDK\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows-x86_64\arm-linux-androideabi\bin CROSSBINDIR=C:\Android\NDK\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows-x86_64\bin BINUTILSPREFIX=arm-linux-androideabi-

and added the three options to fpc.cfg

...
#ifdef android
#ifdef cpuarm
-FlC:\Android\NDK\android-ndk-r8e\platforms\android-14\arch-arm\usr\lib -CfVFPV3
-OoFASTMATH
-CpARMV7A
#endif
#endif
...

It compiles, builds and makes apk package well, but it is yet very slow on a Samgung Galaxy Note 1.

Thank you!
Kjow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/6fd570f4/attachment.html>

Reply by email

Kjow
to Kjow

2013/5/17 Kjow

Show quoted text 14 lines
and added the three options to fpc.cfg ... #ifdef android #ifdef cpuarm -FlC:\Android\NDK\android-ndk-r8e\platforms\android-14\arch-arm\usr\lib -CfVFPV3 -OoFASTMATH -CpARMV7A #endif #endif ...

PS I removed everything from "project->project options-> Other" and I edited with these options fpc.cfg and it works "well". So I don't need anymore to edit project "other":

fpc.cfg:
...
#ifdef android
#ifdef cpuarm
-dANDROID
-CfVFPV3
-OoFASTMATH
-CpARMV7A
-Xd
-XParm-linux-androideabi-
-FLC:\Android\NDK\android-ndk-r8e\platforms\android-14\arch-arm\usr\lib\libdl.so -FUC:\Android\NDK\android-ndk-r8e\platforms\android-14\arch-arm\usr\lib -FlC:\Android\NDK\android-ndk-r8e\platforms\android-14\arch-arm\usr\lib -FDC:\Android\NDK\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows-x86_64\bin #endif
#endif
...

Best Regards,
Kjow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/762d9104/attachment-0001.html>

Reply by email

Sven Barth
to Kjow: 2013/5/17 Sven Barth Whops, I'm sorry I misunderstood your email. Well, now it works :)…
Kjow wrote 16 lines
2013/5/17 Sven Barth < <mailto:>> And as I wrote in my mail you need to apply this to all other packages AND the IDE options (because these are used for the packages FCLLaz and LCL) as well (or add it to your fpc.cfg). You are NOT doing this by adding the options to Other. Regards, Sven Whops, I'm sorry I misunderstood your email. Well, now it works :) Unfortunately performances are the same, so they are terrible.

It's likely that the LCL doesn't do that much floating point operations and is simply rather "heavy"...

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/6bc67c6f/attachment.html>

Reply by email

Kjow
to Sven Barth

2013/5/17 Sven Barth

Show quoted text 7 lines
Am 17.05.2013 17:12, schrieb Kjow: Unfortunately performances are the same, so they are terrible. It's likely that the LCL doesn't do that much floating point operations and is simply rather "heavy"...

Is it possible to show at runtime if the program is assembled for the right fpu?

Anyway, I think that should be some components/demos that use FPU (maybe BGRABitmap?), so I should notice performance difference....

Kjow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130517/f05eddd9/attachment.html>

Reply by email