Compile Gimp gmic plugin as a static version

The latest linux gimp plugin, zip for 'buntu 20.04 is
“…Download GMIC latest release…”

This is a dynamic version gmic_gimp_qt with libgmic.so.3 A pain to get that working,
Tried both files in the gimp user plugins, not surprised when that does not work, then libgmic.so.3 in usr/lib got an error
…it needed more permissions that originally set but gmic does now work.

Question, I would like to compile my own static version, what do I need to invoke for that ? My usual work flow now throws up error after error.

Bonjour,

In the /src/Makefile file you can try :
GMIC_DYNAMIC_LINKING=off

Thanks for that, I did see a note about that in the Makefile and that other post about dynamic versions.

Just to put it in context, I keep a small archive of gmic_gimp_qt for use with the Gimp appimage. This uses an older version of QT so none of the regular plugins work.

I was never able to get Davids Makefile to work and still can’t. I use qmake from gmic-qt/src

I see Cimg.h no longer in gmic/src I tried a copy there, still no joy. Lots of error warning messages. Not worth the effort. Looks like end of project. Probably not before time.

Tried again with the ‘make all’ no alterations, ends up
Makefile:1171: recipe for target ‘.obj/host_gimp.o’ failed
make[2]: *** [.obj/host_gimp.o] Error 1
make[2]: Leaving directory ‘/home/rich/gmic-qt’
Makefile:545: recipe for target ‘gimp’ failed
make[1]: *** [gimp] Error 2
make[1]: Leaving directory ‘/home/rich/gmic/src’
Makefile:342: recipe for target ‘all’ failed
make: *** [all] Error 2

Edit : Change link and version (little problem with libc in 3.0.2)

Bonjour,

Here is a small procedure.

You can download this source and extract it to compile :
https://gmic.eu/files/source/gmic_3.0.1.tar.gz

Note : The options for choosing the GIMP version, libraries are in /gmic-3.0.1/gmic-qt/gmic_qt.pro

The compilation environment must be complete.

Go to the subdirectory /gmic-3.0.1/src
All that is needed is in this directory.

You change the line 535 of /gmic-3.0.1/src/Makefile by positioning GMIC_DYNAMIC_LINKING=off and save.

With your terminal you do :

make libc
make gimp

By being very patient and if everything is fine the plug-in will be in /gmic-3.0.1/gmic-qt/release

Bon courage :o)

Thank you very much
Got my 'buntu 18.04 / Gimp 2.10.22 appimage / gmic_gimp_qt (static) compiled.
…and it works fine.

2 Likes

I’ll make some modifications again in the Makefile, to have more clear targets:

  • Targets cli, gimp and gmic_qt will be compiled, as before, i.e. not using the shared library libgmic.
  • New targets cli_shared, gimp_shared and gmic_qt_shared will be added to compile the corresponding interfaces with the shared library libgmic.

Bonjour,

Here is a new way to get a static version of the GIMP plugin with the new Makefile

Note : Sources pre-realease Index of /files/prerelease

Test gmic_3.0.2_pre with Internet connexion
Sources : https://gmic.eu/files/prerelease/gmic_3.0.2_pre220116.tar.gz

Test 1 : Gimp 2 Static
Go to the subdirectory /gmic-3.0.2_pre/src

make gimp


Test 2 : Gimp 3 or Gimp 2.99 Static
Go to the subdirectory /gmic-3.0.2_pre/src
You change the line 543 of /gmic-3.0.2_pre/src/Makefile by positioning HOST=gimp3 and save.

make clean
make gimp

The two tests are performed successively in the same compilation environment containing GIMP-2.10.30 and GIMP-2.99.9
The two versions of the plugin work.