Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cannot compile gmic-2.0.0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Hammett
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 150
Location: Barcelona, Catalonia

PostPosted: Wed Jun 07, 2017 6:03 pm    Post subject: [SOLVED] Cannot compile gmic-2.0.0 Reply with quote

New version of gmic-2.0.0 throws compile errors:

Code:

# emerge --info '=media-gfx/gmic-2.0.0::gentoo'
Portage 2.3.5 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-6.3.0, glibc-2.24-r1, 4.11.3-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.11.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-2700K_CPU_@_3.50GHz-with-gentoo-2.3
KiB Mem:     8148404 total,   6192964 free
KiB Swap:    5241852 total,   4773364 free
Timestamp of repository gentoo: Wed, 07 Jun 2017 17:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

miramir
    location: /var/lib/layman/miramir
    masters: gentoo
    priority: 1

sabayon
    location: /var/lib/layman/sabayon
    masters: gentoo
    priority: 2

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -mtune=corei7-avx -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7-avx -mtune=corei7-avx -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo-euetib.upc.es/mirror/gentoo/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 berkdb bzip2 cli consolekit cracklib crypt cxx dbus dri evdev fortran gdbm iconv jpeg lame libnotify modules mp3 multilib ncurses nls nptl nvidia opengl openmp pam pcre png policykit readline seccomp session smp ssl symlink tcpd threads tiff truetype udev unicode vdpau xml zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="emu" INPUT_DEVICES="evdev wacom" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


Full log of emerge can be found here: https://pastebin.com/embed_js/ueVz7Ybt
_________________
I don't fear the people. I fear the demon inside them.


Last edited by Hammett on Fri Jun 09, 2017 1:47 pm; edited 2 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 15403
Location: here

PostPosted: Wed Jun 07, 2017 7:14 pm    Post subject: Reply with quote

With gcc 5.4 and gimp 2.8.22 compile fine in my system
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2342
Location: Netherlands

PostPosted: Wed Jun 07, 2017 7:48 pm    Post subject: Reply with quote

I am having the same problem.
I am running gimp-2.9.4-r3 and apparently it contains code which the new gmic doesn't know.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
Ptitjack35
n00b
n00b


Joined: 08 Jun 2017
Posts: 2

PostPosted: Thu Jun 08, 2017 9:31 am    Post subject: Reply with quote

Hello,

Same problem here with Gimp-2.9.4-r3
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 15403
Location: here

PostPosted: Thu Jun 08, 2017 12:06 pm    Post subject: Reply with quote

Patch for compile gmic-2.0.0 with gimp 2.9.x
Code:
diff -Naur gmic-2.0.0.orig/src/gmic_gimp_gtk.cpp gmic-2.0.0/src/gmic_gimp_gtk.cpp
--- gmic-2.0.0.orig/src/gmic_gimp_gtk.cpp   2017-06-08 12:24:11.430033986 +0200
+++ gmic-2.0.0/src/gmic_gimp_gtk.cpp   2017-06-08 13:58:01.253135549 +0200
@@ -387,13 +387,13 @@
 
 // Get layer blending mode from string.
 //-------------------------------------
