You are not logged in.

#1 2016-09-27 01:54:41

tokineko
Member
Registered: 2016-09-27
Posts: 4

[SOLVED] gimp-cce-git can be built, but it hangs when I execute it.

gimp-cce is a variant of gimp that fixes lots of ICC color management issues.

Initially, I wrote the following PKGBUILD according to the instructions on http://ninedegreesbelow.com/photography … tists.html

# Maintainer: tokigami.kineko <>
pkgname=gimp-cce-bundle-git
pkgver=r37634.c5a635b
pkgrel=1
pkgdesc="GIMP-CCE maintained by elle stone"
arch=('i686' 'x86_64')
url="https://github.com/ellelstone/gimp"
license=('GPL')
groups=()
depends=('pygtk' 'lcms2>=2.2' 'libwmf>=0.2.8' 'webkitgtk2>=1.6.1'
        'libgexiv2' 'librsvg>=2.16.1' 'desktop-file-utils'
        'libexif>=0.6.15' 'libart-lgpl>=2.3.19' 'dbus-glib' 'gtk-doc'
        # babl
        'glibc'
        # gegl
        'libspiro' 'json-glib'
        # libmypaint
        'gobject-introspection' 'json-c')
makedepends=('git' 'gutenprint>=5.0.0' 'intltool>=0.40.1'
             'gnome-python>=2.16.2' 'poppler>=0.12.4'
             'alsa-lib>=1.0.0' 'libxslt'
             # gegl
             'python2' 'ruby' 'lua' 'libraw' 'openexr' 'ffmpeg'
             'librsvg' 'jasper' 'libtiff' 'suitesparse'
             # libmypaint
             'python')
optdepends=('gutenprint: for sophisticated printing only as gimp has built-in cups print support'
            'poppler-glib: for pdf support'
            'alsa-lib: for MIDI event controller module'
            'curl: for URI support'
            'ghostscript: for postscript support'
            # gegl
            'openexr: for using the openexr plugin'
            'ffmpeg: for using the ffmpeg plugin'
            'librsvg: for using the svg plugin'
            'libtiff: tiff plugin'
            'jasper: for using the jasper plugin'
            'libraw: raw plugin'
            'suitesparse: matting-levin plugin'
            'lua: lua plugin')
provides=()
conflicts=()
replaces=()
backup=()
options=(!strip)
install=
source=('git+https://github.com/ellelstone/babl'
        'git+https://github.com/ellelstone/gegl'
        'git+https://github.com/mypaint/libmypaint.git'
        'git+https://github.com/ellelstone/gimp')
noextract=()
md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')

pkgver() {
    cd "$srcdir/gimp"
    printf "r%s.%s" "$(git rev-list --count HEAD)" \
           "$(git rev-parse --short HEAD)"
}

build() {
    BUILD="$srcdir/build"
    PREFIX="$BUILD/usr/gimp-cce"
    case "$CARCH" in
        i686) LIB=lib;;
        x86_64) LIB=lib64;;
        *) echo "Unknown architecture : $CARCH"; exit 1
    esac
    export LD_LIBRARY_PATH=$PREFIX/$LIB:$LD_LIBRARY_PATH
    export PATH=$PREFIX/bin:$PATH
    export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
    export PKG_CONFIG_PATH=$PREFIX/$LIB/pkgconfig:$PKG_CONFIG_PATH

    cd $srcdir/babl
    ./autogen.sh --prefix=$PREFIX --enable-mmx=no --enable-sse=no \
                 --enable-sse2=no --enable-sse4_1=no --enable-f16c=no \
                 --enable-altivec=no --disable-docs --libdir=$PREFIX/$LIB
    make
    make install

    cd $srcdir/gegl
    ./autogen.sh --prefix=$PREFIX --disable-docs --enable-gtk-doc=no \
                 --enable-gtk-doc-html=no --enable-gtk-doc-pdf=no \
                 --enable-workshop --without-libv4l2 --without-libavformat \
                 --without-sdl --libdir=$PREFIX/$LIB
    make
    make install

    cd $srcdir/libmypaint
    ./autogen.sh
    ./configure --prefix=$PREFIX --libdir=$PREFIX/$LIB
    make
    make install

    cd $srcdir/gimp
    ./autogen.sh --prefix=$PREFIX --disable-gtk-doc \
                 --with-gimpdir=$PREFIX/config --libdir=$PREFIX/$LIB \
                 --enable-debug=yes
    make
    make install

    exit 1
}

package() {
    cd $srcdir/gimp
    env DESTDIR="$pkgdir" make install

    case "$CARCH" in
        i686) LIB=lib;;
        x86_64) LIB=lib64;;
        *) echo "Unknown architecture : $CARCH"; exit 1
    esac

    # Create directories
    mkdir -p $pkgdir/usr/bin $pkgdir/usr/share/applications
    # Make /usr/bin/gimp-cce
    sed "s/@LIB/$LIB/" $startdir/gimp-cce > $pkgdir/usr/bin/gimp-cce
    chmod 755 $pkgdir/usr/bin/gimp-cce
    # Create /usr/share/applications/gimp-cce.desktop from
    # /usr/gimp-cce/share/applications/gimp.desktop
    sed -e "s/^Name\([^=]*\)=.*$/Name\1=GIMP-CCE/" \
        -e "s/^Icon=.*$/Icon=gimp-cce/" \
        -e "s/^Exec=.*$/Exec=gimp-cce %U/" \
        -e "s/^TryExec=.*$/TryExec=gimp-cce/" \
        $pkgdir/usr/gimp-cce/share/applications/gimp.desktop \
        > $pkgdir/usr/share/applications/gimp-cce.desktop
    # rename gimp.png to gimp-cce.png in /usr/gimp-cce/share/icons
    find $pkgdir/usr/gimp-cce/share/icons -type f \
         -exec rename gimp gimp-cce {} \;
    # copy /usr/gimp-cce/share/icons to /usr/share/icons
    cp -r $pkgdir/usr/gimp-cce/share/icons $pkgdir/usr/share
}

# vim:set ts=2 sw=2 et:

Basically, it just builds babl, gegl, libmypaint, and gimp-cce into $srcdir/build and exits before packaging starts.
After building it, if I executed $srcdir/build/usr/gimp-cce/bin/gimp-2.9, gimp-cce would execute and work without errors.

But, if I moved the build out of $srcdir/build, everything failed. Thus, I had to split it into 4 AUR packages.
https://aur.archlinux.org/cgit/aur.git/ … bl-cce-git
https://aur.archlinux.org/cgit/aur.git/ … gl-cce-git
https://aur.archlinux.org/cgit/aur.git/ … nt-cce-git
https://aur.archlinux.org/cgit/aur.git/ … mp-cce-git

Those 4 packages can be built somehow, but when I execute /usr/bin/gimp-cce, I only see a blank dialog named "GIMP User Installation".
GIMP hangs with that dialog forever, and the GIMP process occupies 100% of a CPU core until I kill it.

Why does GIMP-CCE work without a problem if everything is built in one PKGBUILD and fail miserably if it was built in 4 PKGBUILD files?
Can anyone help debug this issue? I tried troubleshooting this issue for 3 days, and I just don't know what is wrong.
Your help will be greatly appreciated.

Last edited by tokineko (2016-09-28 03:05:16)

Offline

#2 2016-09-27 15:24:34

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [SOLVED] gimp-cce-git can be built, but it hangs when I execute it.

Looks like those build instructions are meant for building/installing and running as user , not for a systemwide installation .

AUR has babl-git, gegl-git and libmypaint-git packages, maybe you can use those?

Then you only need to write the gimp-cce-git package and can use the official gimp package as a starting point.

Last edited by Lone_Wolf (2016-09-27 15:25:01)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2016-09-28 01:31:23

tokineko
Member
Registered: 2016-09-27
Posts: 4

Re: [SOLVED] gimp-cce-git can be built, but it hangs when I execute it.

Lone_Wolf wrote:

Looks like those build instructions are meant for building/installing and running as user , not for a systemwide installation .

AUR has babl-git, gegl-git and libmypaint-git packages, maybe you can use those?

Then you only need to write the gimp-cce-git package and can use the official gimp package as a starting point.

Those build instructions aren't especialy meant for installing and running as a user. Elle stone merely doesn't want to deal with packaging systems.
Thus, it is more appropriate to say that the build instructions aren't tested with any packaging system.

babl-git and gegl-git aren't compatible with gimp-cce because gimp-cce relies on modifications elle stone made in babl and gegl.
She maintains https://github.com/ellelstone/babl and https://github.com/ellelstone/gegl

elle stone doesn't maintain a variant of libmypaint-git, but libmypaint-git is dependent on https://github.com/ellelstone/gegl.
Thus, I had to upload libmypaint-cce-git, too.

If you compare gimp-cce-git and gimp-git, there is not much difference other than different PREFIXes and some configure options.

Last edited by tokineko (2016-09-28 01:39:58)

Offline

#4 2016-09-28 02:59:05

tokineko
Member
Registered: 2016-09-27
Posts: 4

Re: [SOLVED] gimp-cce-git can be built, but it hangs when I execute it.

When I executed /usr/gimp-cce/bin/gimp-console-2.9 without expecting much, I got the following terminal output.

This is a development version of GIMP.  Debug messages may appear here.

error: Cannot create folder '/usr/gimp-cce/config': Permission denied
Failed to parse tag cache: No such file or directory
GIMP-CCE-Error: Error opening file '/usr/gimp-cce/config/pluginrc': No such file or directory

Since /usr/gimp-cce/bin/gimp-2.9 didn't say error: Cannot create folder '/usr/gimp-cce/config': Permission denied, I was unaware of this issue.

I almost immediately recognized that /usr/gimp-cce/config was --with-gimpdir=$PREFIX/config from gimp-cce-git's PKGBUILD. After changing, --with-gimpdir=$PREFIX/config to --with-gimpdir=GIMP-CCE-GIT, everything seems to work, but I'll have to test further to dig up more issues.

Last edited by tokineko (2016-09-28 03:01:51)

Offline

Board footer

Powered by FluxBB