Skip to content
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

How to use this? #1

Closed
vadi2 opened this issue Jun 25, 2017 · 5 comments
Closed

How to use this? #1

vadi2 opened this issue Jun 25, 2017 · 5 comments
Assignees

Comments

@vadi2
Copy link

vadi2 commented Jun 25, 2017

It's not immediately obvious how to actually use this in conjunction with linuxdeployqt.AppImage to make an AppImage that works with a newer libstdc++ version.

@darealshinji
Copy link
Owner

darealshinji commented Jun 25, 2017

Inside the AppDir create a directory usr/optional/libstdc++ and place the libstdc++.so.6 library inside. Then replace the AppRun binary with the patched one from the release section.

If you used gcc compiled from source you'll have to add the stdc++ library from that compiler version.

I should probably add a better description on how to do that.

@darealshinji
Copy link
Owner

By the way if you want to build an AppImage using a .yml file here's an example on how to make use of the patched AppRun binary:

app: Aegisub

ingredients:
  packages:
    #- aegisub-l10n  # localisation doesn't work (requires patching the source)
  dist: stable
  sources:
    - deb http://ftp.debian.org/debian/ stable main universe

script:
  - DEB=libstdc++6_6.3.0-18_amd64.deb
  - wget -O ../$DEB -c "http://ftp.debian.org/debian/pool/main/g/gcc-6/$DEB"
  - dpkg-deb -x ../$DEB .
  - mkdir -p ./usr/optional/libstdc++
  - mv ./usr/lib/x86_64-linux-gnu/libstdc++.so.6* ./usr/optional/libstdc++
  - find ./usr -name libstdc++.so.6*-gdb.py -delete
  - rm -rf ./AppRun ./usr/lib/x86_64-linux-gnu/x264-10bit
  - wget -O AppRun "https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64"
  - chmod a+x AppRun

@probonopd
Copy link

probonopd commented Mar 3, 2018

I think it would still be useful for people to see a real-world example on how to use this, e.g., with linuxdeployqt, in the README.md.

Here is an example where I am using it:

https://github.com/probonopd/audacity/blob/AppImage/.travis.yml

The key lines are:

  - # Workaround to increase compatibility with older systems; see https://github.com/darealshinji/AppImageKit-checkrt for details
  - 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)
...
  - # Manually invoke appimagetool so that libstdc++ gets bundled and the modified AppRun stays intact
  - ./linuxdeployqt*.AppImage --appimage-extract
  - export PATH=$(readlink -f ./squashfs-root/usr/bin):$PATH
  - ./squashfs-root/usr/bin/appimagetool -g ./appdir/ $NAME-$VERSION-x86_64.AppImage

@darealshinji
Copy link
Owner

Thanks for the example. I'm looking forward to update the README.md in the next time. However, a pull request is always welcome. ;-)

@probonopd
Copy link

probonopd commented Dec 15, 2018

Thanks to probonopd/linuxdeployqt@600fc20

it is no longer needed to extract the linuxdeployqt AppImage since it is no longer replacing a pre-existing AppRun file. So we can shorten the procedure to:

  # ./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

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

No branches or pull requests

3 participants