-#if (GIMP_MAJOR_VERSION>=3 || GIMP_MINOR_VERSION>8) && !defined(GIMP_NORMAL_MODE)
+#if (GIMP_MAJOR_VERSION>=3 || GIMP_MINOR_VERSION>9) && !defined(GIMP_NORMAL_MODE)
 typedef GimpLayerMode GimpLayerModeEffects;
 #define GIMP_NORMAL_MODE GIMP_LAYER_MODE_NORMAL
 #endif
 
 const char *s_blendmode(const GimpLayerModeEffects &blendmode) {
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
   switch (blendmode) {
   case GIMP_NORMAL_MODE : return "alpha";
   case GIMP_DISSOLVE_MODE : return "dissolve";
@@ -480,7 +480,7 @@
   const char *S = std::strstr(s,"mode(");
   bool is_blendmode = false;
 
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
   _get_output_layer_blendmode("alpha",GIMP_NORMAL_MODE);
   _get_output_layer_blendmode("normal",GIMP_NORMAL_MODE);
   _get_output_layer_blendmode("dissolve",GIMP_DISSOLVE_MODE);
@@ -1798,7 +1798,7 @@
 // (Much thanks to Andrea Ferrero for his contribution on this).
 template<typename T>
 CImg<T>& apply_icc(CImg<T>& img) {
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
   cimg::unused(img);
 #else
   if (!img || img.spectrum()<3 || img.spectrum()>4 || !img_profile) return img;
@@ -1820,7 +1820,7 @@
 // Color-correct preview image.
 //-----------------------------
 void preview_with_icc() {
-#if GIMP_MAJOR_VERSION>=3 || GIMP_MINOR_VERSION>8
+#if GIMP_MAJOR_VERSION>=3 || GIMP_MINOR_VERSION>9
   img_profile = gimp_image_get_effective_color_profile(image_id);
   GimpColorConfig *const color_config = gimp_get_color_configuration();
   if (!img_profile || !color_config) return;
@@ -2015,7 +2015,7 @@
     if (!gimp_drawable_mask_intersect(input_layers[l],&rgn_x,&rgn_y,&rgn_width,&rgn_height)) continue;
     const int spectrum = (gimp_drawable_is_rgb(input_layers[l])?3:1) +
       (gimp_drawable_has_alpha(input_layers[l])?1:0);
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
     GimpDrawable *drawable = gimp_drawable_get(input_layers[l]);
     GimpPixelRgn region;
     gimp_pixel_rgn_init(&region,drawable,rgn_x,rgn_y,rgn_width,rgn_height,false,false);
@@ -2091,7 +2091,7 @@
         const float
           pw = (float)gimp_preview_width,
           ph = (float)gimp_preview_height;
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
         const float
           dw = (float)gimp_zoom_preview_get_drawable(GIMP_ZOOM_PREVIEW(gui_preview))->width,
           dh = (float)gimp_zoom_preview_get_drawable(GIMP_ZOOM_PREVIEW(gui_preview))->height;
@@ -2229,7 +2229,7 @@
 
   computed_preview.assign();
 
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
   const bool is_valid_preview_drawable = gui_preview && GIMP_IS_PREVIEW(gui_preview) &&
     _gimp_item_is_valid(gimp_zoom_preview_get_drawable(GIMP_ZOOM_PREVIEW(gui_preview))->drawable_id);
 #else
@@ -2262,7 +2262,7 @@
       gimp_context_set_interpolation(mode);
     }
 
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
     GimpDrawable *const preview_drawable =
       gimp_drawable_get(gimp_image_get_active_drawable(preview_image_id?preview_image_id:image_id));
     gui_preview = gimp_zoom_preview_new(preview_drawable);
@@ -3056,7 +3056,7 @@
           calibrate_image(img,layer_dimensions(p,3),false);
           if (gimp_drawable_mask_intersect(layers[p],&rgn_x,&rgn_y,&rgn_width,&rgn_height)) {
 
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
             GimpDrawable *drawable = gimp_drawable_get(layers[p]);
             GimpPixelRgn region;
             gimp_pixel_rgn_init(&region,drawable,rgn_x,rgn_y,rgn_width,rgn_height,true,true);
@@ -3121,7 +3121,7 @@
             else if (layer_name) gimp_item_set_name(layer_id,layer_name);
             gimp_image_insert_layer(image_id,layer_id,-1,layer_pos + p);
 
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
             GimpDrawable *drawable = gimp_drawable_get(layer_id);
             GimpPixelRgn region;
             gimp_pixel_rgn_init(&region,drawable,0,0,drawable->width,drawable->height,true,true);
@@ -3186,7 +3186,7 @@
           else if (layer_name) gimp_item_set_name(layer_id,layer_name);
           gimp_image_insert_layer(image_id,layer_id,-1,p);
 
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
           GimpDrawable *drawable = gimp_drawable_get(layer_id);
           GimpPixelRgn region;
           gimp_pixel_rgn_init(&region,drawable,0,0,drawable->width,drawable->height,true,true);
@@ -3226,7 +3226,7 @@
       if (spt.images.size()) {
         const gint active_layer_id = gimp_image_get_active_layer(image_id);
         if (active_layer_id>=0) {
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
           const int nimage_id = gimp_image_new(max_width,max_height,max_spectrum<=2?GIMP_GRAY:GIMP_RGB);
 #else
           const int nimage_id = gimp_image_new_with_precision(max_width,max_height,max_spectrum<=2?GIMP_GRAY:GIMP_RGB,
@@ -3256,7 +3256,7 @@
             else if (layer_name) gimp_item_set_name(layer_id,layer_name);
             gimp_image_insert_layer(nimage_id,layer_id,-1,p);
 
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
             GimpDrawable *drawable = gimp_drawable_get(layer_id);
             GimpPixelRgn region;
             gimp_pixel_rgn_init(&region,drawable,0,0,drawable->width,drawable->height,true,true);
@@ -3590,7 +3590,7 @@
     const float
       pw = (float)gimp_preview_width,
       ph = (float)gimp_preview_height;
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
     const float
       dw = (float)gimp_zoom_preview_get_drawable(GIMP_ZOOM_PREVIEW(gui_preview))->width,
       dh = (float)gimp_zoom_preview_get_drawable(GIMP_ZOOM_PREVIEW(gui_preview))->height;
@@ -4512,7 +4512,7 @@
 
   try {
     image_id = param[1].data.d_drawable;
-#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=8
+#if GIMP_MAJOR_VERSION<=2 && GIMP_MINOR_VERSION<=9
     gimp_tile_cache_ntiles(2*(gimp_image_width(image_id)/gimp_tile_width() + 1));
 #endif
 

Available also here

Let me know if work so I can open a bug (upstream and in gentoo bugzilla)
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Hammett
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 150
Location: Barcelona, Catalonia

PostPosted: Thu Jun 08, 2017 4:22 pm    Post subject: Reply with quote

Patch worked!

Thanks a lot for it :)

Kind regards,
_________________
I don't fear the people. I fear the demon inside them.
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2342
Location: Netherlands

PostPosted: Thu Jun 08, 2017 5:32 pm    Post subject: Reply with quote

Thanks fedeliallalinea.
I'm no good at patching so I'll wait until it gets in the tree.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 15403
Location: here

PostPosted: Thu Jun 08, 2017 5:44 pm    Post subject: Reply with quote

Remember that I don't know if all is correct in my patch
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 5607
Location: Saint Amant, Acadiana

PostPosted: Thu Jun 08, 2017 5:49 pm    Post subject: Reply with quote

gerard27 wrote:
Thanks fedeliallalinea.
I'm no good at patching so I'll wait until it gets in the tree.
Gerard.

Code:
mkdir -p /etc/portage/patches/media-gfx/gmic
mv /home/<user>/downloads/gmic-2.0.0-gimp-2.9.x.patch /etc/portage/patches/media-gfx/gmic/


Thanks, fedeliallalinea!
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 15403
Location: here

PostPosted: Thu Jun 08, 2017 5:53 pm    Post subject: Reply with quote

Jaglover wrote:
gerard27 wrote:
Thanks fedeliallalinea.
I'm no good at patching so I'll wait until it gets in the tree.
Gerard.

Code:
mkdir -p /etc/portage/patches/media-gfx/gmic
mv /home/<user>/downloads/gmic-2.0.0-gimp-2.9.x.patch /etc/portage/patches/media-gfx/gmic/

Thanks Jaglover, I didn't understand :?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2342
Location: Netherlands

PostPosted: Thu Jun 08, 2017 6:32 pm    Post subject: Reply with quote

Thanks Jaglover,
Got it installed with your instructions.
I now have 2 gmics in gimp.
The first one in the dropdown menu is "gmic-gtk" the other simply gmic.
I will play with it and see what the difference is.
Thank you both.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
Ptitjack35
n00b
n00b


Joined: 08 Jun 2017
Posts: 2

PostPosted: Fri Jun 09, 2017 8:53 am    Post subject: Reply with quote

Hello all,

Patch worked for me !
Thanks a lot,

Regards
Back to top
View user's profile Send private message
richard77
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 269

PostPosted: Fri Jun 09, 2017 8:31 pm    Post subject: Reply with quote

Worked for me as well (gmic 2.0.0, gimp 2.9.4-r3)

Grazie Fedeliallalinea!

PS

Quote:
The first one in the dropdown menu is "gmic-gtk" the other simply gmic.


I've read on release notes that for gmic gimp plugin there is a new interface based on qt.
I guess one is the "old" gtk one, the other is the new one.

I have only gmic-gtk on my dropdown menu, probably I miss some qt support somewhere. I'm a bit puzzled because I'm on kde/plasma.
_________________
Fletto i muscoli e sono nel vuoto
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum