Latest FPC Android binaries lazarus / 43-Android ---------------------------------------------------------------------- Daniello · 2014-06-24 01:09 Hi guys, does anyone have FPC 2.7.1 for Android pre-compiled, for Windows? I'm trying to build it from source, but it gets stuck during compilation, I'm not sure what to do :\ [ 85%] Compiled package rtl-console Start compiling package rtl-unicode for target arm-android.        Compiling rtl-unicode\BuildUnit_rtl_unicode.pp        Compiling .\rtl-unicode\src\inc\cpbuildu.pp        Compiling .\rtl-unicode\src\inc\cp932.pas        Compiling .\rtl-unicode\src\inc\cp936.pas I left it open for 30 minutes, and still nothing, when it reaches cp936.pas does not continue. ---------------------------------------------------------------------- Leledumbo · 2014-06-24 09:47 What's your starting compiler? It should be 2.6.X, preferably 2.6.4. I don't use windows anymore so I can't provide the binary for you (well, actually generating just the compiler is possible, but the RTL and other stuffs are not that easy). ---------------------------------------------------------------------- Daniello · 2014-06-24 11:36 Quote from: Leledumbo on June 24, 2014, 11:47:29 amWhat's your starting compiler? It should be 2.6.X, preferably 2.6.4. I don't use windows anymore so I can't provide the binary for you (well, actually generating just the compiler is possible, but the RTL and other stuffs are not that easy). I tried 2.6.4 and 2.6.1, all have same problem, the compilation blocks when they reach that file. No errors, nothing, just hangs... I checked the folder, it actually generates a .s file for the unit, but not a ppu ---------------------------------------------------------------------- marcov · 2014-06-24 12:34 I would guess that means that it is not the compiler, but the Android build tools that hang. Try varying them. ---------------------------------------------------------------------- Daniello · 2014-06-24 12:49 Quote from: marcov on June 24, 2014, 02:34:29 pmI would guess that means that it is not the compiler, but the Android build tools that hang. Try varying them. Yep, I also thought about that, since I was using a old NDK install. Anyway I downloaded the most recent and tried, the same continued to happen... This most recent NDK has two toolchains version arm-linux-androideabi-4.6 and arm-linux-androideabi-4.8 I tried with both, still nothing.  Note that calling the assembler from ndk directly on this .s file generated from the compilation generates a .o file, no problem! So it seems to be a compiler problem, is there anyway to force the compilation process to be more verbose, to actually show exactly what commands are being called? ---------------------------------------------------------------------- marcov · 2014-06-24 13:39 Try adding -va. ---------------------------------------------------------------------- Daniello · 2014-06-24 13:59 Quote from: marcov on June 24, 2014, 03:39:50 pmTry adding -va. Like this? set OPTS=-gl -va set COMMONOPTS=UPXPROG=echo COPYTREE=echo OPT="%OPTS%" GINSTALL=myinst.exe make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm CROSSOPT="-CfVFPV3" %COMMONOPTS% INSTALL_PREFIX=%INSTALLDIR% FPC=%FPCSTART% It does show more stuff when compiling the compiler itself (warnings, etc) But strangely now it gives even less info when compiling the packages, it does not even show what file is currently being compiled, now it just hangs at this line: [ 85%] Compiled package rtl-console Start compiling package rtl-unicode for target arm-android. ---------------------------------------------------------------------- marcov · 2014-06-24 14:09 Quote from: Daniello on June 24, 2014, 03:59:19 pmIt does show more stuff when compiling the compiler itself (warnings, etc) But strangely now it gives even less info when compiling the packages, it does not even show what file is currently being compiled, now it just hangs at this line: [ 85%] Compiled package rtl-console Start compiling package rtl-unicode for target arm-android. Try FPMAKEOPT="-va" to the make line. ---------------------------------------------------------------------- Daniello · 2014-06-24 14:28 Thanks! The option was -v not -va, but now it displays all info. And so, it hangs in this command: C:\android\android-ndk-r9d\toolchains\arm-linux- androideabi-4.8\prebuilt\windows\bin\arm-linux-androideabi-as.exe -mfpu=vfpv3 -o d:\code\fpc\packages\rtl-unicode\units\arm- android\cp936.o  d:\code\fpc\packages\rtl-unicode\units\arm- android\cp936.s Now, now, copypasting this comand into the command line, it runs fine. However, notice the following, this command is generating an .o file. When compiling FPC with make, it does indeed also generate this file, so it seems that the next step is the culprit (which I assume it is making a ppu from the .o). ---------------------------------------------------------------------- marcov · 2014-06-24 14:33 The .ppu is generated before the .o. So that would mean that while the assembler ends, the compiler doesn't detect that (or the assembler hangs, or waits for key). The question will probably be what is different wrt output with that file then with other files, since it compiles many before OK. ---------------------------------------------------------------------- Daniello · 2014-06-24 14:41 Quote from: marcov on June 24, 2014, 04:33:13 pmThe .ppu is generated before the .o. So that would mean that while the assembler ends, the compiler doesn't detect that (or the assembler hangs, or waits for key). The question will probably be what is different wrt output with that file then with other files, since it compiles many before OK. Hmm, so the -ppu is generated before the .o, I did not know that, but then why I cannot see the .ppu in the package unit folder? The ppu for cp932.pas is there, and this is another file from the unicode package that is compiled succefully before cp936.pas The only difference that I see between this file and all others that compile sucessfully is that this file is huge (87 thousand lines of pascal, around 117 thousand of asm). This seems to somehow make one of the executables hang somewhere.. I would just simply skip this package, but it seems this is a rtl package, so cannot really skip it or the compiler probably would not work. Sadly I don't know what you mean by wrt output. ---------------------------------------------------------------------- BigChimp · 2014-06-24 16:14 Quote from: Daniello on June 24, 2014, 04:41:43 pmSadly I don't know what you mean by wrt output. wrt is shorthand for "with regard to" or "concerning" ---------------------------------------------------------------------- Daniello · 2014-06-25 03:07 Quote from: BigChimp on June 24, 2014, 06:14:29 pmwrt is shorthand for "with regard to" or "concerning" Ah I see, never heard the expression. No one knows a site with windows binaries for latest version or someone wants to try compiling it on their computer? I still don't understand what could cause this, if I have some time tomorrow I will try to compile it under linux or osx, just to see what happens. Anyway, I still need a Windows version, since I do most of my work there. ---------------------------------------------------------------------- jmpessoa · 2014-06-25 03:16 Hi Danielo, yo can try TrueTom solution: 1. I got the (*.7z) http://sourceforge.net/projects/laz4android/files/laz4android1.3- 43585-FPC2.7.1-New.7z/download 2. Then I extracted it to C:\laz4android13 3. I edited "build.bat" as:    SET FPC_BIN_PATH=C:\laz4android13 4. Execute "build.bat" ---------------------------------------------------------------------- BigChimp · 2014-06-25 06:03 You could report a bug in the bug tracker with all relevant output (the -v output, used revisions, NDK version) etc. Hopefully it will get fixed. ---------------------------------------------------------------------- marcov · 2014-06-25 07:38 Quote from: Daniello on June 24, 2014, 04:41:43 pmQuote from: marcov on June 24, 2014, 04:33:13 pmThe .ppu is generated before the .o. So that would mean that while the assembler ends, the compiler doesn't detect that (or the assembler hangs, or waits for key). The question will probably be what is different wrt output with that file then with other files, since it compiles many before OK. Hmm, so the -ppu is generated before the .o, I did not know that, but then why I cannot see the .ppu in the package unit folder? My bad. I meant the ppu is not generated FROM the .o.  They are independent results. The conclusion is the same however, probably the assembler stage somehow either doesn't finish, or doesn't get detected as finished. If it hangs, can you see the assembler in taskmgr? p.s. I don't use android, so I only know general crosscompiling. ---------------------------------------------------------------------- Daniello · 2014-06-25 16:58 Quote from: jmpessoa on June 25, 2014, 05:16:19 amHi Danielo, yo can try TrueTom solution: 1. I got the (*.7z) http://sourceforge.net/projects/laz4android/files/laz4android1.3- 43585-FPC2.7.1-New.7z/download 2. Then I extracted it to C:\laz4android13 3. I edited "build.bat" as:    SET FPC_BIN_PATH=C:\laz4android13 4. Execute "build.bat" jmpessoa, thanks, I tried your link, still did not work. Your file contains a 2.7.1 Windows FPC, so I tried with this one, still hangs in the same place. Quote from: BigChimp on June 25, 2014, 08:03:22 amYou could report a bug in the bug tracker with all relevant output (the -v output, used revisions, NDK version) etc. Hopefully it will get fixed. Yeah, I'll do this! ---------------------------------------------------------------------- Daniello · 2014-06-25 17:12 Quote from: marcov on June 25, 2014, 09:38:29 amMy bad. I meant the ppu is not generated FROM the .o.  They are independent results. The conclusion is the same however, probably the assembler stage somehow either doesn't finish, or doesn't get detected as finished. If it hangs, can you see the assembler in taskmgr? p.s. I don't use android, so I only know general crosscompiling. I just checked task manager, indeed the assembler does not finished, it is still running, stopping it makes the compilation stop with an error. Why it hangs, I have no idea, when executed separately it works. I will try making a proxy assembler, that redirects output to the real one, and when detects this file just skips it, let's see what happens