-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building FPCDELUXE native in Termux shows erroneous build system at startup.. #715
Comments
Hoi Devs, it seemed Now it looks fine and I guess it's a premiere for running FPCUPDELUXE on ANDROID/AARCH64.. I managed to build FPC and Lazarus after a lot of manual editing the sources and committing them locally before a succesfull build.. I guess we can close it up.. since it was no bug but a "typo".. with kind regards, Peter |
This is a very nice result !! Look here. |
Thanks @LongDirtyAnimAlf ! As you can see the libraryscanner was useless even after patching.. All packages/programs available for Termux are adapted for usage on Termux.. non-fsh complient.. so I had to adapt the libraryscanner with altered paths as also the aarch64-linux-android target but that did not work.. Well after copying the "termuxified" FPC and LAZARUS sources from the Android Tablet to the PC with Linux Subsystem for Win installed, after creating FPC and LAZARUS with FPCUPDELUXE I tried to crossbuild with LAZBUILD a simple project1.lpr from WSL2 to Android/Termux and failed with the default gcc toolchains.. I did not try clang on WSL2 for getting that to work was too elaborate for me.. I use Clang19 on Termux which does the job.. it replaces all previous standardised gcc toolchains.. With the current available android toolchains it is not possible to i.e. use GTK2/X11 needed for creating desktop (XFCE4) programs.. Though Termux is on-device developer friendly so most packages (debian alike) also install the dev parts.. Here some manual scans so you can see what the Termux filesystem has onboard.. FYI.. I have the compiled fpcupdeluxe binary for Termux AARCH64 available ("handbuild" with heavily patched fpc and lazbuild).. for testing.. You can find it at https://github.com/PTz0uAH/termuxified/tree/main/projects/fpcupdeluxe I guess if the host pc can cross compile to aarch64-linux-android with clang 19 then fpcupdeluxe would probably work for crossbuilding to termux too.. just like building native from termux.. but that needs some "diving into it" IYKWIM.. Maybe you can distribute my binary build until things work the way you want.. a lot of termux pascal fans could experiment for themselves.. I "only" needed to create 3.2.2 bootstrap compilers for ARM-ANDROID and AARCH64-ANDROID.. those I built before to get a sane 3.2.2 binary to build FPC from trunk.. that was some journey.. I thought of offering FPCUPDELUXE as binary package to Termux-packages but since it runs from $HOME/fpc4termux/fpcupdeluxe/ installing to $HOME from a package is a no-go.. so I must take into consideration to build FPC and LAZARUS from $PREFIX/lib/fpc4termux/fpcupdeluxe/ to be able to create FPC/LAZARUS Termux complient packages with also a complient FPCUPDELUXE Termux-package to get one started I guess.. |
Good info ! |
Ok.. but the quickly patched scanner (wip) was not yet of use to me as it didn't work with android/termux/clang19 (llvm?) backend.. still working on it so.. |
@LongDirtyAnimAlf congrats and welcome to Termux! I guess this does mean you do not need those results from the libraryscanner.. What toolchain did you use on windows.. clang14+ or plain gcc? btw.. I 've been testing if using crosscompiling with help of Fpcupdeluxe works.. and yes it also works from termux and managed to build ppcross68k with an amiga-m68k toolchain (alt binutils) to work with the Amiga emulators I am also porting.. preserving those "oldskool" feelings.. crosscompilers that compiled ootb without too much hassle were: jvm-java, wasm-wasi and amiga-m68k.. wanted to create avr-embedded (arc5,arc6) for some arduino but those binutils are not availlable.. todo also get the esp32 toolchain working with FPC and Lazarus on Termux.. |
I have adapted the scanner to work on Termux. And collected all the needed libs. |
@LongDirtyAnimAlf glad you made some significant progress.. and activated the upstream division of Freepascal.. superb! Those FPC devs reside on gitlab I assume and a couple of months ago when I started the porting-journey there was a new-membership stop so I only exported locally the source edits on FPC/Lazarus to a couple of "patchfiles" with intention to apply them before every fresh trunk build.. The "ugly" patches need to be applied as there was no termux specific source ootb available.. with OpenGL and X11 and GTK2 etc.. needed to get the Castle Game Engine to work with Lazarus and Lazbuild.. on Termux-app/X11.. I could not get those patches to work automatically with FPCUPDELUXE.. lacking some basic information about howto-use.. so even thought about a custom patcher to build with FPC which I did before with the Amiga platform.. yet if all that can be achieved at the root of the Freepascal/Lazarus source git that would be fantastic and FPC and Lazarus from trunk (or stable) will work ootb soon with FPCUPDELUXE.. for all Termux-fans.. Auto-patching those sources before the first compilation was my first thought but I patched the sources after the first failing build.. do a local git commit and it works.. but very time-consuming.. (never used the patching mechanism in FPC ever for self-produced patches.. so I do not know exactly how that works.. but I managed to export some files via git ) What I could do if needed is make a repo here at github and upload the compete snapshot of the FPC?Lazarus build-sources that worked.. yet I do not know how fast the FPC upstream teams are able to implement the things we need.. another repo has not my preference but if there is no other way I maybe goto gitlab.. The "ugly" patches I posted at FPCUPDELUXE Issues.. at my "termuxified" repo.. where I keep track of all Termux related projects.. so maybe you can take a look.. PTz0uAH/termuxified#2 (comment) So I really need to go on GitLab to communicate with the Freepascal people.. clone the repo, apply my patches and push or is there already a (Termux) aarch64-linux-android source repo for FPC and Lazarus.. or even representation on Github.. couldn't find a recent github freepascal trunk repo.. Well we'll see how it works out.. and if it leads to the much wanted/anticipated FPC/Lazarus packages for Termux.. but I think from educational perspective learning to build your "own" generates a lot of experience for the pascal devs of "tomorrow".. |
Thanks for your detailed update !
Please provide all of the above. I hope we can make progress. |
Well that is some thing.. I'll do what I can from the context I am working from.. & I'll create fpc and laz repo of the "proof of concept" and work from that first.. keep you informed.. |
@LongDirtyAnimAlf some termuxial progress.. I created the experimental FPC/LAZARUS repo to work on.. And also cloned FPCUPDELUXE and made a TMX branch which will contain the (minimal) changes I made in the process to build the first "ported" edition.. All work has been done on-device.. https://github.com/PTz0uAH/fpc4all Are you willing to test the repo "out-of-the-box" ? That would be nice.. And could you also use your recently cross-build binary of FPCUPDELUXE to see if that works too? to be continued.. |
Hoi Devs, I managed to port/build FPCDELUXE with native LAZBUILD for Termux on Android 13..
After some minor changes the build succeeded and the GUI started seemingly normal..
I haven't tested the program functionality yet but at least it runs on the XFCE4 desktop..
The first "bug" I see is the erroneous message the program was
build with FPC 3.3.1 on Win11 X86_64..
I expected to see:
build with FPC 3.3.1 on Android AARCH64
as the project is a native build on Android 13/Termux X11 with FPC from trunk..with kind regards,
Peter
The text was updated successfully, but these errors were encountered: