Lazarus

Programming => Operating Systems => Android => Topic started by: felipemdc on July 03, 2012, 11:09:39 am

Title: Target Android branch
Post by: felipemdc on July 03, 2012, 11:09:39 am
Hello,

I wonder if anyone has tested already the targetandroid branch: http://svn.freepascal.org/cgi-bin/viewvc.cgi/branches/targetandroid/

I am thinking of trying to built it with my FPC 2.6.0 as starting compiler and see if it can run LCL-CustomDrawn-Android

Any previous experience with it would be nice =)

I have commit rights, so I can apply fixes if people have patches for it.

thanks,

Felipe
Title: Re: Target Android branch
Post by: Andru on July 03, 2012, 11:32:06 am
As I remember the comments for this branch, there was included patch based on mine for threads and some fixes from BeRo, so it should work :) But this depends on which revision of FPC 2.6.0 is used as a base, because revisions after 20768 are broken.
Title: Re: Target Android branch
Post by: felipemdc on July 03, 2012, 12:01:40 pm
But this depends on which revision of FPC 2.6.0 is used as a base, because revisions after 20768 are broken.

2.6.0 has only 1 revision since it is a release
Title: Re: Target Android branch
Post by: barlone on July 03, 2012, 01:28:15 pm
Does this mean that this branch can replace fpc4android?
Title: Re: Target Android branch
Post by: Andru on July 03, 2012, 03:26:08 pm
Quote
2.6.0 has only 1 revision since it is a release
oops, I mean 2.6.x :)
Title: Re: Target Android branch
Post by: Kostas on July 03, 2012, 08:37:38 pm
I am trying to compile the targetandroid branch using this script:

SET PATH=c:\lazarus\fpc\2.6.1\bin\i386-win32\
make clean
make crossinstall CPU_TARGET=arm OS_TARGET=linux OPT="-dFPC_ARMEL" CROSSOPT="-CpARMv6 -CfVFPv3" CROSSBINDIR=C:\android\android-ndk-r7\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin OPT=-dFPC_ARMEL BINUTILSPREFIX=arm-linux-androideabi- INSTALL_PREFIX=C:\FPC4ANDROID\targetandroid\output
pause


But i get the following error:
Fatal: Can't find unit objpas used by MacPas
Fatal: Compilation aborted

Any idea?

Kostas

EDIT:
I also changed the PATH to show at the 2.6.0 compiler.
Now i get this errors:

make[3]: Entering directory `C:/FPC4ANDROID/targetandroid/packages'
make[3]: Nothing to be done for `clean'.
make[3]: Leaving directory `C:/FPC4ANDROID/targetandroid/packages'
make[2]: Leaving directory `C:/FPC4ANDROID/targetandroid'
make utils_clean FPC=C:/FPC4ANDROID/targetandroid/compiler/ppcrossarm.exe
make[2]: Entering directory `C:/FPC4ANDROID/targetandroid'
make -C utils clean
make[3]: *** No rule to make target `clean'.  Stop.
make[3]: Entering directory `C:/FPC4ANDROID/targetandroid/utils'
make[3]: Leaving directory `C:/FPC4ANDROID/targetandroid/utils'
make[2]: *** [utils_clean] Error 2
make[2]: Leaving directory `C:/FPC4ANDROID/targetandroid'
make[1]: *** [build-stamp.arm-linux] Error 2
make[1]: Leaving directory `C:/FPC4ANDROID/targetandroid'
make: *** [crossinstall] Error 2


EDIT 2:
As i found out the parameter OS_TARGET=linux should be OS_TARGET=android

EDIT 3:
I found with google the following:
How to compile:
---------------

from the command line, e.g. by issuing

make zipinstall FPC=<host fpc compiler> OS_TARGET=android CPU_TARGET=arm
CROSSOPT="-Cfsoft" BINUTILSPREFIX=<prefix-to-android-ndk-as-ld>

you should get a nice archive with your cross compiler after completion.

Before that you might need to create a new "fpcmake" tool by e.g.
building a normal zipinstall to be used during building the
crosscompiler (or native compiler) and put it into the path.

But i can not start a lot  with it...
Title: Re: Target Android branch
Post by: Kostas on July 03, 2012, 11:25:11 pm
I managed to compile the fixed_2_6 branch.
But when i compile i get an error message:
Illegal parameter: -WR

Anyone knows what this means?

Kostas

EDIT: I found it out. I should uncheck the compiler option Unit style
Title: Re: Target Android branch
Post by: felipemdc on July 07, 2012, 09:54:17 am
I managed to compile the fixed_2_6 branch.

fixes_2_6 does not contain the apropriate fixes for Android, AFAIK

In my Mac OS X I did the following:

svn co http://svn.freepascal.org/svn/fpc/branches/targetandroid targetandroid

and then:

make crossinstall CPU_TARGET=arm OS_TARGET=android OPT="-dFPC_ARMEL" CROSSOPT="-CpARMv6 -CfSoft" CROSSBINDIR=/Users/felipe/Programas/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin OPT=-dFPC_ARMEL BINUTILSPREFIX=arm-linux-androideabi- INSTALL_PREFIX=output

And it fails ... I'll ask in FPC-Devel mailling list.

/Users/felipe/Programas/targetandroid/compiler/ppcrossarm -Ur -Tandroid -Parm -XParm-linux-androideabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FD/Users/felipe/Programas/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin -FE. -FU/Users/felipe/Programas/targetandroid/rtl/units/arm-android -dFPC_ARMEL -darm -dRELEASE -CpARMv6 -CfSoft -Us -Sg ../linux/system.pp
arm.inc(906,2) Error: Unrecognized opcode rev
arm.inc(906,6) Error: Assembler syntax error
arm.inc(921,2) Error: Unrecognized opcode rev
arm.inc(921,6) Error: Assembler syntax error
arm.inc(946,2) Error: Unrecognized opcode rev
arm.inc(946,6) Error: Assembler syntax error
arm.inc(947,2) Error: Unrecognized opcode rev
arm.inc(947,6) Error: Assembler syntax error
arm.inc(973,2) Error: Unrecognized opcode rev
arm.inc(973,6) Error: Assembler syntax error
arm.inc(974,2) Error: Unrecognized opcode rev
arm.inc(974,6) Error: Assembler syntax error
text.inc(1774,14) Warning: Implicit string type conversion from "AnsiString" to "UnicodeString"
text.inc(1998,44) Warning: Implicit string type conversion with potential data loss from "UnicodeString" to "AnsiString"
system.pp(380) Fatal: There were 12 errors compiling module, stopping
Fatal: Compilation aborted
make[4]: *** [system.ppu] Error 1
make[3]: *** [android_all] Error 2
make[2]: *** [rtl_all] Error 2
make[1]: *** [build-stamp.arm-android] Error 2
make: *** [crossinstall] Error 2
Title: Re: Target Android branch
Post by: Kostas on July 07, 2012, 01:21:59 pm
I have managed to compile target android.
If i remember right you have to use android NDK r8
or at least copy the assembler arm-linux-androideabi-as from the revision r8 to the revision r7 and to the fpc path.
I will try it once more in order to be sure.

But even so, i was not able to compile the androidlcl example.
I will give it again a try and let you know what the error messages were.
Maybe you have then an idea how to solve them

EDIT: I had to build the fpcmake.exe tool with the sources of targetandroid before you can compile the targetandroid.

But will then your fixes be available then???

Although i could compile androidlcl example with the 2.6 fixes the examble crashes immediately in android...

I have done the thread patches from 2.6 fixes to your 2.5.1 sources but the application still crashes when a thread is created...
Maybe there is a problem in the lcl??

EDIT2: Sorry i was wrong about the ndk r8...
I have done so many changes installed and reinstalled so many time lazarus and i don' t remember right was i had done...
I will try it again from the beginning and i will post my results...

