Emerging gimp-9999 (once libmypaint-9999 is installed, see bug #) dangerously fails: /usr/bin/gegl-0.3 -x \ "<gegl> \ <node operation='gegl:invert-linear'></node> \ <node operation='gegl:load'> \ <params> \ <param name='path'>../../icons/Symbolic/12/gimp-quick-mask-on.png</param> \ </params> \ </node> \ </gegl>" -o 12/gimp-quick-mask-on.png * ACCESS DENIED: open_wr: /dev/nvidiactl * ISE:write_logfile: unable to append logfile: /var/log/sandbox/sandbox-10319.log * ../../sandbox-2.6/libsandbox/libsandbox.c:check_syscall():879: failure (Bad file descriptor): * ISE: abs_path: /dev/nvidiactl res_path: /dev/nvidiactl /usr/lib64/libsandbox.so(+0xbad1)[0x7ff1a755aad1] /usr/lib64/libsandbox.so(+0xbbc8)[0x7ff1a755abc8] /usr/lib64/libsandbox.so(+0x591a)[0x7ff1a755491a] /usr/lib64/libsandbox.so(open64+0x6c)[0x7ff1a755977c] /usr/lib64/libnvidia-opencl.so.1(+0x172138)[0x7ff1a3300138] /usr/lib64/libnvidia-opencl.so.1(+0x2bfab9)[0x7ff1a344dab9] /usr/lib64/libnvidia-opencl.so.1(+0x2c3b08)[0x7ff1a3451b08] /usr/lib64/libnvidia-opencl.so.1(+0x2c3b85)[0x7ff1a3451b85] /usr/lib64/libnvidia-opencl.so.1(+0x20cfe6)[0x7ff1a339afe6] /usr/lib64/libnvidia-opencl.so.1(+0x13b0ad)[0x7ff1a32c90ad] /proc/10500/cmdline: /usr/bin/gegl-0.3 -x <gegl> <node operation='gegl:invert-linear'></node> <node operation='gegl:load'> <params> <param name='path'>../../icons/Symbolic/12/gimp-menu-right.png</param> </params> </node> </gegl> -o 12/gimp-menu-right.png Makefile:1358: recipe for target '12/gimp-menu-right.png' failed make[3]: *** [12/gimp-menu-right.png] Aborted See the full emerge log: https://bpaste.net/raw/dd9feeaa9dc2 Reproducible: Always
That should have been: see bug 569548.
I don't get the /dev/nvidiactl thing here; I have an Intel card, if that matters.
Sebastien you used =media-libs/gegl-9999 and =media-gfx/gimp-9999 both from portage? And what about mypaint and libmypaint, which versions did you emerge and did you use my libmypaint ebuild without changes? If you made changes, could you upload yours to bug 569548?
I was advised to try USE="-test" or FEATURES="-sandbox". I tried both, neither worked. I found that when I "eselect opencl set nvidia" then I get the above failure. When I "eselect opencl set mesa" then compilation succeeds! I'm using: virtual/opencl-0-r4 app-eselect/eselect-opencl-1.1.0-r3 x11-drivers/nvidia-drivers-340.96 (I cannot go above 340 because the newer drivers don't support my GTX 285M (G92)) media-libs/mesa-11.1.0 app-eselect/eselect-mesa-0.0.10
easiest workaround is to addpredict /dev/nvidiactl.
addpredict may not be an option if GEGL is writing to /dev/nvidiactl have the graphics card process image data for us (but I cannot try without an NVidia card). DrSlony, could you try and report back which of these three approaches work when inserting to the Gimp 9999 ebuild, in order? You can stop at the first that works. a) addpredict src_compile() { addwrite /dev/nvidiactl gnome2_src_compile } b) addwrite only src_compile() { addwrite /dev/nvidiactl gnome2_src_compile } c) addwrite + addread src_compile() { addwrite /dev/nvidiactl addread /dev/nvidiactl gnome2_src_compile } Thanks in advance! PS: https://devmanual.gentoo.org/function-reference/sandbox-functions/index.html
I switched eselect opencl back to nvidia and tried option a. I inserted your code between src_test() and src_install(). It compiled and runs well.
(In reply to DrSlony from comment #7) > I switched eselect opencl back to nvidia and tried option a. I inserted your > code between src_test() and src_install(). It compiled and runs well. Excellent, thanks for testing! # git show --stat | sed 's,@gentoo.org,@g.o,' commit 6cef344c45b249d0ab3044b572306ec4db431159 Author: Sebastian Pipping <sping@g.o> Date: Thu Dec 31 19:46:50 2015 +0100 media-gfx/gimp: Fix compile for NVidia OpenCL (bug #569738) Package-Manager: portage-2.2.26 media-gfx/gimp/gimp-9999.ebuild | 5 +++++ 1 file changed, 5 insertions(+)
Thank you.
I emerged gegl and babl, then I tried to emerge gimp from portage (all 9999), but gimp failed: /bin/sh: line 1: 9962 Illegal instruction /usr/bin/gegl-0.3 -x "<gegl> <node operation='gegl:invert-linear'></node> <node operation='gegl:load'> <params> <param name='path'>../../icons/Symbolic/12/gimp-quick-mask-on.png</param> </params> </node> </gegl>" -o 12/gimp-quick-mask-on.png Makefile:1531: recipe for target '12/gimp-quick-mask-on.png' failed make[3]: *** [12/gimp-quick-mask-on.png] Error 132 Full build log: https://bpaste.net/show/f33fa265aae8 Note that these messages also appeared when I emerged my gimp-9999 ebuild before the 2015-12-31 commit, and despite them the compilation succeeded: HMM.... Something strange is happening, malloc and free function pointer changing between invocations in babl.
And I get this regardless of the eselect opencl setting.
If it does not involve /dev/nvidiactl, it seems like a new/different bug to me. If it is a different thing, let's not use the same bug report for it. This looks like a problem with gegl and/or babl to me.
You're right. I tried to rebuild now using -j1 and saw no reference to the previous error. I've opened a new report - bug 570622.
in my case /dev/nvidia0 is accessed instead of nvidiactl ... F: open_wr S: deny P: /dev/nvidia0 A: /dev/nvidia0 R: /dev/nvidia0 C: /usr/bin/gegl-0.3 ../../icons/Symbolic/48/gimp-prefs-session.png -o 48/gimp-prefs-session.png -- gegl:invert-gamma ... might be related to intel/nvidia offloading configuration // addwrite /dev/nvidia0 works for me.
Thanks for the report, fixed in git hopefully. Else, please re-open. commit 6fd9d728213574d0757df3a2f7bc4d2548434811 Author: Sebastian Pipping <sping@g.o> Date: Wed Jul 20 19:07:14 2016 +0200 media-gfx/gimp: Graphics device access (bug #569738, #589198) Package-Manager: portage-2.2.28 media-gfx/gimp/gimp-2.9.2-r2.ebuild | 3 +++ media-gfx/gimp/gimp-2.9.4.ebuild | 3 +++ media-gfx/gimp/gimp-9999.ebuild | 3 +++ 3 files changed, 9 insertions(+) https://github.com/gentoo/gentoo/commit/6fd9d728213574d0757df3a2f7bc4d2548434811
Created attachment 446148 [details] build error w/ two nvidia cards This fails if more than one nvidia cards are present >>> Compiling source in /var/tmp/portage/media-gfx/gimp-2.9.4/work/gimp-2.9.4 ... * ERROR: media-gfx/gimp-2.9.4::gentoo failed (compile phase): * Usage: addwrite <colon-delimited list of paths> * * Call stack: * ebuild.sh, line 115: Called src_compile * environment, line 4473: Called addwrite '/dev/nvidia0' '/dev/nvidia1' * ebuild.sh, line 145: Called __sb_append_var 'WRITE' '/dev/nvidia0' '/dev/nvidia1' * ebuild.sh, line 138: Called die * The specific snippet of code: * [[ -z $1 || -n $2 ]] && die "Usage: add$(LC_ALL=C tr "[:upper:]" "[:lower:]" <<< "${_v}") <colon-delimited list of paths>" *
The [ -e ... ] avoids a call to `addwrite /dev/nvidia[0-9]` and other non-existent files if the shell expansion doesn't match. It still doesn't support more than ten cards, but well .. --- a/media-gfx/gimp/gimp-2.9.4.ebuild +++ b/media-gfx/gimp/gimp-2.9.4.ebuild @@ -132,9 +132,11 @@ src_configure() { } src_compile() { - addwrite /dev/nvidiactl # bug #569738 - addwrite /dev/nvidia? # bug #569738 - addwrite /dev/nvidia-uvm # bug #591214 + #bugs #569738 and #591214 + local nv + for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia[0-9] ; do + [ -e $nv ] && addwrite $nv + done addwrite /dev/dri/ # bug #574038 addwrite /dev/ati/ # bug 589198 addwrite /proc/mtrr # bug 589198
Fixed as proposed by Michael. Please re-open as needed. commit 88cfe3aff7ddd01e66272436bb1eee86280c8ef0 Author: Sebastian Pipping <sping@g.o> Date: Sun Sep 18 15:54:51 2016 +0200 media-gfx/gimp: Graphics device access (bug #569738) Package-Manager: portage-2.3.0 media-gfx/gimp/gimp-2.9.2-r2.ebuild | 8 +++++--- media-gfx/gimp/gimp-2.9.4.ebuild | 8 +++++--- media-gfx/gimp/gimp-9999.ebuild | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) https://github.com/gentoo/gentoo/commit/88cfe3aff7ddd01e66272436bb1eee86280c8ef0
Exactly the same problem surfaced in media-gfx/gimp-2.9.4-r1 Should I create a new bug or this comment is enough? many instances of F: open_wr S: deny P: /dev/nvidiactl A: /dev/nvidiactl R: /dev/nvidiactl C: /usr/bin/gegl-0.3 ../../icons/Symbolic/12/gimp-visible.png -o 12/gimp-visible.png -- gegl:invert-gamma in /var/log/sandbox.log
(In reply to Anton Gubarkov from comment #19) > Exactly the same problem surfaced in media-gfx/gimp-2.9.4-r1 > Should I create a new bug or this comment is enough? I adjusted the subject to no longer be about specific versions. > many instances of > F: open_wr > S: deny > P: /dev/nvidiactl > A: /dev/nvidiactl > R: /dev/nvidiactl > C: /usr/bin/gegl-0.3 ../../icons/Symbolic/12/gimp-visible.png -o > 12/gimp-visible.png -- gegl:invert-gamma > in /var/log/sandbox.log I'm surprised you have it for /dev/nvidiactl as we unlock access to that if existing already. Could you check if [[ -e /dev/nvidiactl ]] && echo found || echo missing prints "found"? If not we may need to rethink use of "-e" in the ebuild.
very funny... My nvidia is optimus geforce 730 and I run bumblebee to save battery. When I started my build there was no nvidia kernel module loaded - so no /dev/nvidiactl, that's why write-enabling in the build scipt did nothing. When gegl starts during the build, it loads nvidia kernel module, /dev/nvidiactl appears, but sandbox blocks any write to it. I forced loading of nvidia kernel module and started the build. It completed successfully. I'm not sure if the script should take such a config into account, but it would be nice. Thanks for the hint.
Sorry, it tooks so long to react. I hope it's fixed now. Else, please re-open. commit 05307e4b2c199686722c7d7c89fa4018339fbf83 Author: Sebastian Pipping <sping@g.o> Date: Sun Dec 4 20:28:08 2016 +0100 media-gfx/gimp: Remove guard to addwrite (bug #569738 comment 21) Package-Manager: portage-2.3.2 media-gfx/gimp/gimp-2.9.2-r2.ebuild | 6 ++++-- media-gfx/gimp/gimp-2.9.4-r1.ebuild | 6 ++++-- media-gfx/gimp/gimp-9999.ebuild | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) https://github.com/gentoo/gentoo/commit/05307e4b2c199686722c7d7c89fa4018339fbf83
*** Bug 597718 has been marked as a duplicate of this bug. ***
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8690bda2925e84c4317a70713e873987cb235ea0 commit 8690bda2925e84c4317a70713e873987cb235ea0 Author: Sergey Torokhov <torokhov-s-a@yandex.ru> AuthorDate: 2025-04-02 18:32:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-04-03 20:56:48 +0000 media-gfx/gimp: 3.0.2 remove sandbox adjustment It seems issues below aren't reprodusable for media-gfx/gimp:3 Bug: https://bugs.gentoo.org/569738 Bug: https://bugs.gentoo.org/574038 Bug: https://bugs.gentoo.org/589198 Bug: https://bugs.gentoo.org/591214 Bug: https://bugs.gentoo.org/684886 Thanks-to: sin-ack <sin-ack@protonmail.com> Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru> Signed-off-by: Sam James <sam@gentoo.org> media-gfx/gimp/gimp-3.0.2.ebuild | 16 ---------------- 1 file changed, 16 deletions(-)