Recent

Author Topic: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8  (Read 1851 times)

process_1

  • Guest
LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« on: June 28, 2020, 08:29:34 am »
I have followed steps to install latest LAMW form OPM on latest Ubuntu 64bit.

After successful installation and trying to create new Android project, this error was shown:
Code: [Select]
Fail! Folder /platforms is empty!
Adding the Workspace for android using default settings creating new project (ARMv7a+Soft), this AV popup:

Code: [Select]
Invalid floating point operation.

Press OK to ignore and risk data corruption.
Press Abort to kill the program.

I'm not certain what I have missed.

process_1

  • Guest
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #1 on: June 28, 2020, 10:35:57 am »
BTW, I have followed this guide precisely:

https://forum.lazarus.freepascal.org/index.php/topic,45361.0.html

Android SDK Build-Tools 28.0.3
SDK Platform API 28 Rev 6

Etc. What I would need to install precisely from Android SDK Manager?

DanielTimelord

  • New Member
  • *
  • Posts: 38
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #2 on: June 30, 2020, 05:32:30 pm »
Hello,
ARMv7+soft isn't supported, use armv7+fvp3!
by default arm+vfpv3 is marked!
To fix "platorm folder is empty!" try command: ./lamw_manager --reset-aapis

If don't work  use  command: ./lamw_manager --reset to full reset!
« Last Edit: June 30, 2020, 05:57:13 pm by DanielTimelord »

process_1

  • Guest
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #3 on: July 29, 2020, 12:00:52 pm »
After installing deb packages for FPC 3.2.0 and Lazarus 2.0.10 using lamw_manager and then starting LAMW4Linux, cutted numbers for version info was show. (attached)

At least now empty form for Android phone is shown and empy project is compiled, but not running/debugging here. This is not possible on linux?

DanielTimelord

  • New Member
  • *
  • Posts: 38
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #4 on: July 29, 2020, 07:45:51 pm »
Seriously, it’s possible you’re doing something wrong!
First, the FPC 3.2.0 .deb package is not required!
Second, debug is possible, look for logcat in menu --> tools --> Lazarus Android Module Wizard
See this sample to create and run android app
https://drive.google.com/file/d/1CeDDpuDfRwYrKpN7VHbossH6GfZUfqjm/view
« Last Edit: July 29, 2020, 08:25:35 pm by DanielTimelord »

process_1

  • Guest
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #5 on: July 29, 2020, 09:05:55 pm »
Well, I have installed all with lamw_manager, if something is missing is from that point.

I do not have any smart phone to test or debug app, I rely on emulation, if possible and exists.

Ctrl-F1 compile project fine, but nothing else happens, only some form about Android emulator popup, I have no idea how to configure as always say that CPU/ABI system is not available whatever device from list I choose, thus OK button is disabled.

When I hit run on an empty GUI project, I get this message (attached)

I'm planing to run app on Samsung a20e, which I do not have personally, nor any smart phone, as I already mentioned.
« Last Edit: July 29, 2020, 09:27:17 pm by process_1 »

DanielTimelord

  • New Member
  • *
  • Posts: 38
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #6 on: July 29, 2020, 09:57:27 pm »
Obviously nothing happens when you press Ctrl + f1, because you don't have an emulator!
The 'run' option is for desktop application, it is not for android!
Open a terminal:
~/LAMW/sdk/tools/android
on android 7 check:
sdk platform
ARM EABI v7a system image

Deselect Android SDK 9 (API 28) and 10 (api 29) installations
Click the button: install the 2 packages
Then in menu -> tools -> Manage AVD
Click on Create ...
Select the options as in the attachment and select ok
then press ok for the next screen and finally click on Start

Seenkao

  • Jr. Member
  • **
  • Posts: 55
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #7 on: July 30, 2020, 12:29:03 am »
debug - disable !!!

not use emulator!!!

Эмулятор не работает с jni , используйте телефон для проверки.
google translate:
Emulator does not work with jni, please use phone to check.

process_1

  • Guest
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #8 on: July 30, 2020, 09:03:06 am »
Daniel, thank you very much!

This helped to set all properly and it actaully works.

process_1

  • Guest
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #9 on: August 01, 2020, 01:48:59 pm »
Actually, something weird happens again....

Once again I have to confirm scripts works fine and to install LAMW4Linux again. I have deleted all, FPC, Lazarus and LAMW directories and files and directories by given scripts (attached), to mimic clear envrounment.

Installed fpc 3.2.0 and laz 2.0.10 from deb files, then start .lamw_manager

Code: [Select]
Checked out revision 63672.
Cloning into 'lazandroidmodulewizard'...
remote: Enumerating objects: 696, done.
remote: Counting objects: 100% (696/696), done.
remote: Compressing objects: 100% (522/522), done.
remote: Total 43800 (delta 386), reused 411 (delta 135), pack-reused 43104
Receiving objects: 100% (43800/43800), 262.29 MiB | 1.03 MiB/s, done.
Resolving deltas: 100% (31627/31627), done.
make: /ppcx64: Command not found
/bin/rm -f build-stamp.*
/bin/rm -f base.build-stamp.*
Makefile:2809: *** The only supported starting compiler version is 3.0.4. You are trying to build with 3.2.0..  Stop.
Fatal Error: Falls build FPC -x86_64-linux

Probably need not to install 3.2.0 infront! ;)

Now, I have done simlar from TAR files, and whole compiled FPC dir was cleaned up after .lamw_manager finished! LAMW4Linux still use Laz 2.0.8 sources and 3.0.4...

What shuold I do is probably to remove all and first .lamw_manager, start LAMW4linux and set all, then install new FPC 3.2.0 and Laz 2.0.10 from deb...

Now, if I need to upgrade with .lamw_manager, I would need to remove fpc 3.2.0 and install 3.0.4

Great headache with so many versions separately in use. That is why I simply despise to create and use many verions of FPC and Laz on the system.
« Last Edit: August 01, 2020, 04:45:34 pm by process_1 »

DanielTimelord

  • New Member
  • *
  • Posts: 38
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #10 on: August 02, 2020, 03:01:03 am »
Actually, something weird happens again....

Once again I have to confirm scripts works fine and to install LAMW4Linux again. I have deleted all, FPC, Lazarus and LAMW directories and files and directories by given scripts (attached), to mimic clear envrounment.

Installed fpc 3.2.0 and laz 2.0.10 from deb files, then start .lamw_manager

Code: [Select]
Checked out revision 63672.
Cloning into 'lazandroidmodulewizard'...
remote: Enumerating objects: 696, done.
remote: Counting objects: 100% (696/696), done.
remote: Compressing objects: 100% (522/522), done.
remote: Total 43800 (delta 386), reused 411 (delta 135), pack-reused 43104
Receiving objects: 100% (43800/43800), 262.29 MiB | 1.03 MiB/s, done.
Resolving deltas: 100% (31627/31627), done.
make: /ppcx64: Command not found
/bin/rm -f build-stamp.*
/bin/rm -f base.build-stamp.*
Makefile:2809: *** The only supported starting compiler version is 3.0.4. You are trying to build with 3.2.0..  Stop.
Fatal Error: Falls build FPC -x86_64-linux

Probably need not to install 3.2.0 infront! ;)

Now, I have done simlar from TAR files, and whole compiled FPC dir was cleaned up after .lamw_manager finished! LAMW4Linux still use Laz 2.0.8 sources and 3.0.4...

What shuold I do is probably to remove all and first .lamw_manager, start LAMW4linux and set all, then install new FPC 3.2.0 and Laz 2.0.10 from deb...

Now, if I need to upgrade with .lamw_manager, I would need to remove fpc 3.2.0 and install 3.0.4

Great headache with so many versions separately in use. That is why I simply despise to create and use many verions of FPC and Laz on the system.

First, the LAMW Manager was updated on 7/19/2020, precisely to deal with the change in fpc-laz. See the announcement of the new version on the LAMW Manager thread at https://forum.lazarus.freepascal.org/index.php/topic,45361.msg370274.html#msg370274

Download the new version and run ./lamw_manager

Second:, (from what I understand) you used a third-party script to clean up the LAMW development environment. Any errors caused by this action cannot be predicted.

Third: you installed fpc 3.2.0 and lazaruz-2.0.10 (from .deb) this is not the problem, LAMW Manager can coexist with other lazarus


Notes:
Remember the official LAMW Manager (to Linux) documentation is only on https://github.com/danieloliveirasouza/lamw4linux-installer

README: https://github.com/DanielOliveiraSouza/LAMW4Linux-installer/blob/master/README.md
Manual:https://github.com/DanielOliveiraSouza/LAMW4Linux-installer/blob/master/lamw_manager/docs/man.md



See the attachment!
« Last Edit: August 02, 2020, 07:15:56 am by DanielTimelord »

process_1

  • Guest
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #11 on: August 02, 2020, 12:44:57 pm »
Daniel,

Wasn't aware that new version is released, thank you. I will try it...

And I do not cleaned LAMW with third-party script to clean up, just executed ./lamw_manager --reset on already present builds. After that compilation form anoter Lazarus instance (not from that using LAMW) use plain default OS and other cross-compilation for other simply failed to compile, as all compliled files for fpc 3.2.0 was cleaned up!

