-
Notifications
You must be signed in to change notification settings - Fork 195
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
Setup AppImage builds for Linux #130
Comments
I haven't updated this binary in forever.. I assume people build from source or get it from their package manager. I can update it and see what changes. |
Please, lets build AppImage-package automatically (using Travis CI) instead!
For any help ask @probonopd @TheAssassin |
If you want to add such changes to Travis, that be welcome. |
Does |
Not sure, not that familiar with Ubuntu releases. It requires C++17 nowadays, which means a newer Clang/GCC, so that will likely be your limiting factor. |
GCC 7 seems to support C++17 mostly, there's just one minor feature that'd require GCC 8. See https://gcc.gnu.org/projects/cxx-status.html. Ubuntu 18.04 (bionic) ships with GCC 7.4 by default, so I'd suggest to build off of that, unless some older release is also viable. Not ideal, but good enough to get started. You won't have any better compatibility by building on older distros with newer compilers anyway. And you don't have to install any extra packages. Looking at the Travis file, right now it's using the EOL trusty with some Ubuntu PPAs to get some GCC 7. Since trusty is EOL, libraries etc. won't receive fixes, so if possible I'd try to upgrade to xenial or bionic. Either way; as long as you get your project built, it can be easily AppImage-ified. A guide is available at https://docs.appimage.org/packaging-guide/from-source/native-binaries.html, there's ready-to-customize scripts at the bottom of the page. |
If so, would resulted AppImage still runnable on Debian 9.x Stretch? |
Well, none of these platforms have a recent enough libstdc++ to support C++17, have they? Therefore, no, rather unlike. |
Note that the current travis file pulls in newer gcc/clang manually, so it may well be possible to upgrade the dist without doing much else. |
That version is from 2018. Hence this binary will not run on older distributions. To make it run on older distributions, compile it on a system with a (much) older glibc. https://www.gnu.org/software/libc/ has a timetable. |
Ok, so recompiling on my current system doesn't work. I don't have an older Linux available, but I suppose I could make a VM for that purpose.. Then again, how does anyone release software this way? I guess I am not following what is the standard way to do this on Linux. |
An option is to use https://github.com/probonopd/uploadtool to auto-deploy built binaries to GitHub releases on every build. |
Compiling on a local developer machine is not the recommended best practice anyway. Have you checked out systems such as Travis CI? This way, you won't need a virtual machine on your local system. Example: https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci
No. The "standard way to do this on Linux" before AppImage has been to dump the source code somewhere, pray and wait that some Debian developer picks it up and packages it, so that it eventually lands in the Linux distribution at some point. And then rinse and repeat for every other Linux distribution. Only to find out that once the software is in Debian stable, it is long outdated... |
That's not very practical for the long tail of less popular software, or early in development. And creates an enormous lag between software improvements and users getting them. I don't understand why people think this is a workable system. But anyway, agree that making CI do it is the modern way to help with this. This project already uses Travis. I just don't have time right now to investigate how to make it do all this new functionality, so if someone feels like tinkering with it, PRs much appreciated. |
This exactly a reason why such software should be AppImage'd Because not popular software often ignored by package maintainers. |
Precisely. I was just describing the "standard way to do this on Linux", and I agree it is not very useful for the long tail of software, and for software that is under heavy development. Hence, AppImage :-) |
Fair enough. So who can add AppImage support to the |
Yes. See https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci for an example, |
For what its worth, the 64-bit binary on http://strlen.com/treesheets/ has been updated to today (sept 2 2019), built on Mint 19.1 |
Thanks @aardappel but I don't see an AppImage being mentioned there? |
Related: #108 |
I am trying to generate an AppImage but I am running into this issue: Here is my work-in-progress |
@probonopd that was just FYI, for whoever in this thread just wanted a new binary. As for an AppImage, try build with CMake. |
Which is what I am doing: |
Not sure what |
I am working on a workaround now, let's see how it goes. |
I was able to build "something" but I can't test it right now, so it would be great if someone could, and report back what is working and what is not working yet. Thanks! https://github.com/probonopd/treesheets/releases/tag/continuous |
Oopsie! Something is not working well yet:
Any clue what might be going on here? |
Change in the C++ ABI it looks like. |
Well, it's up to @aardappel whether to merge weird workarounds that are guaranteed to break in the future.
Argh. Please don't. If it's just necessary to work around some weird resource lookup, then I'd like to ask @aardappel to read https://docs.appimage.org/reference/best-practices.html#binaries-must-not-use-compiled-in-absolute-paths (the section needs some improvements, as it doesn't explain all scenarios which might be fixed by looking up resources relative to the main binary, e.g., like here, where additional resources are likely just looked up relative to the install prefix and as a fallback cwd; looking up relative to the main binary should be on top of the list). |
That link says: |
I see, thanks for the clarification. Using In some other apps I always had to |
Built a MWE for testing. #include <stdio.h>
int main(int argc, char** argv) {
printf("%s\n", argv[0]);
return 0;
} Output: > ./test-x86_64.AppImage
/tmp/test-x86_64.AppImage Making apps relocatable can be hard, mkay... |
TreeSheets strips away what it thinks is the exe name to obtain the path, so it will be looking for its files in How is this supposed to work? Using I'd be happy to get the exe path in some other way for Linux. |
Yes. All apps I ever run are AppImages at this point.
https://github.com/limbahq/binreloc might be an option. But before we cause additional work, did you try out https://github.com/probonopd/treesheets/releases/tag/continuous? 214fbf9 is working for me. I am now simply using a tiny bash script there:
Does the trick. |
Either that, or, as I wrote, you can just read the real path of |
Yeah, don't think I want to pull in some non-standard library to get the job done. I'll try using Haven't tried the AppImage build, I don't use AppImage personally (yet). |
Can you please give it a try so that we know whether everything is in a state that is OK for you to send a pull request? Thank you very much. |
If TreeSheets loads up with the tutorial file as first thing, it is working. What I can't judge is the possible distro incompatibilities discussed above. |
@Symbian9 does it work for you? Is it ready for a pr? |
@probonopd, I just launched your build ;-) I not yet tried do nothing and closed manually this app first session; here is this session full terminal log:
|
PR sent: #134 PLEASE NOTE: For this to work, you need to set up |
Ok, PR merged (and env var set beforehand).. lets see what happens. |
Just added code to get the exe path from Does this mean the script can possibly be simplified? |
Yes, in this case we don't need the |
Now, this is kinda strange...
Why does it need such a new libstdc++.so.6? |
Well, @aardappel already explained the software uses C++17 features. Why shouldn't it require a recent enough libstdc++? It needs to be capable of C++17, which, as the name suggests, was released around 2017. This again showcases perfectly that hacks like yours just cannot work. They might seem to, but after all, they're bad hacks and the testing is likely incomplete. |
Argh. "Modern C++" strikes again. Gotta bundle a private copy of libstdc++.so.6 then. Everything gets rigorously tested in https://github.com/AppImage/appimage.github.io :-) |
PR sent: #136 |
* Workaround to increase compatibility with older systems See https://github.com/darealshinji/AppImageKit-checkrt for details #130 (comment) * Update .travis.yml
* Workaround to increase compatibility with older systems See https://github.com/darealshinji/AppImageKit-checkrt for details aardappel/treesheets#130 (comment) * Update .travis.yml
* Workaround to increase compatibility with older systems See https://github.com/darealshinji/AppImageKit-checkrt for details aardappel/treesheets#130 (comment) * Update .travis.yml
OS: Debian 9.x (
x86_64
)Version: http://strlen.com/treesheets/treesheets_linux64.tar.gz
I just try to use portable build but it failed:
The text was updated successfully, but these errors were encountered: