Recent

Author Topic: Android arm compiler error  (Read 1081 times)

bongorongo

  • New Member
  • *
  • Posts: 14
Android arm compiler error
« on: July 28, 2024, 11:14:57 pm »
So pleased, and yet so frustrated.
I finally almost overcome setting up Lazarus for some Android development.
Trying to compile a brand new LAMW project, but it cant...

Could someone help? I believe it has somehing with NDK only having a llvm/ folder in the toolchain.
And Lazarus expects arm-linux-androideabi-4.9/

I keep getting this error:

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

Quote
Compile Project, OS: android, CPU: arm, Target: /home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/libs/armeabi-v7a/libcontrols.so

Compile Reason: Last compile was incomplete.
  State file=/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/obj/controls/controls.compiled


Executable:
/home/jk/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.sh

CurrentDirectory:
/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/jni/

Parameters:
-Tandroid
-Parm
-Mdelphi
-Scghim
-CX
-Os3
-Xs
-XX
-l
-vewnhibq
-Fl/home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/linux-x86_32/sysroot/usr/lib/arm-linux-androideabi/22
-Fl/home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/lib/gcc/arm-linux-androideabi/4.9.x
-Fu/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/obj/controls
-Fu/home/jk/fpcupdeluxe/ccr/lamw/android_bridges/lib/arm-android
-Fu/home/jk/fpcupdeluxe/lazarus/lcl/units/arm-android
-Fu/home/jk/fpcupdeluxe/lazarus/components/freetype/lib/arm-android
-Fu/home/jk/fpcupdeluxe/lazarus/components/lazutils/lib/arm-android
-Fu/home/jk/fpcupdeluxe/lazarus/packager/units/arm-android
-Fu/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/jni/
-FU/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/obj/controls/
-FE/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/libs/armeabi-v7a/
-o/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/libs/armeabi-v7a/libcontrols.so
-Xd
-CfVFPV3
-CpARMV7A
-XParm-linux-androideabi-
-FD/home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/bin
controls.lpr

Command Line:
/home/jk/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.sh -Tandroid -Parm -Mdelphi -Scghim -CX -Os3 -Xs -XX -l -vewnhibq -Fl/home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/linux-x86_32/sysroot/usr/lib/arm-linux-androideabi/22 -Fl/home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/lib/gcc/arm-linux-androideabi/4.9.x -Fu/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/obj/controls -Fu/home/jk/fpcupdeluxe/ccr/lamw/android_bridges/lib/arm-android -Fu/home/jk/fpcupdeluxe/lazarus/lcl/units/arm-android -Fu/home/jk/fpcupdeluxe/lazarus/components/freetype/lib/arm-android -Fu/home/jk/fpcupdeluxe/lazarus/components/lazutils/lib/arm-android -Fu/home/jk/fpcupdeluxe/lazarus/packager/units/arm-android -Fu/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/jni/ -FU/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/obj/controls/ -FE/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/libs/armeabi-v7a/ -o/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/libs/armeabi-v7a/libcontrols.so -Xd -CfVFPV3 -CpARMV7A -XParm-linux-androideabi- -FD/home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/bin controls.lpr

Parsers: make, FPC

ProcessID:
339991

ExitCode:
1
ExitStatus:
256

Error: Exit code 1


Guser979

  • Jr. Member
  • **
  • Posts: 62
Re: Android arm compiler error
« Reply #1 on: July 29, 2024, 01:43:33 am »
SO : Windows 11.
Installation with lamw_manager.

Generate LAMW_INSTALL_VERSION=0.3.1.7-beta
Android SDK:C:\lamw_manager\LAMW\sdk
Android NDK:C:\lamw_manager\LAMW\sdk\ndk-bundle
Gradle:C:\lamw_manager\LAMW\gradle-8.5
OLD_ANDROID_SDK=1
SDK_TOOLS_VERSION =
Install-date:Mon Apr 8 16:48:07 2024

toolchains folders :

