Problem with GMIC plug-in for Gimp 2.9

I’ve installed the latest GMIC plug-in along with GIMP 2.9 but got an error when I tried to invoke the plug-in:

Could not execute plug-in “gmic_gimp”
(/home/jxxx/.gimp-2.9/plug-ins/gmic_gimp)
because it uses an obsolete version of the plug-in protocol.

Is this a known issue, if so, is there a work-around?

thanks!

I’m replying over here so it doesn’t get lost in the other thread

Ok, so you built GIMP 2.9 from sources according to the instructions over on wiki.meethegimp.org.

Am I to understand that you also followed @David_Tschumperle’s instructions from that previous post:

When you followed these steps, did everything build ok, or did it show any errors?

To be perfectly clear, there should be only few Warnings about use of deprecated functions.
If you don’t have these warnings, then it is highly probable you haven’t use the right version of the gimptools to compule your plug-in.

1 Like

Pat,

Here’s the output of a new attempt:

john@haystack ~/.gimp-2.9/plug-ins/gmic-minimal/src $ make gimp

make "CFLAGS+=-Dgmic_build -Dcimg_use_zlib -I/usr/include
-Dgmic_prerelease="\\\"`date +%m%d%y`\\\"" -std=c++11 -Wall -W
-Dcimg_use_vt100 -Dcimg_use_abort -Dcimg_use_png -Dcimg_use_curl
-Dcimg_use_fftw3 -Dcimg_use_rng -Dgmic_is_parallel -fopenmp
-Dcimg_use_openmp -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\"
-I/usr/X11R6/include  -O2 -mtune=generic" "LIBS+=-lz -L/usr/lib -lm -lpng
-lz -lcurl -lfftw3 -lfftw3_threads -lpthread -lgomp -L/usr/X11R6/lib -lX11
-lpthread " gmic_gimp
make[1]: Entering directory '/home/john/.gimp-2.9/plug-ins/gmic-minimal/src'
> Retrieve G'MIC Standard Library...
>   ...done!
> Retrieve CImg Library...
>   ...done!
g++ -o gmic_gimp.o -c gmic.cpp -Dgmic_gimp -Dgmic_build -Dcimg_use_zlib
-I/usr/include -Dgmic_prerelease=\"091815\" -std=c++11 -Wall -W
-Dcimg_use_vt100 -Dcimg_use_abort -Dcimg_use_png -Dcimg_use_curl
-Dcimg_use_fftw3 -Dcimg_use_rng -Dgmic_is_parallel -fopenmp
-Dcimg_use_openmp -Dcimg_display=1 -Dcimg_appname=\"gmic\"
-I/usr/X11R6/include  -O2 -mtune=generic
g++ -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0
--cflags` -Dgmic_build -Dcimg_use_zlib -I/usr/include
-Dgmic_prerelease=\"091815\" -std=c++11 -Wall -W -Dcimg_use_vt100
-Dcimg_use_abort -Dcimg_use_png -Dcimg_use_curl -Dcimg_use_fftw3
-Dcimg_use_rng -Dgmic_is_parallel -fopenmp -Dcimg_use_openmp
-Dcimg_display=1 -Dcimg_appname=\"gmic\" -I/usr/X11R6/include  -O2
-mtune=generic `gimptool-2.0 --libs` -lz -L/usr/lib -lm -lpng -lz -lcurl
-lfftw3 -lfftw3_threads -lpthread -lgomp -L/usr/X11R6/lib -lX11 -lpthread
strip gmic_gimp
make[1]: Leaving directory '/home/john/.gimp-2.9/plug-ins/gmic-minimal/src'

john@haystack ~/.gimp-2.9/plug-ins/gmic-minimal/src $ ls
./   CImg.h    *gmic_gimp**     gmic_gimp.o  gmic_in_script.scm
gmic_use_lib.cpp
../  gmic.cpp  gmic_gimp.cpp  gmic.h       gmic_stdlib.h       Makefile

No errors, and when I move this new gmic_gimp to my plug-ins directory and
start gimp-2.9, select an image to enable the GMIC plug-in and select it, I
get the error I noted. I have other plug-ins that I wrote in python, and
these work without issue.

I edited your post so the bash stuff was escaped properly (hope you don’t mind).

As @David_Tschumperle noted, I don’t see any Warnings being thrown by the compiler, which might indicate that you are using the wrong version of gimptools to compile?

Pat,

Thanks for the edit, much more readable. I’ve gimptool-2.0 installed. It
thinks it’s associated with 2.8.14 (my previous version of gimp, since
deleted).

john@haystack ~/.gimp-2.9/plug-ins $ gimptool-2.0 --version
2.8.14

I didn’t explicitly use gimptool during plug-in compilation and
“installation”, I simply compiled gmic_gimp and moved the binary to the
plug-ins directory. Am I missing a step?

Yes, if you used the makefile provided in the git repo (probably by typing make gimp), then the gimptools have been called during the compilation. You should try updating your $PATH so that the gimptools for version 2.9 are run by default when calling them from the shell.

This line above seems to call gimptool-2.0 during compilation. Check that you’re pointing to the right gimptool. :slight_smile:

Hm. I’ve reached my knowledge boundary. When I look in my gimp 2.9
directory (newly created when gimp 2.9 was compiled), I find a copy of
gimptool-2.0 as well

./gimp/bin/gimptool-2.0

So…starting from scratch, I compiled babl, gegl and gimp from source
again.

I downloaded the gmic source, and invoking “make gimp”, it ends with:

/bin/sh: 1: gimptool-2.0: not found
gmic_gimp.cpp:50:21: fatal error: gtk/gtk.h: No such file or directory

  • #include <gtk/gtk.h>*
  •                 ^*
    

compilation terminated.

If I’m not meant to have gimptool-2.0 installed, what am I supposed to have?

thanks!

As my old physics prof used to say when my electronics lab project didn’t
work, “hell, I can’t see what’s wrong, take it apart and rebuild it over
there”…while pointing to another table.

I updated LD_LIBRARY_PATH to include the new gimp build “lib” directory
(which includes a libgimp-2.0.so object); re-made the gmic-gimp plugin, and
now it works.

Thanks for your patience!

1 Like

Hah! I never let anyone tell you that I can’t fix things through procrastination! All I had to do was be slow to respond, and voila! Fixed! :smiley:

I’m glad you got it working!

I know this is a ridiculously old topic, but I wanted to come in and say that your last post, in particular about setting LD_LIBRARY_PATH really helped me out building a fresh G’MIC against a fresh git GIMP.

For anyone else later:

$ export LD_LIBRARY_PATH={PATH_TO_GIMP_GIT_LIB_DIR}

alt-text: All long help threads should have a sticky globally-editable post at the top saying ‘DEAR PEOPLE FROM THE FUTURE: Here’s what we’ve figured out so far …’

1 Like

Even worse: There is one answer, “Nevermind, I solved it.”

1 Like

Did you try setting the rpath of the G’MIC plugin as a more permanent solution? Something like this might do the trick:

export LDFLAGS="-Wl,-rpath -Wl,{PATH_TO_GIMP_GIT_LIB_DIR}"

before building G’MIC.

1 Like

I’ve tried the compile as instructed in various place, but it doesn’t work. I still get:

"Could not execute plug-in "gmic_gimp_qt"
(/home/ben/gimp/lib/gimp/2.0/plug-ins/gmic_gimp_qt)
because it uses an obsolete version of the plug-in protocol."

Could this be API changes since this post was posted? I’m doing the following before compiling.

export PREFIX=`echo ~/gimp`
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig
export LD_LIBRARY_PATH=$PREFIX/gimp/lib
export LDFLAGS="-Wl,-rpath -Wl,$PREFIX/gimp/lib"

I’ve used the following links to compile:
http://gmic.eu/download.shtml - ‘from source’ section
Bug 787155 – G'Mic seems not to load - bug about gmic not loading