Kostas
Title: Re: Target Android branch
Post by: felipemdc on July 07, 2012, 01:52:36 pm
The maintainer of the branch said he will try to fix the problem that I had building.

But will then your fixes be available then???

No idea. Once I can build it then I will check that and if necessary make commits.

I wonder how you managed to build it. Maybe you removed the options ARMv6? Because it is the responsible for causing the fail for me. But without it, it will crash on some devices.

Quote
Although i could compile androidlcl example with the 2.6 fixes the examble crashes immediately in android...

Like I said, 2.6.x is not suitable for Android development.

Quote
I have done the thread patches from 2.6 fixes to your 2.5.1 sources but the application still crashes when a thread is created...
Maybe there is a problem in the lcl??

I don't think so, the LCL is not involved in the threading. I have no idea what the problem could be, however.
Title: Re: Target Android branch
Post by: IndianaJones on July 07, 2012, 02:05:03 pm
@Kostas
FYI, I have tried with the ndk-r8 and the same error as Felipe did.
FPC 2.6.0
Title: Re: Target Android branch
Post by: Andru on July 07, 2012, 03:09:51 pm
You can try to use this (http://zengl.org/tmp/fpc4android.7z) precompiled version of FreePascal from fixes_2_6 branch built with mine set of patches(compiler is built with options -CpARMv6 -CfSOFT). It works like a charm for me :) But I use threads via BeginThread function and set of RTL* functions for events and critical sections, so I can't guarantee that it will work with TThread class and AndroidLCL code. For better understanding what is wrong try to use Android 4.0 in emulator. In this version logcat finally can show what symbols are unresolved, and this is very helpful.
Title: Re: Target Android branch
Post by: Kostas on July 07, 2012, 11:08:18 pm
As i said before i was wrong about compiling targetandroid with the use of ndk r8.

But the NDK r8 helped me about something else:
It is the only way to compile the android branch 2.5.1 using the fpu with the options -CpARMv6 -CfVFPv2.
I get then a build without errors.
I put then the ppccrossarm.exe in the 2.6.1 bin directory and the units directory in the directory 2.5.1 exactly as i did it when with compiling with -CfSOFT.

But when i try to compile my androidlcl examble i get the error:
fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\fpc\2.5.1\units\arm-linux\rtl\system.ppu

But the system.ppu exists(!) in this directory.

Any idea?
Kostas
Title: Re: Target Android branch
Post by: Kostas on July 08, 2012, 12:11:15 am
What i forgot to mention before is that i had problems with my antivirus program (Avast).
When a new exe file was build while making the android branches it was opened in the sandbox which caused problems...

So i always need to turn the antivirus program off when i am making a build.

Maybe other antivirus programs have same or similar problems...

Kostas
Title: Re: Target Android branch
Post by: Leledumbo on July 08, 2012, 05:13:06 am
Quote
But when i try to compile my androidlcl examble i get the error:
fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\fpc\2.5.1\units\arm-linux\rtl\system.ppu

But the system.ppu exists(!) in this directory
fpc.cfg please... (just the -Fu lines)
and to ensure, compile with -vt and look for first lines containing "Using unit path...". make sure they point to your 2.5.1 units directory.
Title: Re: Target Android branch
Post by: Kostas on July 08, 2012, 09:50:35 am
fpc.cfg please... (just the -Fu lines)
and to ensure, compile with -vt and look for first lines containing "Using unit path...". make sure they point to your 2.5.1 units directory.

This is not the problem, althought in order to be sure i chanded the -Fu lines to hard coded paths.

The problem is the following:
1. If i compile the 2.5.1 android patched fpc and NDK r7 with the option -CfSOFT i get nice binaries, i copy them to the right directories and i can compile my program without problems.

2. If i compile the 2.5.1 android patched fpc and NDK r7 with FPU support (option -CfVFPv2) i get errors and fpc can not be compiled.

3. If i compile the 2.5.1 android patched fpc with NDK r8 with FPU support (option -CfVFPv2) the fpc compiles fine and i get the cross compiler and the 2.5.1 units. Then i copy the created binary in the 2.6.1 direcoty and the units in the 2.5.1 directory exactly(!) as i do it when i compile with -CfSOFT. But when i tr now to compile my program i get this error:
PPU Loading C:\lazarus\fpc\2.5.1\units\arm-linux\rtl\system.ppu
fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\fpc\2.5.1\units\arm-linux\rtl\system.ppu

Kostas

Title: Re: Target Android branch
Post by: Leledumbo on July 08, 2012, 03:48:47 pm
Quote
PPU Loading C:\lazarus\fpc\2.5.1\units\arm-linux\rtl\system.ppu
fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\fpc\2.5.1\units\arm-linux\rtl\system.ppu
This error will exactly come whenever:
I have no idea which case applied to you.
Title: Re: Target Android branch
Post by: yuriy_sydorov on January 22, 2013, 09:23:03 pm
I've worked on the targetandroid branch in the last few weeks.  Now it is in very good state for both arm and i386 CPUs. Please test and report ant issues:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/branches/targetandroid/
Title: Re: Target Android branch
Post by: truetom on January 24, 2013, 01:45:07 am
I've worked on the targetandroid branch in the last few weeks.  Now it is in very good state for both arm and i386 CPUs. Please test and report ant issues:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/branches/targetandroid/

Hello , thank you for you work!
I haved test this branches,but when i compile the examples\androidlcl\androidlcltest.lpr ,it's show some errors:

F:\lazbuild\fpc\2.7.1\bin\i386-win32\arm-linux-ld.exe: warning: F:\lazbuild\examples\androidlcl\android\libs\armeabi\link.res contains output sections; did you forget -T?
F:\lazbuild\fpc\2.7.1\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3
androidlcltest.lpr(34,36) Error: Error while linking
androidlcltest.lpr(34,36) Fatal: There were 1 errors compiling module, stopping

so i search the forum, i found this :http://www.lazarus.freepascal.org/index.php/topic,15108.0.html  ,  now i pass -FLlibdl.so to the compiler option , it's compiled ok, but when install the apk to the android device which is not running.
How can i do ? Thank you !
Title: Re: Target Android branch
Post by: yuriy_sydorov on January 24, 2013, 11:54:54 am
I've worked on the targetandroid branch in the last few weeks.  Now it is in very good state for both arm and i386 CPUs. Please test and report ant issues:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/branches/targetandroid/

Hello , thank you for you work!
I haved test this branches,but when i compile the examples\androidlcl\androidlcltest.lpr ,it's show some errors:

F:\lazbuild\fpc\2.7.1\bin\i386-win32\arm-linux-ld.exe: warning: F:\lazbuild\examples\androidlcl\android\libs\armeabi\link.res contains output sections; did you forget -T?
F:\lazbuild\fpc\2.7.1\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3
androidlcltest.lpr(34,36) Error: Error while linking
androidlcltest.lpr(34,36) Fatal: There were 1 errors compiling module, stopping

so i search the forum, i found this :http://www.lazarus.freepascal.org/index.php/topic,15108.0.html  ,  now i pass -FLlibdl.so to the compiler option , it's compiled ok, but when install the apk to the android device which is not running.
How can i do ? Thank you !

You need to specify android target for compiler, not linux target using -Tandroid switch.
Also you need to use binutils from Android NDK. You can specify the -XParm-linux-androideabi- compiler switch to avoid binutils renaming to arm-android-xxx
Also add library path to libs from Android NDK.
Title: Re: Target Android branch
Post by: Leledumbo on January 24, 2013, 05:47:27 pm
Quote
Also you need to use binutils from Android SDK. You can specify the -XParm-linux-androideabi- compiler switch to avoid binutils renaming to arm-android-xxx
Also add library path to libs from Android SDK.
Did you mean NDK?
Title: Re: Target Android branch
Post by: yuriy_sydorov on January 24, 2013, 09:01:49 pm
Quote
Also you need to use binutils from Android SDK. You can specify the -XParm-linux-androideabi- compiler switch to avoid binutils renaming to arm-android-xxx
Also add library path to libs from Android SDK.
Did you mean NDK?
Of course NDK  :) I've edited by post.
Title: Re: Target Android branch
Post by: yuriy_sydorov on February 13, 2013, 07:53:53 pm
The targetandroid branch has been merged to trunk. I've created wiki page about Android target here: http://wiki.freepascal.org/Android
Title: Re: Target Android branch
Post by: Takeda on February 13, 2013, 09:10:39 pm
to Mr. yury_sidorov :

