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

Need help building an AppImage for GNU PSPP: execv command not found #130

Open
fusion809 opened this issue Nov 11, 2016 · 10 comments
Open

Comments

@fusion809
Copy link

fusion809 commented Nov 11, 2016

Hi,

I have written this yaml:

app: pspp

ingredients:
  dist:    precise
  package: pspp
  sources:
    - deb http://archive.ubuntu.com/ubuntu/ precise universe
    - deb http://archive.ubuntu.com/ubuntu/ precise-updates universe
  ppas:
    - adamzammit/pspp

script:
  - rm *AppRun
  - cp ../../pspp.AppRun .
  - chmod a+x pspp.AppRun

while it builds fine whenever I run the resulting AppImage I get the error:

execv error: No such file or directory

The pspp.AppRun referenced in the above yaml is this:

#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
export LD_LIBRARY_PATH=${HERE}/usr/lib/x86_64-linux-gnu/:${HERE}/usr/lib/x86_64-linux-gnu/pspp:$HERE/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines:${HERE}/usr/lib/x86_64-linux-gnu/sasl2:$HERE/lib/x86_64-linux-gnu/:$HERE/usr/lib/:${HERE}/lib/:$LD_LIBRARY_PATH
export PATH=${HERE}/usr/sbin:${HERE}/usr/bin:/bin:/sbin:$PATH
"${HERE}"/usr/bin/psppire.wrapper "$@"

This AppRun was needed as without it, it complains that a library present in usr/lib/x86_64-linux-gnu/pspp was not found. Any ideas of how to resolve this issue?

EDIT: There's no point asking for an AppImage from the upstream project as we already know the GNU Project (to which PSPP belongs) does not provide binaries, only source code.

Thanks for your time,
Brenton

@probonopd
Copy link
Member

The following works for me, note that your sources lines were broken again.

app: PSPP
union: true

ingredients:
  dist: precise
  sources:
    - deb http://archive.ubuntu.com/ubuntu/ precise main universe
  ppas:
    - adamzammit/pspp

script:
  - mv usr/lib/x86_64-linux-gnu/pspp/* usr/lib/x86_64-linux-gnu/

@fusion809
Copy link
Author

Thanks it launches OK, but it fails to load several icons giving the error:

/bin/bash: /tmp/.mount_jr4zGC/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash)

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/file-open-data.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/file-open-data.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/file-open-data.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/file-save-data.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/file-save-data.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/file-save-data.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/data-split-file.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/data-split-file.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/data-split-file.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/data-weight-cases.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/data-weight-cases.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/data-weight-cases.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/view-value-labels.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/view-value-labels.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/view-value-labels.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/edit-go-to-variable.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/edit-go-to-variable.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/edit-go-to-variable.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/edit-go-to-case.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/edit-go-to-case.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/edit-go-to-case.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/edit-find.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/edit-find.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/edit-find.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/edit-insert-case.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/edit-insert-case.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/edit-insert-case.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/32x32/edit-insert-variable.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/16x16/edit-insert-variable.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/pspp/actions/24x24/edit-insert-variable.png': Fatal error in PNG image file: bad parameters to zlib

(psppire:4116): Gtk-WARNING **: Allocating size to GtkSeparatorToolItem 0x187cd80 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?

perhaps adding something like:

- mv usr/share/pspp/* usr/share/icons/hicolor/

to the end of the yaml will fix it?

@fusion809
Copy link
Author

Tried it and na. Didn't work.

@probonopd
Copy link
Member

I think we have to add some environment variable to make GTK+ load the icons from inside the AppImage rather than trying to load them from /usr.

@fusion809
Copy link
Author

fusion809 commented Nov 12, 2016

Well I've installed PSPP on my Ubuntu 16.04 installation. Then ran printenv | grep pspp to see if any environment variables associated with this program are set to /usr/share/pspp. And it returned nothing.

@probonopd
Copy link
Member

No I mean an environment variable that tells GTK+ (outside of the AppImage) to load the icons from inside the AppImage...

@fusion809
Copy link
Author

Perhaps XDG_DATA_DIRS? https://developer.gnome.org/gtk2/stable/gtk-running.html

@probonopd
Copy link
Member

Yes, try experimenting with it...

@fusion809
Copy link
Author

fusion809 commented Nov 13, 2016

I did, assuming I was meant to include export XDG_DATA_DIR=$XDG_DATA_DIR:/usr/share/pspp in my AppRun, and I got the execv error I started this issue with. Here is my AppRun:

#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
export LD_LIBRARY_PATH=${HERE}/usr/lib/x86_64-linux-gnu/:$HERE/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines:${HERE}/usr/lib/x86_64-linux-gnu/sasl2:$HERE/lib/x86_64-linux-gnu/:$HERE/usr/lib/:${HERE}/lib/:$LD_LIBRARY_PATH
export PATH=${HERE}/usr/sbin:${HERE}/usr/bin:/bin:/sbin:$PATH
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share/pspp
"${HERE}"/usr/bin/psppire.wrapper "$@"

here is my yaml:

app: pspp
union: true

ingredients:
  dist: precise
  sources:
    - deb http://archive.ubuntu.com/ubuntu/ precise main universe
  ppas:
    - adamzammit/pspp

script:
  - mv usr/lib/x86_64-linux-gnu/pspp/* usr/lib/x86_64-linux-gnu/
  - rm *AppRun
  - cp ../../pspp.AppRun .
  - chmod a+x *AppRun

@probonopd
Copy link
Member

probonopd commented Nov 13, 2016

Why are you putting /usr/share/pspp in there?

But again, we are just guessing here. I am really happy to help if someone who knows about how the software to be packaged works shows up here. Second-guessing other people's software without help from the authors is not something I want to spend my time with; hence I don't like the GNU project because they assume that 3rd parties do that for them.

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