Recent

Author Topic: It feels like a big leaky boat. Question 1  (Read 4928 times)

gary

  • New Member
  • *
  • Posts: 28
It feels like a big leaky boat. Question 1
« on: December 21, 2024, 05:06:24 am »
My Environment :
windows 11
Lazarus 3.0 (rev f771d54e) FPC 3.2.2 x86_64-win64-win32/win64
LAMW 0.8.6.4
JDK-21
apache-ant-1.10.14
gradle-8.6
android-ndk-r27c-windows
Android SDK Platform-Tools 35.0.2
Android SDK Build-Tools 36-rc3
Android 14.0 ("UpsideDownCake")


Question  1
   a) Project - New Project - LAMW [GUI] Android Module
   b) Run - Compile (why the following error occurs)

   unit1.pas(31,0) Error: Assembler arm-linux-androideabi-as.exe not found, switching to external assembling


Compile Project, OS: android, CPU: arm, Target: C:\lazarus\projects\LAMWProjects\AppLAMWProject12\libs\armeabi-v7a\libcontrols.so

Compile Reason: State file "C:\lazarus\projects\LAMWProjects\AppLAMWProject12\obj\controls\controls.compiled" of Project is missing.


Executable:
C:\lazarus\fpc\bin\x86_64-win64\fpc.exe

CurrentDirectory:
C:\lazarus\projects\LAMWProjects\AppLAMWProject12\jni\

Parameters:
-B
-Tandroid
-Parm
-Mdelphi
-Scghim
-CX
-Os3
-Xs
-XX
-l
-vewnhibq
-FlC:\android-ndk-r27c-windows\android-ndk-r27c\toolchains\llvm\prebuilt\windows\sysroot\usr\lib\arm-linux-androideabi\22
-FlC:\android-ndk-r27c-windows\android-ndk-r27c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.9.x
-FuC:\lazarus\projects\LAMWProjects\AppLAMWProject12\obj\controls
-FuC:\lazarus\ccr\lamw\android_bridges\lib\arm-android
-FuC:\lazarus\lazarus\lcl\units\arm-android
-FuC:\lazarus\lazarus\components\freetype\lib\arm-android
-FuC:\lazarus\lazarus\components\lazutils\lib\arm-android
-FuC:\lazarus\lazarus\packager\units\arm-android
-FuC:\lazarus\projects\LAMWProjects\AppLAMWProject12\jni\
-FUC:\lazarus\projects\LAMWProjects\AppLAMWProject12\obj\controls\
-FEC:\lazarus\projects\LAMWProjects\AppLAMWProject12\libs\armeabi-v7a\
-oC:\lazarus\projects\LAMWProjects\AppLAMWProject12\libs\armeabi-v7a\libcontrols.so
-Xd
-CfVFPV3
-CpARMV7A
-XParm-linux-androideabi-
-FDC:\android-ndk-r27c-windows\android-ndk-r27c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin
controls.lpr

Command Line:
C:\lazarus\fpc\bin\x86_64-win64\fpc.exe -B -Tandroid -Parm -Mdelphi -Scghim -CX -Os3 -Xs -XX -l -vewnhibq -FlC:\android-ndk-r27c-windows\android-ndk-r27c\toolchains\llvm\prebuilt\windows\sysroot\usr\lib\arm-linux-androideabi\22 -FlC:\android-ndk-r27c-windows\android-ndk-r27c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.9.x -FuC:\lazarus\projects\LAMWProjects\AppLAMWProject12\obj\controls -FuC:\lazarus\ccr\lamw\android_bridges\lib\arm-android -FuC:\lazarus\lazarus\lcl\units\arm-android -FuC:\lazarus\lazarus\components\freetype\lib\arm-android -FuC:\lazarus\lazarus\components\lazutils\lib\arm-android -FuC:\lazarus\lazarus\packager\units\arm-android -FuC:\lazarus\projects\LAMWProjects\AppLAMWProject12\jni\ -FUC:\lazarus\projects\LAMWProjects\AppLAMWProject12\obj\controls\ -FEC:\lazarus\projects\LAMWProjects\AppLAMWProject12\libs\armeabi-v7a\ -oC:\lazarus\projects\LAMWProjects\AppLAMWProject12\libs\armeabi-v7a\libcontrols.so -Xd -CfVFPV3 -CpARMV7A -XParm-linux-androideabi- -FDC:\android-ndk-r27c-windows\android-ndk-r27c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin controls.lpr

Parsers: make, FPC

ProcessID:
89548

ExitCode:
1
ExitStatus:
1

Error: Exit code 1


It's a continuous and connected problem
1、Compilation error
https://forum.lazarus.freepascal.org/index.php/topic,69647.0.html

2、Invalid library address
https://forum.lazarus.freepascal.org/index.php/topic,69648.0.html

3、“[LAMW]Build Android Apk and Run” failure
https://forum.lazarus.freepascal.org/index.php/topic,69649.0.html

4、Build Release Signed Apk Failed
https://forum.lazarus.freepascal.org/index.php/topic,69650.0.html

5、NDK Prebuild prompt not found
https://forum.lazarus.freepascal.org/index.php/topic,69651.0.html

6、arm-linux-androideabi-as.exe not found
https://forum.lazarus.freepascal.org/index.php/topic,69652.0.html

7. Change Chipset failed
https://forum.lazarus.freepascal.org/index.php/topic,69653.0.html

I feel lamw is like an aircraft carrier, powerful, but a bit leaky for a newbie, and there are a bit many leaks.
Please give me guidance from the gods as well, thank you very much!
« Last Edit: December 21, 2024, 06:15:21 am by gary »

440bx

  • Hero Member
  • *****
  • Posts: 5070
Re: It feels like a big leaky boat. Question 1
« Reply #1 on: December 21, 2024, 05:51:24 am »
Good netiquette requires asking 1 question at a time.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

gary

  • New Member
  • *
  • Posts: 28
Re: It feels like a big leaky boat. Question 1
« Reply #2 on: December 21, 2024, 06:08:51 am »
Good netiquette requires asking 1 question at a time.

I'm very sorry, I'm new to the forum and I was trying to make the questions continuous and relevant.

backprop

  • Full Member
  • ***
  • Posts: 125
Re: It feels like a big leaky boat. Question 1
« Reply #3 on: December 21, 2024, 06:37:36 am »
I feel lamw is like an aircraft carrier, powerful, but a bit leaky for a newbie, and there are a bit many leaks.
Please give me guidance from the gods as well, thank you very much!

The best advice is not to use Lazarus for android applications at all, but only genuine software. Similar as for MCUs. I have tried both long time ago, but I give up quickly.

Reasons are very simple:
1. There is no warranty this will work at all as well even this project survive in the future
2. You will get no help or quite minor.

Thus, the best advice is to focus on large community for genuine Android app tools and RADs.
« Last Edit: December 21, 2024, 06:58:44 am by backprop »

Seenkao

  • Hero Member
  • *****
  • Posts: 674
    • New ZenGL.
Re: It feels like a big leaky boat. Question 1
« Reply #4 on: December 21, 2024, 02:34:45 pm »
-Os3
Что это? Уровень оптимизации? Если так, то не советую его выставлять выше уровня O2.

По всему остальному я больше вижу, что у вас указанные пути не совпадают (что-то не установлено?). Проверьте правильность выставленных путей!
Попробуйте использовать другой Gradle, бывают проблемы из-за версии Gradle.

Если вы можете собрать свой проект в Lazarus (не APK/ABB), то можете попробовать собрать конечный APK/ABB в Android Studio (хотя там тоже настройки нужны будут и он так же использует Gradle для сборки).

-----------------------------------
Google translate:
What is it? Optimization level? If so, I don't recommend setting it higher than O2.

In all other respects, I see more that your specified paths do not match (is something not installed?). Check that the paths are set correctly!
Try using a different Gradle, sometimes problems are caused by the Gradle version.

If you can build your project in Lazarus (not APK/ABB), you can try to build the final APK/ABB in Android Studio (although you will also need settings there and it also uses Gradle for building).
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

gary

  • New Member
  • *
  • Posts: 28
Re: It feels like a big leaky boat. Question 1
« Reply #5 on: December 21, 2024, 03:07:45 pm »
I feel lamw is like an aircraft carrier, powerful, but a bit leaky for a newbie, and there are a bit many leaks.
Please give me guidance from the gods as well, thank you very much!

The best advice is not to use Lazarus for android applications at all, but only genuine software. Similar as for MCUs. I have tried both long time ago, but I give up quickly.

Reasons are very simple:
1. There is no warranty this will work at all as well even this project survive in the future
2. You will get no help or quite minor.

Thus, the best advice is to focus on large community for genuine Android app tools and RADs.

I'm in an awkward situation, I only know pascal, I write code as a hobby, not as a means of earning a living, and I really don't have the energy to learn another language, so I'd like to write code in a language I'm familiar with. I really don't have the energy to learn another language, I just want to write code in a language I know. In my opinion, delphi doesn't even have a high market share, let alone lazarus, but it's always good to have a dream, and I just want to work together to solve problems, and then share the solutions so that more people can focus on the code and the algorithms instead of wasting their time with IDE bugs all the time. This is really a challenge for the lazarus team, but also for program developers.

By the way: I think documentation is more important than code, if you have a good algorithm but no documentation, it's a disaster for those who come after you. Especially in terms of understanding the program quickly

440bx

  • Hero Member
  • *****
  • Posts: 5070
Re: It feels like a big leaky boat. Question 1
« Reply #6 on: December 21, 2024, 03:12:23 pm »
By the way: I think documentation is more important than code, if you have a good algorithm but no documentation, it's a disaster for those who come after you. Especially in terms of understanding the program quickly
A very good way of thinking about programming.  if the code and algorithms aren't documented, they will be of dubious value in the long run.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

ccrause

  • Hero Member
  • *****
  • Posts: 1007
Re: It feels like a big leaky boat. Question 1
« Reply #7 on: December 21, 2024, 03:23:31 pm »
Question  1
   a) Project - New Project - LAMW [GUI] Android Module
   b) Run - Compile (why the following error occurs)

   unit1.pas(31,0) Error: Assembler arm-linux-androideabi-as.exe not found, switching to external assembling

arm-linux-androideabi-as.exe - if you are running Windows then I assume the compiler should call the x86_64 version of the cross assembler.  The arm version is called because of the following setting:
Code: [Select]
-XParm-linux-androideabi-Assuming you are running on a typical x86 architecture change this to:
Code: [Select]
-XPx86_64-linux-android-At least that is the convention in laz4android 3.4.

Also ensure that the compiler knows where to find the relevant cross tools (e.g. use -FD).


Edit: Please ignore this post, I misinterpreted the naming convention of binutils.
« Last Edit: December 22, 2024, 06:59:36 am by ccrause »

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1343
Re: It feels like a big leaky boat. Question 1
« Reply #8 on: December 21, 2024, 04:00:50 pm »
Good netiquette requires asking 1 question at a time.
You have encouraged him to make a bunch of threads which look like they have same name. It’s very confusing and looks like spam.  :o

Gary please use code tags for your output it’s easier for people to read your post
« Last Edit: December 21, 2024, 04:02:42 pm by Joanna from IRC »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

gary

  • New Member
  • *
  • Posts: 28
Re: It feels like a big leaky boat. Question 1
« Reply #9 on: December 21, 2024, 04:31:13 pm »
-Os3
Что это? Уровень оптимизации? Если так, то не советую его выставлять выше уровня O2.

По всему остальному я больше вижу, что у вас указанные пути не совпадают (что-то не установлено?). Проверьте правильность выставленных путей!
Попробуйте использовать другой Gradle, бывают проблемы из-за версии Gradle.

Если вы можете собрать свой проект в Lazarus (не APK/ABB), то можете попробовать собрать конечный APK/ABB в Android Studio (хотя там тоже настройки нужны будут и он так же использует Gradle для сборки).

-----------------------------------
Google translate:
What is it? Optimization level? If so, I don't recommend setting it higher than O2.

In all other respects, I see more that your specified paths do not match (is something not installed?). Check that the paths are set correctly!
Try using a different Gradle, sometimes problems are caused by the Gradle version.

If you can build your project in Lazarus (not APK/ABB), you can try to build the final APK/ABB in Android Studio (although you will also need settings there and it also uses Gradle for building).

Yes, you're spot on, the specified paths don't match, as I've mentioned later in this series of questions and given the solution. But why is this problem occurring? Tell us the principle so that we can better understand what is the reason for his occurrence? And later on we know how to circumvent the same problem? I still don't know what is the reason for his appearance?

TRon

  • Hero Member
  • *****
  • Posts: 4140
Re: It feels like a big leaky boat. Question 1
« Reply #10 on: December 21, 2024, 04:40:56 pm »
But why is this problem occurring? Tell us the principle so that we can better understand what is the reason for his occurrence? And later on we know how to circumvent the same problem? I still don't know what is the reason for his appearance?
You would have to ask the designers of LAMW that question. It is common sense, see also wiki on how to set up SDK and paths for android.

I have no idea what LAMW does behind the scenes (or what you instructed LAMW to do) and since the project is targeted for windows there are many people that don't use windows and thus are not able to tell  :)
Today is tomorrow's yesterday.

gary

  • New Member
  • *
  • Posts: 28
Re: It feels like a big leaky boat. Question 1
« Reply #11 on: December 21, 2024, 04:53:45 pm »
Question  1
   a) Project - New Project - LAMW [GUI] Android Module
   b) Run - Compile (why the following error occurs)

   unit1.pas(31,0) Error: Assembler arm-linux-androideabi-as.exe not found, switching to external assembling

arm-linux-androideabi-as.exe - if you are running Windows then I assume the compiler should call the x86_64 version of the cross assembler.  The arm version is called because of the following setting:
Code: [Select]
-XParm-linux-androideabi-Assuming you are running on a typical x86 architecture change this to:
Code: [Select]
-XPx86_64-linux-android-At least that is the convention in laz4android 3.4.

Also ensure that the compiler knows where to find the relevant cross tools (e.g. use -FD).

I don't use the IDE (compile), I use the gradle-local-build.bat inside the project directly and it compiles, here is the content of the gradle-local-build.bat file

set Path=%PATH%;C:\Users\aaa\AppData\Local\Android\Sdk\platform-tools
set GRADLE_HOME=C:\gradle-8.6\
set PATH=%PATH%;%GRADLE_HOME%\bin
gradle clean build --info

But why does this happen, what causes it, how do I fix it, I want to know the principle

Seenkao

  • Hero Member
  • *****
  • Posts: 674
    • New ZenGL.
Re: It feels like a big leaky boat. Question 1
« Reply #12 on: December 21, 2024, 05:01:19 pm »
I don't use the IDE (compile), I use the gradle-local-build.bat inside the project directly and it compiles
IDE нужна для сборки Паскаль-кода, если вы не скомпилируете этот код, то вернее всего и проект не соберёте. По той причине что FPC/Lazarus собирают необходимую *.so библиотеку которая необходима для работы конечного приложения.

------------------------
Google translate:
IDE is needed to build Pascal code, if you do not compile this code, then most likely you will not build the project. For the reason that FPC/Lazarus build the necessary *.so library that is necessary for the operation of the final application.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

440bx

  • Hero Member
  • *****
  • Posts: 5070
Re: It feels like a big leaky boat. Question 1
« Reply #13 on: December 21, 2024, 05:02:06 pm »
Good netiquette requires asking 1 question at a time.
You have encouraged him to make a bunch of threads which look like they have same name. It’s very confusing and looks like spam.  :o
I posted that because he had _already_ posted 7 questions in a row.  You would know that if you had read his apology after I pointed out it was not good etiquette.

While on the subject of etiquette, it is also good etiquette to read the posts, it prevents posting incorrect comments such as yours.  Contrary to what you stated, I _discouraged_ him from asking multiple related questions in a row in separate threads.

(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

ccrause

  • Hero Member
  • *****
  • Posts: 1007
Re: It feels like a big leaky boat. Question 1
« Reply #14 on: December 22, 2024, 07:01:33 am »
Question  1
   a) Project - New Project - LAMW [GUI] Android Module
   b) Run - Compile (why the following error occurs)

   unit1.pas(31,0) Error: Assembler arm-linux-androideabi-as.exe not found, switching to external assembling

arm-linux-androideabi-as.exe - if you are running Windows then I assume the compiler should call the x86_64 version of the cross assembler.  The arm version is called because of the following setting:
Code: [Select]
-XParm-linux-androideabi-Assuming you are running on a typical x86 architecture change this to:
Code: [Select]
-XPx86_64-linux-android-At least that is the convention in laz4android 3.4.

Also ensure that the compiler knows where to find the relevant cross tools (e.g. use -FD).

I don't use the IDE (compile), I use the gradle-local-build.bat inside the project directly and it compiles, here is the content of the gradle-local-build.bat file

set Path=%PATH%;C:\Users\aaa\AppData\Local\Android\Sdk\platform-tools
set GRADLE_HOME=C:\gradle-8.6\
set PATH=%PATH%;%GRADLE_HOME%\bin
gradle clean build --info

But why does this happen, what causes it, how do I fix it, I want to know the principle

Please ignore my response above, I misinterpreted the naming convention of binutils - the triplet describes the target.... :-[
« Last Edit: December 22, 2024, 07:03:23 am by ccrause »

 

TinyPortal © 2005-2018