I hope new version fixed some of the issues...
« Last Edit: August 02, 2020, 01:24:07 pm by process_1 »

process_1

  • Guest
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #12 on: August 08, 2020, 05:01:30 pm »
Daniel,

I have updated LAMW from github  (log shows last change is from  Sun Jul 19 03:43:26 2020 -0300). And then ./lamw_manager --reset and followed your guide to use emulator. But now, emulation of the compiled project doesnt start (Ctrl F1) using such example with one About button!

It start Android emulation of the device, but do not start compiled project. IDE shows following:

Code: [Select]
Messages, Hints: 2
Verbose: Selected chip architecture: armeabi-v7a
Verbose: Taking libraries from folder: ~/Dev/LAMWProjects/Button_test/libs/armeabi-v7a
Verbose: Found library: libcontrols.so
Note: Duplicate unit "controls" in "controls", orphaned ppu " ~/Dev/LAMWProjects/Button_test/obj/controls/controls.o"
Note: Duplicate unit "controls" in "LCLBase 2.0.10", ppu=" ~/LAMW/lamw4linux/lamw4linux/lcl/units/arm-android/controls.ppu", source="~/LAMW/lamw4linux/lamw4linux/lcl/controls.pp"
Compile Project, OS: android, CPU: arm, Target:  ~/Dev/LAMWProjects/Button_test/libs/armeabi-v7a/libcontrols.so: Success
Building APK (Ant)... : Success
Installing APK (Ant)... : Success
Starting APK... : Exit code 1, Errors: 1
error: device offline
Panic: tool stopped with exit code 1. Use context menu to get more information.
Exception, Errors: 1
Fatal: [Exception] Failed: Cannot run APK!

DanielTimelord

  • New Member
  • *
  • Posts: 38
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #13 on: August 08, 2020, 06:31:26 pm »
Daniel,

I have updated LAMW from github  (log shows last change is from  Sun Jul 19 03:43:26 2020 -0300). And then ./lamw_manager --reset and followed your guide to use emulator. But now, emulation of the compiled project doesnt start (Ctrl F1) using such example with one About button!

It start Android emulation of the device, but do not start compiled project. IDE shows following:

Code: [Select]
Messages, Hints: 2
Verbose: Selected chip architecture: armeabi-v7a
Verbose: Taking libraries from folder: ~/Dev/LAMWProjects/Button_test/libs/armeabi-v7a
Verbose: Found library: libcontrols.so
Note: Duplicate unit "controls" in "controls", orphaned ppu " ~/Dev/LAMWProjects/Button_test/obj/controls/controls.o"
Note: Duplicate unit "controls" in "LCLBase 2.0.10", ppu=" ~/LAMW/lamw4linux/lamw4linux/lcl/units/arm-android/controls.ppu", source="~/LAMW/lamw4linux/lamw4linux/lcl/controls.pp"
Compile Project, OS: android, CPU: arm, Target:  ~/Dev/LAMWProjects/Button_test/libs/armeabi-v7a/libcontrols.so: Success
Building APK (Ant)... : Success
Installing APK (Ant)... : Success
Starting APK... : Exit code 1, Errors: 1
error: device offline
Panic: tool stopped with exit code 1. Use context menu to get more information.
Exception, Errors: 1
Fatal: [Exception] Failed: Cannot run APK!

Seriously, OMG!

Sometimes for reasons I don't know, the ant doesn't run the APP!
See if the emulator has loaded completely!
Another thing, you didn't pay attention to the example, it was an app built with Gradle!
Try to build with the gradle!
Nowadays any modern app requires gradle!
In addition, another update of the LAMW Manager came out!
« Last Edit: August 08, 2020, 06:50:48 pm by DanielTimelord »

process_1

  • Guest
Re: LAMW 0.8.5 on FPC 3.2.0 and Lazarus 2.0.8
« Reply #14 on: August 08, 2020, 10:05:34 pm »
Why should I need to know all that? I just want to test ability of the Lazarus to make apps for mobile phones, that is not my primary job, but desktop apps.

Indeed ANT is set by default when I have created new app. Why it is not set Gradle by defailt if that is necessary? And why attempt with previous LAMW version worked, as I didn't done anything different then you have suggested before.

Anyway, even setting explicitly Gradle, compiling and running failed. In briefly flashed console widows I have manage to notice some red lines, indicating possibilities of some errors. After I have manage to make a screenshot, here it is, for a record.

I will give up anyway, as all this is just PITA. If I ever have a professional needs to make app for android, I will certainly use Android Studio and certainly research in details all before start.

Thank you very much for your previous help and your time.
« Last Edit: August 09, 2020, 12:16:23 am by process_1 »

 

TinyPortal © 2005-2018