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

gimp: bad interpreter #60937

Closed
jluttine opened this issue May 4, 2019 · 6 comments
Closed

gimp: bad interpreter #60937

jluttine opened this issue May 4, 2019 · 6 comments
Assignees

Comments

@jluttine
Copy link
Member

jluttine commented May 4, 2019

Issue description

I see the following warnings when running gimp:

$ gimp
GIMP-Warning: Bad interpreter referenced in interpreter file /nix/store/0hsy78qmsclkks0v9ykcmvx0wsllwyw8-gimp-with-plugins-2.10.10/lib/gimp/2.0/interpreters/pygimp.interp: python2

GIMP-Warning: Bad binary format string in interpreter file /nix/store/0hsy78qmsclkks0v9ykcmvx0wsllwyw8-gimp-with-plugins-2.10.10/lib/gimp/2.0/interpreters/pygimp.interp

Not sure if they are critical or not. I do have problems with one Python plugin, not sure if this could be related.

Steps to reproduce

Run gimp from the terminal. I'm running it from i3+none desktop environment, if that matters.

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.36, NixOS, 19.09.git.3d081ed (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.2.2`
 - nixpkgs: `/etc/nixpkgs`
@jtojnar
Copy link
Member

jtojnar commented May 6, 2019

I can see the warning too.

This is what the file looks like on Arch:

python=/usr/bin/python2
python2=/usr/bin/python2
/usr/bin/python=/usr/bin/python2
:Python:E::py::python2:

nothing special compared to ours:

python=/nix/store/mb307xgf3x2z6111fkrsqdvh3gf9bk19-python-2.7.16/bin/python2
python2=/nix/store/mb307xgf3x2z6111fkrsqdvh3gf9bk19-python-2.7.16/bin/python2
/usr/bin/python=/nix/store/mb307xgf3x2z6111fkrsqdvh3gf9bk19-python-2.7.16/bin/python2
:Python:E::py::python2:

The file exists and is executable

$ file /nix/store/mb307xgf3x2z6111fkrsqdvh3gf9bk19-python-2.7.16/bin/python2
/nix/store/mb307xgf3x2z6111fkrsqdvh3gf9bk19-python-2.7.16/bin/python2: symbolic link to python2.7
$ file --dereference /nix/store/mb307xgf3x2z6111fkrsqdvh3gf9bk19-python-2.7.16/bin/python2
/nix/store/mb307xgf3x2z6111fkrsqdvh3gf9bk19-python-2.7.16/bin/python2: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/siks2gcfwx6qwh27m7c5r5lixcr621bd-glibc-2.27/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

Not really sure what is wrong. Also the Python scripts seem to work, at least resynthesizer2 does.

@jluttine
Copy link
Member Author

jluttine commented May 7, 2019

For me, resynthesizer runs but it doesn't produce correct results: bootchk/resynthesizer#63

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@jluttine
Copy link
Member Author

jluttine commented Jun 3, 2020

Still important to me. This is the current console output:

GIMP-Warning: Bad interpreter referenced in interpreter file /nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/interpreters/pygimp.interp: python2

GIMP-Warning: Bad binary format string in interpreter file /nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/interpreters/pygimp.interp

Traceback (most recent call last):
  File "/nix/store/3hsppxikcvwhwq1z3bjfjkmjxv97qy91-gimp-2.10.18/lib/gimp/2.0/plug-ins/spyro_plus/.spyro_plus.py-wrapped", line 23, in <module>
    import gimpui
  File "/nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/python/gimpui.py", line 33, in <module>
    import gtk, gobject, gimp, gimpcolor
ImportError: No module named gtk
/nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/bin/.gimp-2.10-wrapped_: LibGimpBase-WARNING: .gimp-2.10-wrapped_: gimp_wire_read(): error
Plug-in "script-fu"
(/nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/plug-ins/script-fu/script-fu) is installing procedure "script-fu-anim-lightning" with a full menu path "<Toolbox>/Xtns/Anim/Lightning" as menu label, this deprecated and will be an error in GIMP 3.0
Plug-in "script-fu"
(/nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/plug-ins/script-fu/script-fu) is installing procedure "script-fu-lightning" with a full menu path "<Toolbox>/Xtns/Patterns/Lightning" as menu label, this deprecated and will be an error in GIMP 3.0

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@neirenoir
Copy link
Contributor

I have found this issue can be fixed by installing the python package by yourself (which is weird: it looks like GIMP may be trying to use the python2 command from your $PATH). I have it in my systemPackages and I got past that stage. However, #87883 is still blocking the usage of some plugins.

@jtojnar
Copy link
Member

jtojnar commented Jul 3, 2020

Spent some time in gdb and it looks like the extension mapping from pygimp.interp file only searches python2 in path, not in the mapping described on previous lines and registered in

But it looks like the check is only a warning and has no bearing on later execution since at the end of gimp_interpreter_db_load, the programs not matched in PATH are resolved in the program mapping database. The extension is not actually inserted to the database so some other mechanism than extension matching must be involved – perhaps shebangs are applied.

We will still want to hardcode the path to ensure purity.

@jtojnar jtojnar self-assigned this Jul 3, 2020
@jtojnar jtojnar closed this as completed in 64ec4fd Jul 5, 2020
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

3 participants