Hi all,
Not sure if this is still the place to be for ECL questions but here it goes:
I'm having issues cross-compiling ECL for ARM and since this is actually the first time I'm cross-compiling stuff ever I'm kinda stuck.
I want to cross-compile for ARM, *but* it is not for Android it is for Sailfish OS. There's an (unofficial) ECL package available for it but I cannot find a way to contact the author and also don't want to depend on it.
On my Void Linux machine I've installed `cross-arm-linux-gnueabi` and can do a `./configure --host=arm-linux-gnueabi` but when I do `make` I get the following errors:
``` dpp: /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d -> list.o.c
Unknown symbol: mp::compare-and-swap-car
Unknown symbol: mp::atomic-incf-car
Unknown symbol: mp::compare-and-swap-cdr
Unknown symbol: mp::atomic-incf-cdr /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d: In function 'mp_compare_and_swap_car': /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d:670:26: error: 'unknown' undeclared (first use in this function) return ecl_compare_and_swap(&ECL_CONS_CAR(x), old, new); ^~~~~~~ /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d:670:26: note: each undeclared identifier is reported only once for each function it appears in /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d: In function 'mp_atomic_incf_car': /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d:678:26: error: 'unknown' undeclared (first use in this function) return ecl_atomic_incf(&ECL_CONS_CAR(x), increment); ^~~~~~~ /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d: In function 'mp_compare_and_swap_cdr': /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d:686:26: error: 'unknown' undeclared (first use in this function) return ecl_compare_and_swap(&ECL_CONS_CDR(x), old, new); ^~~~~~~ /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d: In function 'mp_atomic_incf_cdr': /home/brainrot/projects/eclrepl/3rd-party/ecl-git/src/c/list.d:694:26: error: 'unknown' undeclared (first use in this function) return ecl_atomic_incf(&ECL_CONS_CDR(x), increment); ^~~~~~~ make[2]: *** [Makefile:88: list.o] Error 1 make[2]: Leaving directory '/home/brainrot/projects/eclrepl/3rd-party/ecl-git/build/c' make[1]: *** [Makefile:144: libeclmin.a] Error 2 make[1]: Leaving directory '/home/brainrot/projects/eclrepl/3rd-party/ecl-git/build' make: *** [Makefile:72: all] Error 2 ```
I get the feeling I'm forgetting some necessary steps.
Thanks, Erik
Hey Erik,
Not sure if this is still the place to be for ECL questions but here it goes:
Yes, this is the place. Thank you for reporting the problem.
I'm having issues cross-compiling ECL for ARM and since this is actually the first time I'm cross-compiling stuff ever I'm kinda stuck.
Cross-compilation is always a PITA. I'd advise compiling ECL natively on the machine if that is an option.
Problems you encounter are related to the new ECL extension (which was not released yet). This would probably get cought in a few weeks (or months) during testing before the release. I've reported the issue on our tracker (https://gitlab.com/embeddable-common-lisp/ecl/issues/461), you may follow the issue there.
So you are not missing any steps (probably!). You may either use the official release ECL 16.1.3 or wait a few hours (hopefully!) until I fix it (check the mentioned ticket in a few days).
Best regards, Daniel
Alright, so the quick follow up:
The problem is that you try to cross-compile ECL with an older version of the compiler. First you need to build the same version for your host system and then use it to cross compile. Symbols in the table doesn't match. When you do that use:
rm -rf build/ ./configure --host=arm-linux-gnueabi # now edit file build/cross_config (set ECL_TO_RUN variable)
and all should work fine. If your toolchain doesn't have atomic_ops library then build may have some problems if you need them. In that case either use different flags or install said library.
Best regards, Daniel
Hi Daniel,
First of all, sorry for the horrible formatting of my initial e-mail. I'm using a proper mail program now.
Secondly, thanks for the reply and apologies for the late reply: the year turnaround got in the way.
"Daniel Kochmański" wrote on Sunday, 2018-12-30 20:56:
Alright, so the quick follow up:
The problem is that you try to cross-compile ECL with an older version
[…]
and all should work fine. If your toolchain doesn't have atomic_ops library then build may have some problems if you need them. In that case either use different flags or install said library.
Hm, I did compile the same ECL for the host before making this report since that was mentioned in the README (or INSTALL) but it didn't seem to make a difference. So I will try your above suggestion. Never thought of this since I'm not very familiar with with the atomic_ops stuff.
As you wrote in your earlier reply about compiling on the machine itself: I wanted to avoid this since the Sailfish SDK offers both an emulator (x86) and a way to deply directly on the machine (ARM), but on further thought I might just go for this option. It might actually make things easier instead of more difficult (which I initially thought).
Regards, Erik
First of all, sorry for the horrible formatting of my initial e- mail. I'm using a proper mail program now.
Secondly, thanks for the reply and apologies for the late reply: the year turnaround got in the way.
No worries, I figured that much :-).
"Daniel Kochmański" wrote on Sunday, 2018-12-30 20:56:
Alright, so the quick follow up:
The problem is that you try to cross-compile ECL with an older version
[…]
and all should work fine. If your toolchain doesn't have atomic_ops library then build may have some problems if you need them. In that case either use different flags or install said library.
Hm, I did compile the same ECL for the host before making this report since that was mentioned in the README (or INSTALL) but it didn't seem to make a difference. So I will try your above suggestion. Never thought of this since I'm not very familiar with with the atomic_ops stuff.
but did you "make install" the host ECL, remove build/ directory, configure for cross compilation (once), customize ECL_TO_RUN in build/cross_config directory and run configure and make after that? Your error really looks like your build has picked some older ECL version (i.e from /usr/bin/ecl if you have ECL installed from the repositories).
As you wrote in your earlier reply about compiling on the machine itself: I wanted to avoid this since the Sailfish SDK offers both an emulator (x86) and a way to deply directly on the machine (ARM), but on further thought I might just go for this option. It might actually make things easier instead of more difficult (which I initially thought).
Native compilation is always the most certain way get things working. In any case when you succeed (or fail!) please let us know what you did.
Best regards (and a Happy New Year!), Daniel
So, to follow up on this I've gotten ECL running on the SailfishOS emulator. In the end (after finding the right web page) it was pretty easy to get shell access to the emulator and run `./configure`, `make` and `make install` there. Although it's a cross-compilation environment it worked without an issue.
Now on the EQL! (SailfishOS runs QT (but with their own layer on top of it :-( ).)
And then try to get it running on the actual phone...
Thanks again, Erik
Congrats! Please send me photos of the phone running ECL, I'll brag about it on social media ;-)
So, to follow up on this I've gotten ECL running on the SailfishOS emulator. In the end (after finding the right web page) it was pretty easy to get shell access to the emulator and run `./configure`, `make` and `make install` there. Although it's a cross-compilation environment it worked without an issue.
Now on the EQL! (SailfishOS runs QT (but with their own layer on top of it :-( ).)
And then try to get it running on the actual phone...
Thanks again, Erik
Hi,
Sorry for barging in a bit late.
I want to cross-compile for ARM, *but* it is not for Android it is for Sailfish OS. There's an (unofficial) ECL package available for it but I cannot find a way to contact the author and also don't want to depend on it.
I am the one who packaged ecl for salifish and put it on openrepos.net. As per my light testing it is working fine, together with EQL5 which I also packaged.
I based the package on the 16.1.3 version of ecl and on the latest commit, around last august for eql5. I’m sure the packages are not perfect but I’m planning to fix things as I’m starting to find the time and motivation to write applications using it.
I should have advertised it here sooner and I apologize for that.
If you have questions for me, don’t hesitate.
On 2019-02-17 08:43, Renaud Casenave-Péré wrote:
I am the one who packaged ecl for salifish and put it on openrepos.net. As per my light testing it is working fine, together with EQL5 which I also packaged.
Oh great, thanks for replying!
If you have questions for me, don’t hesitate.
I got sidetracked by work and family but I want to pick this up again in the near future. So, I can see how I would use ECL together with QML to write apps for SailfishOS, but I'm unclear how EQL fits in here due to Sailfish's own layer on top of QT (Silica).
Perhaps this will become clear to me once I start working with this again.
Regards, Erik
2019-02-18 12:10 GMT+01:00, Erik Winkels aerique@xs4all.nl:
...but I'm unclear how EQL fits in here due to Sailfish's own layer on top of QT (Silica).
That's not a problem: Silica is written in QML, in order to provide custom look and feel for Sailfish, so you only need to import Silica at the top of your QML files like this:
import Sailfish.Silica 1.0
(Not that I have any experience with Sailfish/Silica, just repeating what the docu says.)
Paul
Hi,
On Mon, Feb 18 2019, PR wrote:
2019-02-18 12:10 GMT+01:00, Erik Winkels aerique@xs4all.nl:
...but I'm unclear how EQL fits in here due to Sailfish's own layer on top of QT (Silica).
That's not a problem: Silica is written in QML, in order to provide custom look and feel for Sailfish, so you only need to import Silica at the top of your QML files like this:
import Sailfish.Silica 1.0
(Not that I have any experience with Sailfish/Silica, just repeating what the docu says.)
That’s pretty much about it. I would also suggest to create the Qt application in C++ using functions from libsailfishapp (https://github.com/sailfishos/libsailfishapp) to speed up a bit the application launch but it is not mandatory.
The approach I’m experimenting right now is a mix of “my_app” and “M-modules/quick” examples from EQL5 and it seems to be a viable one.
I stumbled upon a crash at launch (floating point exception) when trying to run something ecl/eql related in the emulator but it is working fine on the device.
I still need to find a way to efficiently use slime with this setup.
I might put a template on a public repository to help quickstart application development when I’m satisfied with my environment.
Hello,
Renaud:
On 2019-02-19 02:06, Renaud Casenave-Péré wrote:
The approach I’m experimenting right now is a mix of “my_app” and “M-modules/quick” examples from EQL5 and it seems to be a viable one.
Have you been able to "import EQL5 1.0" the quick module?
So far I've only been working with Qt Creator from the Sailfish SDK and deploying to the emulator. Using libecl works fine and compiling libeql5 also works but I'd really like to sidestep C++ altogether and just use QML and Lisp calls from QML. Perhaps I should start working on the device itself as long as it is still possible to publish apps on OpenRepos then (I have not looked into that at all).
My issue with the way I've currently been doing things is that I'm stuck at importing the EQL5 module. I get the message that metadata cannot be extracted and that's it.
Sorry for the paraphrasing but I'm writing this at work.
Regards, Erik
On 11/8/19, Erik Winkels aerique@xs4all.nl wrote:
Have you been able to "import EQL5 1.0" the quick module?
just a generic note: as soon as you load the quick module from Lisp using: (eql:qrequire :quick) the EQL5 1.0 module is available in QML.
If you are using Qt Creator to edit QML (surely the preferred way), it will tell you: import EQL5 1.0 "QML module not found (EQL5)." as a red warning message; but this can simply be ignored.
(Don't know if this is helpful in your situation.)
Paul
Hi,
On Fri, Nov 15 2019, PR wrote:
On 11/8/19, Erik Winkels aerique@xs4all.nl wrote:
Have you been able to "import EQL5 1.0" the quick module?
just a generic note: as soon as you load the quick module from Lisp using: (eql:qrequire :quick) the EQL5 1.0 module is available in QML.
Yes, I haven’t had any issues. Lisp.call() in qml files works as it should. Paul’s advice might be what you are looking for.
You can have a look at my eql5-sfos sample repository. It compiles the C++ file and all lisp files, and deploy a package, all from within Qt Creator. I am working with the application deployed directly on the phone but I don’t see why it would be different in the emulator.
In my case the only C++ class I use is to comply with sailfishos booster facility but I guess you can ignore it all and do everything using only lisp and qml.
Hi all,
Sorry for being silent on this for almost a year, but I've been switching between phones, SailfishOS (SFOS), GrapheneOS and LineageOS a lot. Trying to find something that would fit my combination of preferences (the hardest two being combining SFOS and a good camera). That, and corona.
On 2019-11-16 09:06, Renaud Casenave-Péré wrote:
Yes, I haven’t had any issues. Lisp.call() in qml files works as it should. Paul’s advice might be what you are looking for.
You can have a look at my eql5-sfos sample repository. It compiles the C++ file and all lisp files, and deploy a package, all from within Qt Creator. I am working with the application deployed directly on the phone but I don’t see why it would be different in the emulator.
I just finished doing this directly on the phone and it works for me and I've also been able to use Lisp.call() from QML successfully, so thanks!
The app is a little sluggy because I installed `wayland-egl` and `mesa-llvmpipe-dri-swrast-driver` to get it running. I'm sure I'm doing something wrong here, but for now I'm happy!
Regards, Erik
On 2020-09-24 01:05, Erik Winkels wrote:
The app is a little sluggy because I installed `wayland-egl` and `mesa-llvmpipe-dri-swrast-driver` to get it running. I'm sure I'm doing something wrong here, but for now I'm happy!
Ok, scratch that. I accidentally the phone, but after a factory reset it runs smooth!
Hi Rene,
I got sidetracked by work and family life, but I started playing with this again yesterday:
On 2019-02-17 08:43, Renaud Casenave-Péré wrote:
I am the one who packaged ecl for salifish and put it on openrepos.net. As per my light testing it is working fine, together with EQL5 which I also packaged.
Do you have any hints for on how you got EQL5 packaged? I've got building ECL down to repeatable steps but with EQL5 I run into issues with:
- `printsupport` and `uitools` in the .pro files - `#include <QtPrintSupport>` in a lot of generated header files - `#include <QUiLoader>` in one header file
Thanks, Erik
Hi Rene,
Nevermind this:
On 2019-08-03 23:36, Erik Winkels wrote:
Do you have any hints for on how you got EQL5 packaged? I've got building ECL down to repeatable steps but with EQL5 I run into issues with:
- `printsupport` and `uitools` in the .pro files
- `#include <QtPrintSupport>` in a lot of generated header files
- `#include <QUiLoader>` in one header file
I'm totally unfamiliar with Scratchbox and cross-platform stuff but I got some hints from the Sailfish developer docs. I was able to install the missing libraries with `sdk-manage`.
Now to figure out why the eql_*.pro files cannot find `ecl/ecl.h` :-D
Bye, Erik
Hi Erik,
Thank you for poking me, Like you I haven’t taken the time to continue on this project since last time…
- `printsupport` and `uitools` in the .pro files
- `#include <QtPrintSupport>` in a lot of generated header files
- `#include <QUiLoader>` in one header file
Yes, for those you just have to install missing packages. I also had to remove manually 5 classes that were part of libraries not found in sailfish distribution. Those are:
From QMultimediaWidgets:
- QCameraViewfinder - QGraphicsVideoItem - QVideoWidget - QVideoWidgetControl
From QtQuickWidgets:
- QQuickWidget
For references, I have a private repository with some changes of mine to make it work. I noticed it’s not up-to-date with upstream, so expect things to change quite a bit when I find the time to make another package. Of course, comments are welcome:
https://redmine.casenave.fr/sfos/eql5.git
I also made a repository for the rpm spec file I used to make the package for sailfish:
https://redmine.casenave.fr/sfos/eql5-spec.git
Hi,
A small update on the eql5 situation on Sailfish OS. I packaged the 19.9.1 version of eql5 and just uploaded it on https://openrepos.net
I already put the related repositories’ urls here but just in case, here it is.
For eql5 itself, with small changes to make it work with Sailfish’s Qt version: https://redmine.casenave.fr/projects/eql5/repository/28?utf8=%E2%9C%93&r...
For the spec file used to make the rpm: https://redmine.casenave.fr/projects/eql5-spec/repository
I also made a package to bootstrap application development here: https://redmine.casenave.fr/projects/eql5-sfos/repository
It is based on the example “my” from EQL5-Android, as Paul suggested, but much more barebone.
If you are interested, I’d be willing to make one or two pull requests upstream to make it official but I don’t really know how it would fit.
Cheers,