Recent

Author Topic: LAMW + FpcUpDeluxe trunk : cannot build APK  (Read 5170 times)

CC

  • Full Member
  • ***
  • Posts: 149
LAMW + FpcUpDeluxe trunk : cannot build APK
« on: September 06, 2018, 11:05:06 am »
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][+][-]
  1. Messages
  2. Verbose: Selected chip architecture: armeabi-v7a
  3. Verbose: Taking libraries from folder: C:\A\Test\LamwGUIProject2\libs\armeabi-v7a
  4. Hint: (11030) Start of reading config file C:\fpcupdeluxe\fpc\bin\i386-win32\fpc.cfg
  5. Hint: (11031) End of reading config file C:\fpcupdeluxe\fpc\bin\i386-win32\fpc.cfg
  6. Free Pascal Compiler version 3.3.1-r39711 [2018/09/06] for arm
  7. Copyright (c) 1993-2018 by Florian Klaempfl and others
  8. (1002) Target OS: Android for ARMEL
  9. (3104) Compiling controls.lpr
  10. (3104) Compiling unit1.pas
  11. (9009) Assembling unit1
  12. C:\A\Test\LamwGUIProject2\jni\controls.lpr(487,39) Hint: (5024) Parameter "reserved" not used
  13. C:\A\Test\LamwGUIProject2\jni\controls.lpr(503,42) Hint: (5024) Parameter "reserved" not used
  14. C:\A\Test\LamwGUIProject2\jni\controls.lpr(7,31) Hint: (5023) Unit "And_jni_Bridge" not used in controls
  15. (9009) Assembling controls
  16. (9022) Compiling resource C:\A\Test\LamwGUIProject2\obj\controls\controls.or
  17. (9015) Linking C:\A\Test\LamwGUIProject2\libs\armeabi-v7a\libcontrols.so
  18.  
  19. (1008) 622 lines compiled, 1.5 sec
  20. (1022) 5 hint(s) issued
  21. Exception, Errors: 1
  22. Fatal: [Exception] Failed: Cannot build APK!
  23.  

Neither Ant nor Gradle works.

It has been like this for a while.


CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #1 on: September 10, 2018, 06:29:52 pm »
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.
« Last Edit: September 10, 2018, 09:44:22 pm by CC »

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #2 on: September 10, 2018, 06:42:32 pm »
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.

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 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

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #3 on: September 10, 2018, 07:45:30 pm »

Hi, @cc!

Can you, please, do  only  a "Run --> Build"  for a simple "lib" test compile?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #4 on: September 10, 2018, 09:43:45 pm »
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

  • Hero Member
  • *****
  • Posts: 4219
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #5 on: September 10, 2018, 11:03:41 pm »
It 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 :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #6 on: September 11, 2018, 04:09:19 am »
(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

  • Full Member
  • ***
  • Posts: 149
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #7 on: September 11, 2018, 07:50:06 am »
AFAIK Soft is not an option with FpcUpDeluxe and  mORMot. It is slower too.


CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #8 on: September 11, 2018, 08:02:05 am »
It 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

  • Full Member
  • ***
  • Posts: 149
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #9 on: September 11, 2018, 08:35:36 am »
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

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #10 on: September 11, 2018, 12:48:02 pm »
AFAIK 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

  • Full Member
  • ***
  • Posts: 149
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #11 on: September 13, 2018, 09:05:47 am »

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.
« Last Edit: September 13, 2018, 09:10:54 am by CC »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #12 on: September 13, 2018, 09:14:55 am »
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

  • Full Member
  • ***
  • Posts: 149
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #13 on: September 15, 2018, 12:21:15 am »
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

  • Full Member
  • ***
  • Posts: 149
Re: LAMW + FpcUpDeluxe trunk : cannot build APK
« Reply #14 on: September 15, 2018, 03:54:09 pm »
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

 

TinyPortal © 2005-2018