GIT version 2017/01/19 fails to compile


(Helmut Jarausch) #1

I don’t know if this is the right place to report bugs when trying to compile GMIC.
Thanks for looking into this,
Helmut

I have the current GIT version of Gimp installed here.

During compilation I get

gmic_gimp.cpp: In function ‘void process_image(const char*, bool)’:
gmic_gimp.cpp:2783:73: error: cannot convert ‘GimpLayerMode’ to ‘const GimpLayerModeEffects’ in initialization
const GimpLayerModeEffects blendmode = gimp_layer_get_mode(layers[p]);
^
gmic_gimp.cpp:2932:58: error: cannot convert ‘GimpLayerMode’ to ‘GimpLayerModeEffects’ in assignment
layer_blendmode = gimp_layer_get_mode(layers[p]);
^
gmic_gimp.cpp:2963:58: error: cannot convert ‘GimpLayerModeEffects’ to ‘GimpLayerMode’ for argument ‘2’ to 'gboolean gimp_layer_set_mode(gint32, GimpLayerMode)'
gimp_layer_set_mode(layers[p],layer_blendmode);
^
gmic_gimp.cpp:2978:62: error: cannot convert ‘GimpLayerMode’ to ‘GimpLayerModeEffects’ in assignment
layer_blendmode = gimp_layer_get_mode(layers[p]);
^
gmic_gimp.cpp:3000:73: error: cannot convert ‘GimpLayerModeEffects’ to ‘GimpLayerMode’ for argument ‘7’ to 'gint32 gimp_layer_new(gint32, const gchar*, gint, gint, GimpImageType, gdouble, GimpLayerMode)'
layer_opacity,layer_blendmode);
^
gmic_gimp.cpp:3064:66: error: cannot convert ‘GimpLayerModeEffects’ to ‘GimpLayerMode’ for argument ‘7’ to 'gint32 gimp_layer_new(gint32, const gchar*, gint, gint, GimpImageType, gdouble, GimpLayerMode)'
layer_opacity,layer_blendmode);
^
gmic_gimp.cpp:3135:73: error: cannot convert ‘GimpLayerModeEffects’ to ‘GimpLayerMode’ for argument ‘7’ to 'gint32 gimp_layer_new(gint32, const gchar*, gint, gint, GimpImageType, gdouble, GimpLayerMode)'
layer_opacity,layer_blendmode);
^
gmic_gimp.cpp: In function ‘void process_preview()’:
gmic_gimp.cpp:3258:75: error: cannot convert ‘GimpLayerMode’ to ‘const GimpLayerModeEffects’ in initialization
const GimpLayerModeEffects blendmode = gimp_layer_get_mode(*layers);
^
gmic_gimp.cpp:3293:81: error: cannot convert ‘GimpLayerMode’ to ‘const GimpLayerModeEffects’ in initialization
const GimpLayerModeEffects blendmode = gimp_layer_get_mode(layers[p]);
^


(Kevin Payne) #2

Given that, according to GIMP’s git commit entries,
https://git.gnome.org/browse/gimp/log/

there have been changes around layer-modes, I’d be surprised if G’MIC has been updated to accommodate those changes.


(Bug Free) #3

It’s broken photoflow-git compilation as well on Manjaro (an Arch derivative).

Incidentally the number of layer modes in GIMP has roughly doubled. :dizzy_face:


#4

I’ve been having problems as well. Compiling GMIC for gimp, pulling gmic from git, compiling on Debian testing 64 bit. I get the following:

gmic_gimp.cpp:393:50: error: ‘GimpLayerModeEffects’ has not been declared
void get_output_layer_props(const char *const s, GimpLayerModeEffects &blendmode, double &opacity

The Gmic standalone binary builds, but not the gimp plug-in.


(David Tschumperlé) #5

I would suggest looking at this thread : http://www.mail-archive.com/gimp-developer-list%40gnome.org/msg07726.html
It seems this error has been fixed since a fex days.


#6

David thanks for the reply. I’m still having the same error, after new pulls from git and recompiling both gimp and gmic. I’m on Debian, and have both source directories under ~/src
Some searching found ‘GimpLayerModeEffects’ declared in my ~/src/gimp/libgimp/gimptyes.h file:

/* This is so ugly it hurts. C++ won’t let us have enum GimpLayerMode

  • in the API where we used to have enum GimpLayerModeEffects, so
  • typedef and define around to make it happy:
    */
    typedef GimpLayerMode GimpLayerModeEffects;

…but the error in gmic compiling persists.


(David Tschumperlé) #7

Aww, that’s really annoying. I don’t know what to say. I haven’t managed to compile GIMP from git by myself. I have to try again, but I’m really busy at this moment, so it won’t be possible before a few weeks probably.
Maybe someone else will find a solution before !


(Jean Pierre “Xaos52” De Schacht) #8

FYI,
gimp and G’MIC from git compile fine on Debian/Sid.
Maybe compiler version difference between testing and sid?
Or maybe you need to compile BABL and GEGL from git as well?

@gjschaefer:
Can you give us more details on the procedure you use to compile both?


(David Tschumperlé) #9

I’ve been able to reproduce the problem on my machine too, so I’ve done a quick fix.
This has been committed, and now the plug-in should compile fine with current GIT master of GIMP.
Let me know if you still have the issue.


#10

David, thanks for the update. I was able to compile gimp, gmic and the gmic_gimp2 plugin from the updated src with no problems.

Jean Pierre, I usually update and compile gegl, then gimp, in that order. Sometimes I update babl, but that seems to change more slowly.


#11

Thanks David… Another confirmation, back to compiling-for-dummies, like me.

Using Kubuntu 16.04 with Gimp 2.9.5 from the ppa.

G’mic pre#022017 - Conformal Maps, Dipole equation, interesting symmetry. http://i.imgur.com/cORMGzW.jpg


(Bug Free) #12

Wonderful! Now it compiles against AUR’s gimp-git on Manjaro Stable. :grinning:

Thank you David.