Open esternin opened 3 years ago
Yes, sure, in principle it should be possible and there are already appimages using wx. But I hadn't created any myself yet, so I'll have to look at how exactly it needs to be done.
I don't think having the option of a make appimage
is the best path. Creating the AppImage requires the installation of tools to create it and the process is really meant for developers. It is better to think of this as something that is provided by the developers of eXtrema instead of providing the option for any user to be able to create it. Similar to compiled binaries. The whole point of providing an AppImage is to provide end users with a quick way to have eXtrema without having to deal with compilation and dependencies.
FWIW I understood this issue as just meaning "provide some way of making an AppImage". Whether it's done by make appimage
or some other way, e.g. a separate script, doesn't really matter IMHO, but as such script will have to build the binaries anyhow, it might make sense to do it in the makefile itself.
Maybe a separate script would be a better idea, I will keep playing with it as the tools mostly generate some YAML files to describe the AppImage and then use strace to get insight on the dependencies and relationships.
I created this initial test last night, please test to check functionality. I am sure I didn't hit all the functions so it may have some issues.
Daniel, can you provide instructions on how to test? Simply running it does not work, but I do not know how to diagnose, as the errors seem self-contradictory:
$ ./eXtrema-latest-x86_64.AppImage
APPRUN_ERROR: No such file or directory
$ ldd eXtrema-latest-x86_64.AppImage
not a dynamic executable
$ file eXtrema-latest-x86_64.AppImage
eXtrema-latest-x86_64.AppImage: ELF 64-bit LSB executable, x86-64, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=9fdbc145689e0fb79cb7291203431012ae8e1911, stripped
$ uname -a
Linux b206-075 3.10.0-1160.24.1.el7.x86_64 #1 SMP Thu Mar 25 21:21:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
To test you would just need to execute as you just did. I didn't test for the different distro's as the tests involved getting X Window running on Docker.
This works by initially copying/using the glibc used when packaging to tmp for the initial execution entry point of the actual extrema binary packaged and that is what seems to be failing. I will analyze and test with some distro's before sending another version. It seems to be executing fine outside of that issue of the initial entry point though, so looks promising.
I will test with CentOS and Ubuntu to start.
I have tested the image on Ubuntu and it seems to be working fine now. I have tested from 16.04 up. Please test on your side. It is available through the same link right now at https://toor.do/eXtrema-latest-x86_64.AppImage To test this file you would just need to download, set as executable and execute
The issue was related to not clearing out the AppDir correctly after re-building and patchelf doing a double patching of executables. As you both have mentioned, it seems a simple Makefile section would work. We can also ship out the AppImage YAML file with the definitions required to make the AppImage. The definitions on the file are pretty static.
The executable works fine under Ubuntu and RHEL 7. Sounds like it's working as expected!, great work, Dani!
How should we distribute it? Perhaps, we need to split "make install" into "make install-libs" and "make install-appimage", while "make install" will remain "make install-libs" + "make install-bin", because those interested in installing without compilation must install Help and Scripts and other service files.
Could you modify Makefile.am to add the appropriate options? You can fork out a branch/pull request for it, or go directly if you have tested it already.
@formatez Daniel, I'd like to make a release and go public. I can simply upload your AppImage here, but it would be nice to have the necessary Makefile changes in, if possible. Any chance you could look into it?
@formatez seems to have vanished, so I cobbled together makeAppImage.sh
. It does what needs to be done. Not sure if we need to incorporate this into Makefile.am
or just leave it as a separate script.
Maybe, this is no longer an issue, @vadz ?
My makeAppImage.sh
script is not producing robust - i.e. completely self-contained - images. It may be an inherent limitation of AppImage, as it should be built on the oldest OS one can find, because the run-time libraries should be expected to be forward-compatible.
Worse, it is not clear why some libraries are included automatically, and some are not. It may be related to the problem of changing /usr/lib
conventions. appimagetool-x86_64.AppImage
and linuxdeploy-x86_64.AppImage
as downloaded seem to have the path /usr/lib/x86_x65-linux-gnu
hard-coded in while RHEL7 (my oldest and therefore AppImage production system) uses /usr/lib64
).
It really would be nice to have such evolutionary differences to be taken care of by automake/make
.
Can we have an option of
make appimage
?