Discussion:
segfault while building gimp
Add Reply
Riccardo Mottola via macports-users
2018-11-23 07:28:09 UTC
Reply
Permalink
Hi,

I am trying to build gimp 2.10 on Leopard!
I did some further backports in gtk3 that could be enough. The main
issue is that the native file chooser is heavily 10.6 stuff dependent,
for now I tried to disable it, maybe better things can be done, but I
don't think they should cause the issue below.

Why the surge? other than "the sake of it" it is an issue with gegl,
since 2.8 depends on 0.2 and now we have 0.4

Anyway, gtk3 "installed", that's something. All the other dependencies
too.
I had to manually install gtk-doc, or gtk3 would not build/install,
but I have seen on track a similar bug and worked around this way for
now.

I think gimp largely built (yay!) however, I do get this:

mkdir -p 24 && \
../../tools/invert-svg ../../icons/Symbolic/24/gimp-warning.svg
24/gimp-warning.svg
mkdir -p 24 && \
../../tools/invert-svg ../../icons/Symbolic/24/gimp-web.svg
24/gimp-web.svg
mkdir -p 24 && \
../../tools/invert-svg ../../icons/Symbolic/24/gimp-wilber.svg
24/gimp-wilber.svg
mkdir -p `dirname 64/gimp-error.png`; GEGL_USE_OPENCL=no GEGL_SWAP=ram
/opt/local/bin/gegl-0.4 ../../icons/Symbolic/64/gimp-error.png -o
64/gimp-error.png -- gegl:invert-gamma
/bin/sh: line 1: 52971 Bus error GEGL_USE_OPENCL=no
GEGL_SWAP=ram /opt/local/bin/gegl-0.4
../../icons/Symbolic/64/gimp-error.png -o 64/gimp-error.png --
gegl:invert-gamma
make[3]: *** [64/gimp-error.png] Error 138
make[3]: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.8/icons/Symbolic-Inverted'
make[2]: *** [all-recursive] Error 1



"what" is segfaulting here??? it looks almost a shell tool si dying!
I would open a bug, but I don't know what is the issue here.


Riccardo
Ken Cunningham
2018-11-23 07:55:24 UTC
Reply
Permalink
When this happens, you need to go manually.

Go into the directory where the issue occurred:

cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.8/icons/Symbolic-Inverted

and run the command manually, using sudo (or change the permissions on everything:

GEGL_USE_OPENCL=no GEGL_SWAP=ram /opt/local/bin/gegl-0.4 ../../icons/Symbolic/64/gimp-error.png -o 64/gimp-error.png -- gegl:invert-gamma


and if it segfaults, start breaking it down, eg just run:

/opt/local/bin/gegl-0.4

and see what happens. You'll usually get the error soonish.

K
Post by Riccardo Mottola via macports-users
Hi,
I am trying to build gimp 2.10 on Leopard!
I did some further backports in gtk3 that could be enough. The main issue is that the native file chooser is heavily 10.6 stuff dependent, for now I tried to disable it, maybe better things can be done, but I don't think they should cause the issue below.
Why the surge? other than "the sake of it" it is an issue with gegl, since 2.8 depends on 0.2 and now we have 0.4
Anyway, gtk3 "installed", that's something. All the other dependencies too.
I had to manually install gtk-doc, or gtk3 would not build/install, but I have seen on track a similar bug and worked around this way for now.
mkdir -p 24 && \
../../tools/invert-svg ../../icons/Symbolic/24/gimp-warning.svg 24/gimp-warning.svg
mkdir -p 24 && \
../../tools/invert-svg ../../icons/Symbolic/24/gimp-web.svg 24/gimp-web.svg
mkdir -p 24 && \
../../tools/invert-svg ../../icons/Symbolic/24/gimp-wilber.svg 24/gimp-wilber.svg
mkdir -p `dirname 64/gimp-error.png`; GEGL_USE_OPENCL=no GEGL_SWAP=ram /opt/local/bin/gegl-0.4 ../../icons/Symbolic/64/gimp-error.png -o 64/gimp-error.png -- gegl:invert-gamma
/bin/sh: line 1: 52971 Bus error GEGL_USE_OPENCL=no GEGL_SWAP=ram /opt/local/bin/gegl-0.4 ../../icons/Symbolic/64/gimp-error.png -o 64/gimp-error.png -- gegl:invert-gamma
make[3]: *** [64/gimp-error.png] Error 138
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.8/icons/Symbolic-Inverted'
make[2]: *** [all-recursive] Error 1
"what" is segfaulting here??? it looks almost a shell tool si dying!
I would open a bug, but I don't know what is the issue here.
Riccardo
Riccardo Mottola via macports-users
2018-11-26 09:26:43 UTC
Reply
Permalink
Hi,

I think the issue is in GEGL...

On 2018-11-23 08:55:24 +0100 Ken Cunningham
Post by Ken Cunningham
When this happens, you need to go manually.
cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.8/icons/Symbolic-Inverted
and run the command manually, using sudo (or change the permissions
on
It segfaults. I copied the said icon on the desktop and started
testing:

Koreander:Desktop multix$ GEGL_USE_OPENCL=no GEGL_SWAP=ram
/opt/local/bin/gegl-0.4 gimp-error.png -o test.png --
gegl:invert-gamma
Bus error
Koreander:Desktop multix$ GEGL_USE_OPENCL=no /opt/local/bin/gegl-0.4
gimp-error.png -o test.png -- gegl:invert-gammaBus error
Koreander:Desktop multix$ /opt/local/bin/gegl-0.4 gimp-error.png -o
test.png -- gegl:invert-gamma
Bus error


just running gegl, works. so it is the operation that causes issues.

I tried running it in ggdb and get this:

Program received signal SIGBUS, Bus error.
0x95267e10 in strlen () from /usr/lib/libSystem.B.dylib
(gdb) bt
#0 0x95267e10 in strlen () from /usr/lib/libSystem.B.dylib
#1 0x9528a649 in realpath$DARWIN_EXTSN () from
/usr/lib/libSystem.B.dylib
#2 0x000051cd in main ()


There is no debug info, but a crash in strlen never looks nice.
Perhaps only some messed up parameter, but it is bad.


Riccardo
Ken Cunningham
2018-11-26 16:42:26 UTC
Reply
Permalink
Post by Riccardo Mottola via macports-users
Hi,
I think the issue is in GEGL...
Program received signal SIGBUS, Bus error.
0x95267e10 in strlen () from /usr/lib/libSystem.B.dylib
(gdb) bt
#0 0x95267e10 in strlen () from /usr/lib/libSystem.B.dylib
#1 0x9528a649 in realpath$DARWIN_EXTSN () from /usr/lib/libSystem.B.dylib
#2 0x000051cd in main ()
This error looks similar, if not completely identical:

<https://gitlab.gnome.org/GNOME/gegl/issues/75>

I think your fix will be on that site, anyway. Some error in gegl on Darwin.

K
Riccardo Mottola via macports-users
2018-11-30 15:18:38 UTC
Reply
Permalink
Hi,
Post by Ken Cunningham
<https://gitlab.gnome.org/GNOME/gegl/issues/75>
I think your fix will be on that site, anyway. Some error in gegl on Darwin.
the error looks similar, although the stacktrace is totally different.

There is a commit mentioned, but that commit is already present in our
0.4.12 so it doesn't help or is not the issue.
Also there is no follow-up if that fix really helped or not, it appears
to be done without verification.

To be sure, I recompiled gegl myself by backing out the patch and get
the same issue. So, with or without I get the same.

Could you try? maybe also on different architectures.

I'm eager to fix this, since I want to test my gtk3 patches that got
gtk3 to compile on 10.5 :)

Riccardo

Loading...