Android arm compiler error lazarus / 43-Android ---------------------------------------------------------------------- bongorongo · 2024-07-28 21:14 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 QuoteCompile Project, OS: android, CPU: arm, Target: /home/jk/fpcupdel uxe/projects/LAMWProjects/AppLAMWProject15/libs/armeabi- v7a/libcontrols.so Compile Reason: Last compile was incomplete.   State file=/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject 15/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/lin ux-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/con trols -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/con trols/ -FE/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/libs/ar meabi-v7a/ -o/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/libs/arm eabi-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/AppLAM WProject15/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/ -F U/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/obj/contr ols/ -FE/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWProject15/li bs/armeabi-v7a/ -o/home/jk/fpcupdeluxe/projects/LAMWProjects/AppLAMWPr oject15/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 · 2024-07-28 23:43 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" ---------------------------------------------------------------------- TRon · 2024-07-28 23:48 @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) ---------------------------------------------------------------------- Guser979 · 2024-07-28 23:55 Quote from: TRon 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) "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 · 2024-07-29 00:05 @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 ---------------------------------------------------------------------- Guser979 · 2024-07-29 00:58 Quote from: TRon 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 Sure, no problem. What do you need? ---------------------------------------------------------------------- Guser979 · 2024-07-29 01:01 Quote from: bongorongo on July 28, 2024, 11:14:57 pmSo 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. ---------------------------------------------------------------------- TRon · 2024-07-29 01:05 Quote from: Guser979 on July 29, 2024, 02:58:41 amQuote from: TRon 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 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. ---------------------------------------------------------------------- TRon · 2024-07-29 01:43 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) ---------------------------------------------------------------------- bongorongo · 2024-07-29 06:29 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 · 2024-07-29 07:46 Quote from: bongorongo on July 29, 2024, 08:29:51 amThanks for reaching out. No problem. I doubt I can be of any help but for sure I can try  QuoteIn /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. ---------------------------------------------------------------------- Seenkao · 2024-07-29 11:06 Очень большая вероятность, что у вас не установлен NDK. Установите его заново (или переустановите). Google translate: There is a very high probability that you do not have NDK installed. Please install it again (or reinstall). ---------------------------------------------------------------------- bongorongo · 2024-07-29 12:02 Quote from: TRon on July 29, 2024, 09:46:50 amOk, 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 · 2024-07-29 12:04 Quote from: Seenkao 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). Well, I did, but since path was wrong it was acting like it was missing...