Quote
....
Also add library path to libs from Android NDK.

When? when building-time the arm-android compiler?

I already use "LIBDIR=%myandroidlib%", it still failed. I still failed to built cross compiler "arm-android".
I always got : arm-linux-androideabi-ld.bfd.exe: cannot find crtbegin_dynamic.o

- takeda -
Title: Re: Target Android branch
Post by: yuriy_sydorov on February 13, 2013, 09:21:42 pm
to Mr. yury_sidorov :

Quote
....
Also add library path to libs from Android NDK.

When? when building-time the arm-android compiler?

I already use "LIBDIR=%myandroidlib%", it still failed. I still failed to built cross compiler "arm-android".
I always got : arm-linux-androideabi-ld.bfd.exe: cannot find crtbegin_dynamic.o

- takeda -

Do you have the crtbegin_dynamic.o file in your android libs dir?
You need to point to (or copy files from) the "android-ndk-dir\platforms\android-XX\arch-arm\usr\lib".
Title: Re: Target Android branch
Post by: Takeda on February 13, 2013, 09:28:03 pm
to Mr. Yury_Sidorov ;

Quote
Do you have the crtbegin_dynamic.o file in your android libs dir?
You need to point to (or copy files from) the "android-ndk-dir\platforms\android-XX\arch-arm\usr\lib".

Yes, I did.. See my attachment screenshot, Sir..   ;)

Title: Re: Target Android branch
Post by: yuriy_sydorov on February 13, 2013, 09:55:26 pm
You need to use "make all install CROSSINSTALL=1" or "make crossall crossinstall" in order not to build the native compiler and eliminate the error.
Title: Re: Target Android branch
Post by: Takeda on February 13, 2013, 10:16:22 pm
You need to use "make all install CROSSINSTALL=1" or "make crossall crossinstall" in order not to build the native compiler and eliminate the error.

Still stick on the same error..  :'(
I still can't built the cross-compiler for arm-android..
Title: Re: Target Android branch
Post by: yuriy_sydorov on February 13, 2013, 10:25:41 pm
It's weird. When crossall is specified the native compiler should not be built at all and library dir not needed too. Try to issue exactly the same commands as in the wiki tutorial.

Please find and attach the link.res file from the compiler folder.
Title: Re: Target Android branch
Post by: Takeda on February 13, 2013, 11:20:34 pm
Furthermore even now with latest svn r23612 I got the message below (even only for i386-linux) :

Quote
...
make[5]: Leaving directory `d:/freepascal271/rtl/linux'
__missing_command_FPCMAKE -p -Ti386-linux Makefile.fpc
process_begin: CreateProcess(NULL, __missing_command_FPCMAKE -p -Ti386-linux Mak
efile.fpc, ...) failed.
make (e=2): The system cannot find the file specified.
...

Before r23612, target i386-linux crosscompiler would success to built..
Title: Re: Target Android branch
Post by: yuriy_sydorov on February 13, 2013, 11:44:26 pm
Furthermore even now with latest svn r23612 I got the message below (even only for i386-linux) :

Quote
...
make[5]: Leaving directory `d:/freepascal271/rtl/linux'
__missing_command_FPCMAKE -p -Ti386-linux Makefile.fpc
process_begin: CreateProcess(NULL, __missing_command_FPCMAKE -p -Ti386-linux Mak
efile.fpc, ...) failed.
make (e=2): The system cannot find the file specified.
...

Before r23612, target i386-linux crosscompiler would success to built..

All works fine for me. The error indicates that you have specified wrong FPCMAKE parameter.
Title: Re: Target Android branch
Post by: Leledumbo on February 14, 2013, 07:25:50 am
Quote
The error indicates that you have specified wrong FPCMAKE parameter.
Or not found in PATH, this parameter is seldom supplied so it should be searched on PATH by default.
Title: Re: Target Android branch
Post by: mas steindorff on March 21, 2013, 11:16:20 pm
I'm having trouble creating the android compiler on my win32 system.  I've followed the steps shown on the http://wiki.freepascal.org/Android Wiki page but cannot get past the "building cross compiler" stage.
The steps I have taken are
1: I've downloaded and installed lazarus 1.0.6 (FCP 2.6.0) from sourceforge and tested it on a small project OK.  I need this to build the final compiler.

2: I've gotton the latest svn trunk #23926 and save it to C:\Develop\FPC 
3: I've installed android-ndk-r8d-windows => program files\android-ndk-r8d
4: installed android SDK installer_rr21-windows.  this automatically installs into Program files\android\android-sdk

5:I've added to my PATH "c:\program files\android-ndk-r8d\toolchains\arm-linux-androideabi-4.7\prebuilt\windows\bin;"
this is followed by "C:\lazarus\fpc\2.6.0\bin\i386-win32;"  each path was tested by going into C:/test and then running a program that lives in each of these locations.

At this point, I assume the Wiki is wrong, I do not have a "C:\Develop\FPC\FPC" folder.  under the C:\Develop\FPC folder, I have the repo's file structure which starts which compiler, ide, installer.... folders and makefiles
 
When I try the
"make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm INSTALL_PREFIX=C:\Develop\FPC\pp" command, at the C:/Develop/FPC level, the make runs for a few minutes and ends up with these last few lines..
Code: [Select]
....
make[5]: Entering directory `C:/Develop/FPC/compiler/utils'
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f units/i386-win32/ppu.ppu units/i386-win32/crc.ppu units/i386-win32/usubst.ppu
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -rf units
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f *.o *.ppu *.rst *.s *.a *.dll *.ppl
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -rf *.sl
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f fpcmade.* Package.fpc ppas.bat script.res link.res
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f *_ppas.bat
make[5]: Leaving directory `C:/Develop/FPC/compiler/utils'
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -rf arm/units
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f arm/*.o arm/*.ppu arm/*.rst arm/*.s arm/*.a arm/*.dll arm/*.ppl
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f arm/ppc386.exe arm/ppc68k.exe arm/ppcx64.exe arm/ppcppc.exe arm/ppcsparc.exe arm/ppcppc64.exe arm/ppcarm.exe arm/ppcmips.exe arm/ppcmipsel.exe arm/ppcjvm.exe arm/ppcrossarm.exe
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f ppcrossarm.exe
C:/lazarus/fpc/2.6.0/bin/i386-win32/gmkdir.exe -p arm/units/i386-win32
C:/Develop/FPC/compiler/ppc.exe -Ur -Xs -O2 -n -Fuarm -Fusystems -FuC:/Develop/FPC/rtl/units/i386-win32 -Fiarm -FE. -FUarm/units/i386-win32 -dRELEASE    -darm -dGDB -dBROWSERLOG  -Sew pp.pas
widestr.pas(71,7) Fatal: Can't find unit cpall used by widestr
Fatal: Compilation aborted
make[4]: *** [ppcrossarm.exe] Error 1
make[4]: Leaving directory `C:/Develop/FPC/compiler'
make[3]: *** [cycle] Error 2
make[3]: Leaving directory `C:/Develop/FPC/compiler'
make[2]: *** [compiler_cycle] Error 2
make[2]: Leaving directory `C:/Develop/FPC'
make[1]: *** [build-stamp.arm-android] Error 2
make[1]: Leaving directory `C:/Develop/FPC'
make: *** [crossall] Error 2

I also tried these same steps with the svn android branch and came up with some different errors listed next
Code: [Select]
...
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f fpcmade.arm-android Package.fpc ppas.bat script.res link.res
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -f *.s *_ppas.sh
make[4]: Leaving directory `C:/Develop/FPC/rtl/android'
make[3]: Leaving directory `C:/Develop/FPC/rtl'
make[2]: Leaving directory `C:/Develop/FPC'
make packages_clean FPC=C:/Develop/FPC/compiler/ppcrossarm.exe
make[2]: Entering directory `C:/Develop/FPC'
make -C packages clean
make[3]: Entering directory `C:/Develop/FPC/packages'
make -C fpmkunit clean_bootstrap
make[4]: Entering directory `C:/Develop/FPC/packages/fpmkunit'
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -rf units_bs
make[4]: Leaving directory `C:/Develop/FPC/packages/fpmkunit'
make[3]: Leaving directory `C:/Develop/FPC/packages'
make[2]: Leaving directory `C:/Develop/FPC'
make rtl_all FPC=C:/Develop/FPC/compiler/ppcrossarm.exe RELEASE=1
make[2]: Entering directory `C:/Develop/FPC'
make -C rtl all
make[3]: Entering directory `C:/Develop/FPC/rtl'
make -C android all
make[4]: Entering directory `C:/Develop/FPC/rtl/android'
C:/lazarus/fpc/2.6.0/bin/i386-win32/gmkdir.exe -p C:/Develop/FPC/rtl/units/arm-android
arm-android-as  -o C:/Develop/FPC/rtl/units/arm-android/prt0.o arm/prt0.as
process_begin: CreateProcess((null), arm-android-as -o C:/Develop/FPC/rtl/units/arm-android/prt0.o arm/prt0.as, ...) failed.
make (e=2): The system cannot find the file specified.
make[4]: *** [prt0.o] Error 2
make[4]: Leaving directory `C:/Develop/FPC/rtl/android'
make[3]: *** [android_all] Error 2
make[3]: Leaving directory `C:/Develop/FPC/rtl'
make[2]: *** [rtl_all] Error 2
make[2]: Leaving directory `C:/Develop/FPC'
make[1]: *** [build-stamp.arm-android] Error 2
make[1]: Leaving directory `C:/Develop/FPC'
make: *** [crossall] Error 2

Any suggestions will be appreciated
Thanks MAS
Title: Re: Target Android branch
Post by: Leledumbo on March 22, 2013, 10:07:11 am
I guess 2.6.X in the article must be updated to >= 2.6.2.
Title: Re: Target Android branch
Post by: yuriy_sydorov on March 22, 2013, 10:52:05 am
mas steindorff, I've checked the build right now using the latest trunk revision 23952 and it works well.
Maybe your FPC sources are not clean? Try the build with the latest trunk checkout.

P.S. FPC 2.6.0 can be used for build.
P.S. The targetandroid branch is obsolete, since the merge to the trunk.
Title: Re: Target Android branch
Post by: mas steindorff on March 23, 2013, 02:40:16 am
I've checked out rev 23952 and it complies!! Thank you.

I can now proceed with the rest of the steps on the wiki. 

Once done, I'll was thinking of adding a list of the compatible parts that "we" know will work (like this rev of the trunk) but this info will be outdated in a few weeks.  what do you guys think as far as the wiki?
Title: Re: Target Android branch
Post by: BigChimp on March 23, 2013, 06:35:04 am
Once done, I'll was thinking of adding a list of the compatible parts that "we" know will work (like this rev of the trunk) but this info will be outdated in a few weeks.  what do you guys think as far as the wiki?

Android outsider barging in: why not put it on the wiki with the dates next to it? That way you get the best of both worlds ;)

TBH, having all info in one place (the wiki) instead of having to search through forum posts makes sense to me...
TinyPortal © 2005-2018