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

Nightingale created from yaml won't play music #132

Closed
darealshinji opened this issue Nov 13, 2016 · 18 comments
Closed

Nightingale created from yaml won't play music #132

darealshinji opened this issue Nov 13, 2016 · 18 comments

Comments

@darealshinji
Copy link
Contributor

Nightingale uses gstreamer. Maybe there are some issues with the plugins and their dependencies not being tracked correctly?

@probonopd
Copy link
Member

Please provide additional information. Which distribution and version are you using? Can you use sudo strace -eopen -f the.AppImage and check for output related to the problem?

@probonopd
Copy link
Member

It won't even let me import a mp3? Is this even AppImage related?

@darealshinji
Copy link
Contributor Author

The AppImage created with this (not very elegant) Recipe is able to play mp3s: https://gist.github.com/darealshinji/abcfffb658f1a801ce12a332809b084b

The gstreamer "ugly" plugins are required for mp3 playback: http://packages.ubuntu.com/trusty/gstreamer0.10-plugins-ugly

@probonopd
Copy link
Member

Isn't gstreamer 0.10 really replaced by 1.0 since a long time? Just curious...

@darealshinji
Copy link
Contributor Author

darealshinji commented Nov 13, 2016

It looks like it isn't available anymore in yakkety, but trusty still has it including all the plugins. xenial lacks some plugins. Unfortunately Nightingale requires gstreamer 0.10.

@darealshinji
Copy link
Contributor Author

darealshinji commented Nov 19, 2016

This script creates a working AppImage for me:

app: Nightingale

ingredients:
  dist: trusty
  sources: 
    - deb http://archive.ubuntu.com/ubuntu/ trusty main universe
  ppas:
    - djcj/nightingale

script:
  - sudo apt-get install -y libglib2.0-bin
  - mv usr/lib/x86_64-linux-gnu/gstreamer-0.10/* usr/lib/nightingale/gst-plugins/
  - rm -rf usr/lib/x86_64-linux-gnu/x264-10bit/ usr/bin/nightingale
  - cat <<\EOF> usr/bin/nightingale
  - #!/bin/sh
  - cd "`dirname "$0"`"
  - export GST_PLUGIN_SCANNER="`pwd`/../lib/x86_64-linux-gnu/gstreamer0.10/gstreamer-0.10/gst-plugin-scanner"
  - "`pwd`/../lib/nightingale/nightingale" $*
  - EOF
  - chmod a+x usr/bin/nightingale

@probonopd
Copy link
Member

Thanks @darealshinji. Getting lots of

(gst-plugin-scanner:12987): GStreamer-WARNING **: Failed to load plugin '/tmp/.mount_WmxjL5/usr/lib/nightingale/gst-plugins/libgst*.so': libgcrypt.so.11: cannot open shared object file: No such file or directory

on the console. Possibly we need to bundle libgcrypt?

@darealshinji
Copy link
Contributor Author

darealshinji commented Nov 19, 2016

Possibly we need to bundle libgcrypt?

I've tried, but I don't know how to do that.

@probonopd
Copy link
Member

Insert the packages like this:

ingredients:
  dist: trusty
  packages:
    - nightingale
    - libgcrypt
  sources: 
    - deb http://archive.ubuntu.com/ubuntu/ trusty main universe
  ppas:
    - djcj/nightingale

@darealshinji
Copy link
Contributor Author

I've added the package libgcrypt11 but I still get the warnings about libgcrypt.so.11 missing.

@probonopd
Copy link
Member

Can you verify that it ended up in the AppDir? Where?

@darealshinji
Copy link
Contributor Author

$ find Nightingale/* -name libgcrypt.so.11*
Nightingale/Nightingale.AppDir/lib/x86_64-linux-gnu/libgcrypt.so.11
Nightingale/Nightingale.AppDir/lib/x86_64-linux-gnu/libgcrypt.so.11.8.2

Is that directory not within the AppImage's library search path?

@probonopd
Copy link
Member

probonopd commented Nov 19, 2016

Should be, but to debug try

  • running with strace -eopen -f ./AppRun and watch the output
  • running with LD_DEBUG=libs ./AppRun and watch the output
  • moving the lib to $APPDIR/usr/lib/ and retry

@darealshinji
Copy link
Contributor Author

I did some checks and came to the conclusion that apparently some dependencies are loaded from the host system rather than from the AppImage.
It shows this warning: Failed to load plugin '/tmp/.mount_H8c1XW/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstlv2.so': /usr/lib/x86_64-linux-gnu/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n
libhogweed.so.4 is not available on Ubuntu 14.04, only libhogweed.so.2.

Here's my current script:

app: Nightingale

ingredients:
  packages:
    - nightingale
    - libcurl3-gnutls
    - libhogweed2
  dist: trusty
  sources: 
    - deb http://archive.ubuntu.com/ubuntu/ trusty main universe
  ppas:
    - djcj/nightingale

script:
  - sudo apt-get install -y libglib2.0-bin
  - rm -rf usr/lib/x86_64-linux-gnu/x264-10bit/ usr/bin/nightingale
  - cat <<\EOF> usr/bin/nightingale
  - #!/bin/sh
  - usr="`pwd`"
  - export LD_LIBRARY_PATH="$usr/lib/nightingale/xulrunner:$LD_LIBRARY_PATH"
  - export GST_PLUGIN_PATH="$usr/lib/x86_64-linux-gnu/gstreamer-0.10:$usr/lib/nightingale/gst-plugins"
  - export GST_PLUGIN_SCANNER="$usr/lib/x86_64-linux-gnu/gstreamer0.10/gstreamer-0.10/gst-plugin-scanner"
  - "$usr/lib/nightingale/nightingale-bin" $*
  - EOF
  - chmod a+x usr/bin/nightingale

@probonopd
Copy link
Member

libhogweed.so.4 is not available on Ubuntu 14.04, only libhogweed.so.2.

This means what, that the ppa packaging is broken?

@darealshinji
Copy link
Contributor Author

The gstreamer plugins aren't build in my PPA. But I've fixed it. The packages libcurl3-gnutls and libhogweed2 are dependencies of the troublesome plugins, but they're not installed with the gstreamer packages.
Here's my new script:

app: Nightingale

ingredients:
  packages:
    - nightingale
    - libcurl3-gnutls
    - libhogweed2
  dist: trusty
  sources: 
    - deb http://archive.ubuntu.com/ubuntu/ trusty main universe
  ppas:
    - djcj/nightingale

script:
  - sudo apt-get install -y libglib2.0-bin
  - rm -rf usr/lib/x86_64-linux-gnu/x264-10bit/ usr/bin/nightingale
  - cat <<\EOF> usr/bin/nightingale
  - #!/bin/sh
  - usr="`pwd`"
  - export LD_LIBRARY_PATH="$usr/lib/nightingale/xulrunner:$LD_LIBRARY_PATH"
  - export GST_PLUGIN_PATH="$usr/lib/x86_64-linux-gnu/gstreamer-0.10:$usr/lib/nightingale/gst-plugins"
  - export GST_PLUGIN_SCANNER="$usr/lib/x86_64-linux-gnu/gstreamer0.10/gstreamer-0.10/gst-plugin-scanner"
  - "$usr/lib/nightingale/nightingale-bin" $*
  - EOF
  - chmod a+x usr/bin/nightingale

Now I'm also starting nightingale-bin directly instead of its wrapper script.

@darealshinji
Copy link
Contributor Author

Should I open a pull request?

@probonopd
Copy link
Member

Yes please. 👍

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

No branches or pull requests

2 participants