"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\llvm"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\mips64el-linux-android-4.9"
"C:\lamw_manager\LAMW \sdk\ndk-bundle\toolchains\mipsel-linux-android-4.9"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\renderscript "
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\x86_64-4.9"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\x86-4.9"
"C:\lamw_manager\LAMW\sdk \ndk-bundle\toolchains\aarch64-linux-android-4.9"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9"

Folders in C:\lamw_manager

"C:\lamw_manager\LAMW\lazandroidmodulewizard"
"C:\lamw_manager\LAMW\sdk"
"C:\lamw_manager\LAMW\lamw-install.log"
"C:\lamw_manager\LAMW\gradle-8.5"
"C:\lamw_manager\LAMW\jdk"
"C:\lamw_manager\LAMW\LAMW4Windows"
« Last Edit: July 29, 2024, 01:48:43 am by Guser979 »

TRon

  • Hero Member
  • *****
  • Posts: 3139
Re: Android arm compiler error
« Reply #2 on: July 29, 2024, 01:48:18 am »
@Guser979:
can you show the contents of directory /home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/bin ?

(if the result is too big to paste then zip it up and attach it)
All software is open source (as long as you can read assembler)

Guser979

  • Jr. Member
  • **
  • Posts: 62
Re: Android arm compiler error
« Reply #3 on: July 29, 2024, 01:55:20 am »
@Guser979:
can you show the contents of directory /home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/bin ?

(if the result is too big to paste then zip it up and attach it)




"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.gold.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-nm.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-objcopy.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-objdump.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ranlib.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-readelf.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-size.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-strings.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-strip.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\libwinpthread-1.dll"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-addr2line.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ar.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-as.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-c++filt.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-dwp.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-elfedit.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-gprof.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.bfd.exe"
"C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe"

TRon

  • Hero Member
  • *****
  • Posts: 3139
Re: Android arm compiler error
« Reply #4 on: July 29, 2024, 02:05:23 am »
@Guser979:
If you are going to do a switcheroo  on me then also the rest of the settings (this time for windows). Especially interested in Parameters:

and ofc the exact error message
All software is open source (as long as you can read assembler)

Guser979

  • Jr. Member
  • **
  • Posts: 62
Re: Android arm compiler error
« Reply #5 on: July 29, 2024, 02:58:41 am »
@Guser979:
If you are going to do a switcheroo  on me then also the rest of the settings (this time for windows). Especially interested in Parameters:

and ofc the exact error message

Sure, no problem. What do you need?

Guser979

  • Jr. Member
  • **
  • Posts: 62
Re: Android arm compiler error
« Reply #6 on: July 29, 2024, 03:01:17 am »
So pleased, and yet so frustrated.
I finally almost overcome setting up Lazarus for some Android development.
Trying to compile a brand new LAMW project, but it cant...

Could someone help? I believe it has somehing with NDK only having a llvm/ folder in the toolchain.
And Lazarus expects arm-linux-androideabi-4.9/






Unfortunately I can't help much. If you need more information about my installation, feel free to ask.

A note about LAMW:

I've never been able to use "New Project" without errors.

I've also never been able to build most of the demos without errors.

What I did to get around this was to use a Template "built by myself." And every new project I start with it.

This "template" is nothing more than a compilation/build and apk generation where I've had success. It contains only one AndroidModule and the Manifest already has the main ones (Permissions, File Provider, etc.)

This has worked for me since the installation until today.


Additionally these steps work here for a new project
1 New Project
2 Compile > Ignore error > Close Lamw > Question ? Yes
3 Open Lamw >Question ? Yes > Project Options > Import config.xml > compile

Obviously a config.xml (from a project without errors) must have been exported before.
« Last Edit: July 30, 2024, 12:41:51 pm by Guser979 »

TRon

  • Hero Member
  • *****
  • Posts: 3139
Re: Android arm compiler error
« Reply #7 on: July 29, 2024, 03:05:10 am »
@Guser979:
If you are going to do a switcheroo  on me then also the rest of the settings (this time for windows). Especially interested in Parameters:

and ofc the exact error message

Sure, no problem. What do you need?
OMG what a f-up at my side. There is no excuse. My apologies. I mistook you for TS.  :-[  :-[
All software is open source (as long as you can read assembler)

TRon

  • Hero Member
  • *****
  • Posts: 3139
Re: Android arm compiler error
« Reply #8 on: July 29, 2024, 03:43:13 am »
So, let's try this again:

@bongorongo:
Can you show the contents of directory /home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/bin ?

(if the result is too big to paste then zip it up and attach it)
All software is open source (as long as you can read assembler)

bongorongo

  • New Member
  • *
  • Posts: 14
Re: Android arm compiler error
« Reply #9 on: July 29, 2024, 08:29:51 am »
Quote
@bongorongo:
Can you show the contents of directory /home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/bin ?

Thanks for reaching out.
In /home/jk/Android/Sdk/ndk/27.0.12077973/toolchains I only have one folder, and that is ../llvm
For what I understand the NDK only has the llvm folder now.

I'v used ChatGPT to help with the installation, and it tells I can change makefile to tell the compiler to make use of llvm instead, but I can't make that work.

TRon

  • Hero Member
  • *****
  • Posts: 3139
Re: Android arm compiler error
« Reply #10 on: July 29, 2024, 09:46:50 am »
Thanks for reaching out.
No problem. I doubt I can be of any help but for sure I can try  :)

Quote
In /home/jk/Android/Sdk/ndk/27.0.12077973/toolchains I only have one folder, and that is ../llvm
Ok, then something is amiss in/with the configuration of that installation because the compiler tools directory (-FD option) points to the directory that I asked to show the contents of. That path does not even exist in your setup.

I do not have any experience with LAMW setup but does it come with different fpc.cfg files or just only one ? (that is if you are at all able to tell that).

Hopefully jmpessoa reads this or someone else knowledgeable on/with LAMW is able to help out.
All software is open source (as long as you can read assembler)

Seenkao

  • Hero Member
  • *****
  • Posts: 579
    • New ZenGL.
Re: Android arm compiler error
« Reply #11 on: July 29, 2024, 01:06:21 pm »
Очень большая вероятность, что у вас не установлен NDK. Установите его заново (или переустановите).


Google translate:
There is a very high probability that you do not have NDK installed. Please install it again (or reinstall).
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

bongorongo

  • New Member
  • *
  • Posts: 14
Re: Android arm compiler error
« Reply #12 on: July 29, 2024, 02:02:58 pm »
Ok, then something is amiss in/with the configuration of that installation because the compiler tools directory (-FD option) points to the directory that I asked to show the contents of. That path does not even exist in your setup.

I do not have any experience with LAMW setup but does it come with different fpc.cfg files or just only one ? (that is if you are at all able to tell that).

Hopefully jmpessoa reads this or someone else knowledgeable on/with LAMW is able to help out.

I downloaded version 22 of NDK. That one has the folder you asked for.
I just tried to replace the original NDK version, with 22 (to avoid having to change paths)

That did not work. Same error I believe.
Then I found the -Fl path in project options was pointing to
/home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/linux-x86_32/sysroot/usr/lib/arm-linux-androideabi/22/
/home/jk/Android/Sdk/ndk/27.0.12077973/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_32/lib/gcc/arm-linux-androideabi/4.9.x/

If I change them to ...x86_64/ I can make a successful compile.

One problem solved, and then it's time for another : Cannot make an APK
I'll check around on that, but if you can point me in a direction that would be nice.

bongorongo

  • New Member
  • *
  • Posts: 14
Re: Android arm compiler error
« Reply #13 on: July 29, 2024, 02:04:52 pm »
Очень большая вероятность, что у вас не установлен NDK. Установите его заново (или переустановите).


Google translate:
There is a very high probability that you do not have NDK installed. Please install it again (or reinstall).

Well, I did, but since path was wrong it was acting like it was missing...

 

TinyPortal © 2005-2018