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

Please provide an AppImage for Linux on GitHub Releases #113

Open
probonopd opened this Issue Dec 27, 2017 · 26 comments

Comments

Projects
None yet
3 participants
@probonopd
Copy link

probonopd commented Dec 27, 2017

Providing an AppImage would have, among others, these advantages:

  • Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
  • One app = one file = super simple for users: just download one AppImage file, make it executable, and run
  • No unpacking or installation necessary
  • No root needed
  • No system libraries changed
  • Works out of the box, no installation of runtimes needed
  • Optional desktop integration with appimaged
  • Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
  • Can optionally GPG2-sign your AppImages (inside the file)
  • Works on Live ISOs
  • Can use the same AppImages when dual-booting multiple distributions
  • Can be listed in the AppImageHub central directory of available AppImages
  • Can double as a self-extracting compressed archive with the --appimage-extract parameter

Here is an overview of projects that are already distributing upstream-provided, official AppImages.

If you have questions, AppImage developers are on #AppImage on irc.freenode.net.

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 28, 2017

It could be interesting but it looks like a fairly large undertaking. This is not the priority for the moment.

@f4exb f4exb added the help wanted label Dec 2, 2018

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 2, 2018

I am expecting contribution on this. I have many more important things that need attention so I will not spend time on this.

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 2, 2018

Thanks for your response @f4exb, I read this as "if someone sends a PR that will produce an AppImage and upload it to GitHub Releases, it will be considered". I think I can give you a hand, but may need occasional help from you if I'll run into any issues building this, and when it comes to the "final polish" to make sure everything works as intended.

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 2, 2018

Succeeded building an AppImage, it can by downloaded from https://github.com/probonopd/sdrangel/releases. Built using https://github.com/probonopd/sdrangel/blob/patch-1/.travis.yml.

However, on Clear Linux OS I get

user@host ~ $ Downloads/SDRangel-49ffdf7-x86_64.AppImage 
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Aborted (core dumped)

when trying to run it. What could be causing this?

LD_DEBUG=libs strace -f squashfs-root/AppRun >log.txt 2>&1 attached.

log.txt

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 2, 2018

Same on Xubuntu 18.04:

me@host:~$ Downloads/SDRangel-49ffdf7-x86_64.AppImage 
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Aborted

me@host:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 2, 2018

I need help on these errors @f4exb so that I can continue.

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 3, 2018

Would it be possible for you to get a stack trace at the time of error so I can get an idea of the path taken? The strace is not really helping.

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 10, 2018

How exactly would I do that?

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 11, 2018

Just as usual: compile with debug symbols, open the core dump with gdb and use "bt" command. I don't know how this can apply with your appimage thing, this is your business. This is very easy when you compile from source.

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 11, 2018

AppImage is just a self-mounting filesystem, it does not change what one puts inside (like a zip or ISO file).

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 11, 2018

If it is just that then why would it fail like this in the first place? I never encountered such an issue.

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 17, 2018

Think of an AppImage like a zip or iso file. It's just an archive that holds whatever you put inside. I don't think the issue here is AppImage specific.

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 18, 2018

With the little information given by strace we know that this std::regex_error is thrown in libsdrbase.so. There are not many instances of std::regex there so it should be somewhere here: https://github.com/f4exb/sdrangel/blob/master/sdrbase/webapi/webapiadapterinterface.cpp#L38

Apart from the fact I see nothing wrong with these regex definitions this code is executed each time the program is run (this is static). There are no issues when compiling from source or with the code built in the .deb packages.

How do you explain this? What do you "put inside" actually? Wouldn't it be an issue with the standard C++ library you put inside?

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 18, 2018

Possibly, I don't know. If you'd like what is inside, then please download the AppImage from https://github.com/probonopd/sdrangel/releases and extract it like so:

wget -c "https://github.com/probonopd/sdrangel/releases/download/continuous/SDRangel-49ffdf7-x86_64.AppImage"
chmod +x ./SDRangel-*-x86_64.AppImage
./SDRangel-*-x86_64.AppImage --appimage-extract

You can then freely inspect its contents.

If you would like to see how the AppImage was produced, this is how:
https://github.com/probonopd/sdrangel/blob/patch-1/.travis.yml

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 18, 2018

OK, even without debug symbols the stack trace gives some information confirming that the system libstdc++ is used. So I still don't see why it would fail:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f5d3c5c4801 in __GI_abort () at abort.c:79
#2  0x00007f5d3cc198b7 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007f5d3cc1fa06 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007f5d3cc1fa41 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007f5d3cc1fc74 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007f5d3cc1b91f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00007f5d3e1803cb in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_bracket_expression() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#8  0x00007f5d3e1806fa in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_atom() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#9  0x00007f5d3e181480 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_disjunction() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#10 0x00007f5d3e180d7a in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_atom() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#11 0x00007f5d3e18129a in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#12 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#13 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#14 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#15 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#16 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#17 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#18 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#19 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#20 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#21 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#22 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#23 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#24 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#25 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#26 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#27 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#28 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#29 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#30 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#31 0x00007f5d3e181300 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#32 0x00007f5d3e1814e8 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_disjunction() () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#33 0x00007f5d3e181a21 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_Compiler(char const* const&, char const* const&, std::regex_traits<char>&, unsigned int) ()
   from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#34 0x00007f5d3e181fc8 in std::shared_ptr<std::__detail::_Automaton> std::__detail::__compile<char const*, std::regex_traits<char> >(char const* const&, char const* const&, std::regex_traits<char>&, unsigned int) ()
   from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#35 0x00007f5d3e1825f1 in std::basic_regex<char, std::regex_traits<char> >::basic_regex(char const*, unsigned int) () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#36 0x00007f5d3e082438 in ?? () from /tmp/sdrangel.appimage/squashfs-root/usr/bin/../lib/libsdrbase.so
#37 0x00007f5d3e9af733 in call_init (env=0x7ffd55d821d8, argv=0x7ffd55d821c8, argc=1, l=<optimized out>) at dl-init.c:72
#38 _dl_init (main_map=0x7f5d3ebc8170, argc=1, argv=0x7ffd55d821c8, env=0x7ffd55d821d8) at dl-init.c:119
#39 0x00007f5d3e9a00ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#40 0x0000000000000001 in ?? ()
#41 0x00007ffd55d833b1 in ?? ()
#42 0x0000000000000000 in ?? ()
@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 18, 2018

Let's cc some C++ wizards, @TheAssassin, @azubieta ;)

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 18, 2018

There could be a library mismatch. I see "dist: trusty" in the yml file (i.e. Ubuntu 14.04). If this is actually the case then this is probably a very old version.

Found something interesting here on the provided libsdrbase.so:

objdump -p usr/lib/libsdrbase.so
 ...
Version References:

  required from libgcc_s.so.1:
    0x0b792650 0x00 16 GCC_3.0
  required from libQt5Network.so.5:
    0x00058a25 0x00 09 Qt_5
  required from libm.so.6:
    0x09691a75 0x00 12 GLIBC_2.2.5
    0x06969195 0x00 08 GLIBC_2.15
  required from libc.so.6:
    0x0d696914 0x00 13 GLIBC_2.4
    0x09691a75 0x00 10 GLIBC_2.2.5
    0x06969194 0x00 07 GLIBC_2.14
  required from libstdc++.so.6:
    0x0297f864 0x00 19 GLIBCXX_3.4.14
    0x02297f89 0x00 18 GLIBCXX_3.4.9
    0x0297f869 0x00 17 GLIBCXX_3.4.19
    0x0297f861 0x00 15 GLIBCXX_3.4.11
    0x0297f865 0x00 11 GLIBCXX_3.4.15
    0x056bafd3 0x00 06 CXXABI_1.3
    0x08922974 0x00 05 GLIBCXX_3.4
  required from libQt5Gui.so.5:
    0x00058a25 0x00 04 Qt_5
  required from libQt5Multimedia.so.5:
    0x00058a25 0x00 03 Qt_5
  required from libQt5Core.so.5:
    0x058a2819 0x00 14 Qt_5.9
    0x00058a25 0x00 02 Qt_5
@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 18, 2018

Another trail: if "trusty" is really used then GCC 4.8.2 is used according to Travis documentation and this gcc may not implement std::regex properly.

@TheAssassin

This comment has been minimized.

Copy link

TheAssassin commented Dec 18, 2018

GCC 4.8+ implemented C++11 completely, except for <regex>. Support for that was introduced in GCC 4.9. You cannot use <regex> on Ubuntu trusty. The only way is to use some super outdated packages providing a newer GCC version (e.g., this ubuntu-r-toolchain-something), but they also require a more recent libstdc++, so you break compatibility with trusty anyway. If you need it, I'd recommend to build on some more recent Debian (old)stable, or e.g., xenial.

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 18, 2018

But then it won't run on all still-supported versions of Ubuntu. Which is why we recommend to build on trusty. If we absolutely must use a newer compiler and/or libstdc++ than what comes with trusty, then we need to bundle it and use https://github.com/darealshinji/AppImageKit-checkrt/. I will try that now.

https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages#libstdcso6

@f4exb

This comment has been minimized.

Copy link
Owner

f4exb commented Dec 19, 2018

In fact this issue ahs been already encountered and the main cmake file was updated accordingly:
https://github.com/f4exb/sdrangel/blob/master/CMakeLists.txt#L4

So if you are using it you should not be able to complete the cmake step.

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 31, 2018

Using gcc-8 from ubuntu-r-toolchain-something now: probonopd@4c02f83

@TheAssassin

This comment has been minimized.

Copy link

TheAssassin commented Dec 31, 2018

JFYI: Using any other compiler toolchain also means using a newer libstdc/libstdc++ which means you break compatibility with the system you're on.

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Dec 31, 2018

At least for libstdc++ I am taking care of... how do you do this for libstdc?

@TheAssassin

This comment has been minimized.

Copy link

TheAssassin commented Dec 31, 2018

How would you handle this from libstdc++? Bundle it?

Just build it on xenial... trusty is going EOL in 4 months anyway, it's not worth the effort any more IMO. That was different half a year ago, but now...

@probonopd

This comment has been minimized.

Copy link
Author

probonopd commented Jan 1, 2019

How would you handle this from libstdc++? Bundle it?

  - ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
  - mkdir -p appdir/usr/optional/ ; wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so -O ./appdir/usr/optional/exec.so
  - mkdir -p appdir/usr/optional/libstdc++/ ; cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./appdir/usr/optional/libstdc++/
  - ( cd appdir ; rm AppRun ; wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64 -O AppRun ; chmod a+x AppRun)
  - ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage

Do we need to do a similar thing for libstdc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment