-
Notifications
You must be signed in to change notification settings - Fork 87
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
FreePascal + Lazarus It almost works but fails to start.. #1139
Comments
Some additional info so it might help thinking of a solution.. On WSL I had to execute this script to get it all working so I "just" need to install the Termux (linux-android) equivalents which seems a lot of puzzling.. albeit someone encountered problems alike.. but I guess it will take some effort to sort it out..
|
It seems that the RUNPATH of |
@licy183 thanks for your suggestion..
Then I thought about the fact I did not even test gtk2 with pure FPC so I tested the FreePascal/gtk2 examples first.. The compiled example did not run and gave a similar error so that was a starting point to find a solution.. What I've learned today was the usage of LD_LIBRARY_PATH as a workaround for "wrong paths" compiled into the binary.. although that method was strongly adviced to be used as a last resort.. if nothing else worked.. (the developer should change the bad paths in code).. Then I created a wrapper which sets the LD_LIBRARY_PATH and voilá things started to work.. and for the first time I had confirmation that gtk2 is working inside XFCE4 non-proot/non-croot.. pure Termux.. That brought hope.. since Lazarus is nothing but a bunch of FPC compiled binaries.. Here a screenshot of the achievement.. To be continued.. |
Status & Progress.. "Well.. does it work? Of course! (not)" Finally had the courage to perform the That seems normal behaviour since lazarus needs also a bunch of config files and some fundamental paths are incorrect/missing.. it is only logical the IDE does not show.. but we have no errors.. Using the "run" command really did some "magic" so it seems.. To be continued.. |
Status & Progress "What about FPC? Boldly go where no-one has gone before?" FPC is fundamental for pascal-dev fans to build anything one wants and since its a lot of pioneering the outcome is uncertain.. Therefore I defined a goal.. to keep myself motivated.. GOAL: I want to develop on-device (pure Termux/XFCE) with FPC/(Lazarus) programs/games with the great "Castle Game Engine".. (& also cross build with FPC classic-amiga software for usage with the UAE4ARM/vAmigaWeb/etc. Amiga-emulators) & test/debug the result on the XFCE desktop to shorten the dev-cycle & finally build the project into a signed debug/release APK.. & install it like a regular APK on the device.. in that way we have real hardware-acceleration at hand even on cheap yet capable devices.. & therefore be able to start the app from terminal.. the "Oldskool" way.. FALLBACK: if it shouldn't work out we can always fallback to the "proot" option.. with i.e. a debian install.. but I hope to keep it pure Termux/XFCE.. saves a zillion cpucycles.. :) What I have learned today is that Lazarus gtk2 needs a fully functional FPC so I have to adapt/build/test all the (for aarch64/android build target not yet available) fpc-packages for Termux complience/compatibility.. To showcase what already runs I recorded on-device a short video about pure FPC OpenGL examples running fine after being "Termuxified" if you know what I mean.. So please enjoy another achievement.. vlc-record-2024-08-12-22h29m50s-screen-20240812-132627-small.mp4To be continued.. |
I count on you to succeed. I wanted to move FPC myself, but I'm too weak :P And a little application requires this compiler |
@IntinteDAO thanks for the encouragement.. It is already possible to use FPC on Termux Android with official builds provided by https://www.freepascal.org/download.html Though it needs fpc.cfg configured properly and that is the first hurdle to overcome if you really want to learn to work with FreePascal.. It will take some time before a stable and full 3.2.2 release is available as termux package.. but I am working on it.. I still have to learn a lot about Termux as it is the 22th day since first Termux installation.. but with some Linux experience it was not super difficult to comprehend.. |
Status & Progress "FreePascal back to basics & just one more package to go" A stable release of FPC v3.2.2 can only be build by a stable compiler.. FPC from trunk (3.3.1) has always been categorized as unstable even though it might work well.. you get the latest additions at the risk of buggy behaviour.. "Normal" users prefer a stable release which is more robust in production environments.. Creating a full termux distri of FPC v3.2.2 ARM went reasonably well.. using the incomplete FPC v3.2.2 ARM distri by freepascal.org as "bootstrap compiler".. One more achievement to go.. what I have to do is using the freepascal.org distri FPC v3.20 AARCH64 to build a FPC v3.2.2 AARCH64 stable distri.. the methods I use worked to create FPC v3.3.1 from trunk so I think it will take another week or so to get it done.. What I have learned last weeks is creating a distri and deb and setting up an experimental repo for my "fpc4termux" challenge.. Now if we can also manage to build the CGE build-tool with FPC we are going to have a full blown game engine at our disposal but I am still strugling with a lot of linker errors.. ergo: I guess we can close this issue since all the eyecandy was produced with fpc v3.3.1 from trunk and that will never become a deb-file for mainstream usage.. that learning curve is not for the fainthearted so let's focus on the stable release v3.2.2. @licy183 you or any termux fpc devs are welcome to test my experimental non-signed stuff .. and maybe report bugs or anomalies via my "termuxified issues" repo.. I know it's not perfect but I am just a couple of months into Termux.. and I think with the right maintainer-scripts you'll get some nice packages for TUR.. or perhaps even mainstream Termux-(X11) packages.. with kind regards, PTz()uAH |
@licy183 Status & Progress "Wouldn't this be a better option? 100% native.." Well some final/first words, since creating the FPC debs with termux-create-package first worked but after a python update it does not work anymore.. I worked out an alternative method to create FPC and LAZARUS using the infamous FPCUPDELUXE.. I did put LAZBUILD (Lazarus from commandline) to work and produced a FPCUPDELUXE binary which should be the better or even best option for pascal developers.. Now if we can get FPCUPDELUXE fully working I guess that would be a really nice addition for Termux/X11/GTK2 on XFCE4.. All I need to do now is maintain a "Termuxified" FPCUPDELUXE and the Pascal community can use their Android devices for fun/work/etc. boldly go.. ;-) Isn't this cool? Testers welcome.. with kind regards, PTz()uAH |
@licy183 Status & Progress "It took some effort but it works 100% native.." Hereby I can confirm the FPCUPDELUXE binary works fine albeit building fpc+lazarus from trunk needed a lot of codechanges so there is no out-of-the-box experience yet.. Anyway.. to focus on FPCUPDELUXE, it works but needs some finetuning i.e. to autoinstall Lazarus for XFCE4 but now I first take some quality-time to play around with it.. with kind regards, |
Thanks for your working! Actually I'm not familar with Pascal. I'll have a look if I have more free time. |
There was some work for porting FPC to termux, but it is unfinished. termux/termux-packages#10862 |
I think lazarus+fpc may be proposed to termux-packages, not to tur since the work was started there. |
@licy183 @twaik
note: to make it easy just
Assuming you have
cd to the location and run it..
and you are ready to rock.. fpc creation from trunk will work though be prepared to hack the code.. if you want more.. Finally as another "world premiere" I can also announce to have the Castle Game Engine running so my personal goal was achieved.. but only libopenal.so was installed but not found by CGE so that's a bummer..no sound yet.. (note: vlc works fine though) So please enjoy some eyecandy aka proof-of-concept-of-proof.. with kind regards, |
Hoi Termux devs/fans..
Hope to get some help overhere as it was "Not related to X server functionality" according to the Termux-x11 moderator..
I was very happy I got FreePascal 3.3.1 from trunk working and wanted also to build Lazarus for Termux-X11..
Hence I needed to adapt the FPC/LAZ source code for Termux usage and finally completed the Lazarus X11 GTK2 build..
As I am very eager to get Lazarus to work on XFCE4 It seems I missed something and got stuck testing it..
Any help is welcome to get it working without proot/croot so, when it all works out, we might even have a distributable deb for the pascal-dev-on-termux-community..
with kind regards.. Peter
The text was updated successfully, but these errors were encountered: