LAMW + FpcUpDeluxe trunk : cannot build APK lazarus / 43-Android ---------------------------------------------------------------------- CC · 2018-09-06 09:05 Hi, I have just installed everything from trunk to make sure it is not a local issue. Started a new LAMW GUI project. (See the attachment) The form only had a single jButton on it. Compile finishes, but building the apk fails without any usable output. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i MessagesVerbose: Selected chip architecture: armeabi-v7aVerbose: Taking libraries from folder: C:\A\Test\LamwGUIProject2\libs\armeabi-v7aHint: (11030) Start of reading config file C:\fpcupdeluxe\fpc\bin\i386-win32\fpc.cfgHint: (11031) End of reading config file C:\fpcupdeluxe\fpc\bin\i386-win32\fpc.cfgFree Pascal Compiler version 3.3.1-r39711 [2018/09/06] for armCopyright (c) 1993-2018 by Florian Klaempfl and others(1002) Target OS: Android for ARMEL(3104) Compiling controls.lpr(3104) Compiling unit1.pas(9009) Assembling unit1C:\A\Test\LamwGUIProject2\jni\controls.lpr(487,39) Hint: (5024) Parameter "reserved" not usedC:\A\Test\LamwGUIProject2\jni\controls.lpr(503,42) Hint: (5024) Parameter "reserved" not usedC:\A\Test\LamwGUIProject2\jni\controls.lpr(7,31) Hint: (5023) Unit "And_jni_Bridge" not used in controls(9009) Assembling controls(9022) Compiling resource C:\A\Test\LamwGUIProject2\obj\controls\controls.or(9015) Linking C:\A\Test\LamwGUIProject2\libs\armeabi-v7a\libcontrols.so (1008) 622 lines compiled, 1.5 sec(1022) 5 hint(s) issuedException, Errors: 1Fatal: [Exception] Failed: Cannot build APK!  Neither Ant nor Gradle works. It has been like this for a while. ---------------------------------------------------------------------- CC · 2018-09-10 16:29 The problem is not FPC and it is not Ant. It seems it comes from the  LAMW-  Lazarus  interaction. Something could have changed in Lazarus which was not followed properly by LAMW. Maybe  browsing through the Lazarus repo commits  comments gives an idea how to fix it. ---------------------------------------------------------------------- Handoko · 2018-09-10 16:42 LAMW + FPC is working perfectly on Linux. I managed to install LAMW 0.8 on Ubuntu 18.04 and tested yesterday. The installation is tricky, it took me several days to understand how to do it correctly. First, I tested the installation guide by @WayneSherman but things went wrong. So I decided to do it my way. I will later write a installation tutorial for it. Quote from: CC on September 10, 2018, 06:29:52 pmThe problem is not FPC and it is not Ant. It seems it comes from the  LAMW-  Lazarus  interaction. Something could have changed in Lazarus which was not folowed properly by LAMW. Are sure you already followed the installation guide correctly? On my test, certain combinations especially the latest SDK won't work with LAMW. ---------------------------------------------------------------------- jmpessoa · 2018-09-10 17:45 Hi, @cc! Can you, please, do  only  a "Run --> Build"  for a simple "lib" test compile? ---------------------------------------------------------------------- CC · 2018-09-10 19:43 Here is how  I came to the conclusion: First I have checked out a revision of FPC & Lazarus form last year I remembered to be working fine. And it is still working fine with the current trunk of LAMW the latest ANT and my original versions of JDK & SDK & NDK. (See the attachment of my original post.) Then I  started to play with  the components, changing  the revision of only one component at a time. It turned out that the old version of  Lazarus has no problem building the APK with the current trunk of FPC and LAMW. ---------------------------------------------------------------------- lucamar · 2018-09-10 21:03 Quote from: CC on September 10, 2018, 09:43:45 pmIt turned out that the old version of  Lazarus has no problem building the APK with the current trunk of FPC and LAMW. Which "old version"? Please, be specific; v.g. instead of  "It turned out that the old version of  Lazarus ..." say "It turned out that Lazarus 1.8.4 ..." (or whatever version it is) so that everybody can understand in an instant what you're referring to. Thanks ---------------------------------------------------------------------- Handoko · 2018-09-11 02:09 Quote from: CC on September 10, 2018, 09:43:45 pm(See the attachment of my original post.) Have you tried ARMv7a+Soft? On my test I can't make it works on ARMv7a+VFPv3. ---------------------------------------------------------------------- CC · 2018-09-11 05:50 AFAIK Soft is not an option with FpcUpDeluxe and  mORMot. It is slower too. ---------------------------------------------------------------------- CC · 2018-09-11 06:02 Quote from: lucamar on September 10, 2018, 11:03:41 pmQuote from: CC on September 10, 2018, 09:43:45 pmIt turned out that the old version of  Lazarus has no problem building the APK with the current trunk of FPC and LAMW. Which "old version"? Please, be specific; v.g. instead of  "It turned out that the old version of  Lazarus ..." say "It turned out that Lazarus 1.8.4 ..." (or whatever version it is) so that everybody can understand in an instant what you're referring to. Thanks Here is where I started: Lazarus: SVN 56254 FPC: SVN 37480 Lazarus r56254 compiled with FPC r37480 works with the latest of everything. It  also works with every FPC revision  after  r37480  I have tested with. So it is definitely not an FPC issue.  The problem is that for a while  Lazarus compiled from trunk (which needs to be compiled with FPC from the same time period for compatibility) fails building the APK. ---------------------------------------------------------------------- CC · 2018-09-11 06:35 I can see one - kind of unlikely - way for FPC being the origin of the problem: if it compiles Lazarus somehow differently than previously. ---------------------------------------------------------------------- Handoko · 2018-09-11 10:48 Quote from: CC on September 11, 2018, 07:50:06 amAFAIK Soft is not an option with FpcUpDeluxe and  mORMot. It is slower too. Well, my case is different. I never able to compile using VFPv3 option, I've just made a test again. It's still failed but if I replace -CfVFPv3 in the compiler custom option to -CfSoft, it works. ---------------------------------------------------------------------- CC · 2018-09-13 07:05 Quote from: jmpessoa on September 10, 2018, 07:45:30 pm Hi, @cc! Can you, please, do  only  a "Run --> Build"  for a simple "lib" test compile? There is no problem with compilation with any revision of Lazarus. Bulding the apk fails with later revisions. The latest pair I found to be working together seamlessly is FPC 39239 + Lazarus  r58364 The problem occurred sometime after r58364 Maybe debugging the Lazarus IDE built with the current trunk can reveal  the cause. Right now I do not have time to investigate this any more. ---------------------------------------------------------------------- DonAlfredo · 2018-09-13 07:14 I am investigating this also. And found out that, on my system with latest trunk, the apk gets build, giving the same error however ! So, question: please check if the apk is being build. The runtool-command (that is used to call ant) exits with an error, but it does run with success (that is, on my system). ---------------------------------------------------------------------- CC · 2018-09-14 22:21 DonAlfredo, you are right,  the process goes on  and the apk gets built. But after the error there is no output in the IDE about it. Just a guess: maybe an exception is raised somewhere in the code of the  IDE  and it is mishandled as if it came from the build process? ---------------------------------------------------------------------- CC · 2018-09-15 13:54 My hunch was basically right.  I have found the cause of the problem and it is easy to fix it. https://bugs.freepascal.org/view.php?id=34282