Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581816 - media-gfx/uniconvertor fails with >=media-gfx/imagemagick-7.0.1.0
Summary: media-gfx/uniconvertor fails with >=media-gfx/imagemagick-7.0.1.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
: 581908 629650 (view as bug list)
Depends on: 640668
Blocks: imagemagick-7
  Show dependency tree
 
Reported: 2016-05-02 08:06 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2020-07-01 15:57 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,539.97 KB, text/plain)
2016-05-02 08:06 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details
build.log (build.log,41.38 KB, text/plain)
2016-05-02 08:29 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details
uniconvertor-2.0_pre379-ImageMagick7.patch (uniconvertor-2.0_pre379-ImageMagick7.patch,2.11 KB, patch)
2016-07-11 08:19 UTC, Franz Trischberger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-05-02 08:06:05 UTC
Created attachment 432940 [details]
build.log

x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -fPIC -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/usr/include/ImageMagick-6 -I/usr/include/python2.7 -c src/uc2/libimg/_libimg.c -o /var/tmp/portage/media-gfx/uniconvertor-2.0_pre379-r1/work/uniconvertor-2.0_pre379-python2_7/temp.linux-x86_64-2.7/src/uc2/libimg/_libimg.o
src/uc2/libimg/_libimg.c:20:29: fatal error: wand/MagickWand.h: No such file or directory
compilation terminated.
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1
 * ERROR: media-gfx/uniconvertor-2.0_pre379-r1::gentoo failed (compile phase):
 *   (no error message)
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-05-02 08:29:39 UTC
Created attachment 432962 [details]
build.log

Whoops, wrong log file attached.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-05-03 07:10:23 UTC
*** Bug 581908 has been marked as a duplicate of this bug. ***
Comment 3 Franz Trischberger 2016-05-13 13:04:59 UTC
Ran into the same issue.
Replacing <wand/MagickWand.h> with <MagickWand/MagickWand.h> and changing uniconvertor-2.0_pre379-libimg.patch to use the correct include_dir (ImgeMagick-7 instead of -6) fix this error, but lead to different ones:

building 'uc2.libimg._libimg' extension
creating /var/tmp/portage/media-gfx/uniconvertor-2.0_pre379-r1/work/uniconvertor-2.0_pre379-python2_7/temp.linux-x86_64-2.7/src/uc2/libimg
x86_64-pc-linux-gnu-gcc -march=sandybridge -mno-aes -O2 -pipe -ggdb -fPIC -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/usr/include/ImageMagick-7 -I/usr/include/python2.7 -c src/uc2/libimg/_libimg.c -o /
var/tmp/portage/media-gfx/uniconvertor-2.0_pre379-r1/work/uniconvertor-2.0_pre379-python2_7/temp.linux-x86_64-2.7/src/uc2/libimg/_libimg.o
In file included from /usr/include/ImageMagick-7/MagickWand/MagickWand.h:29:0,
                 from src/uc2/libimg/_libimg.c:20:
/usr/include/ImageMagick-7/MagickCore/magick-config.h:29:3: warning: #warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
   ^
/usr/include/ImageMagick-7/MagickCore/magick-config.h:30:3: warning: #warning "this is an obsolete behavior please fix your makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix your makefile"
   ^
/usr/include/ImageMagick-7/MagickCore/magick-config.h:52:3: warning: #warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default"
   ^
/usr/include/ImageMagick-7/MagickCore/magick-config.h:53:3: warning: #warning "this is an obsolete behavior please fix yours makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix yours makefile"
   ^
src/uc2/libimg/_libimg.c: In function ‘im_GetImageType’:
src/uc2/libimg/_libimg.c:187:23: error: ‘GrayscaleMatteType’ undeclared (first use in this function)
  else if (img_type == GrayscaleMatteType){
                       ^
src/uc2/libimg/_libimg.c:187:23: note: each undeclared identifier is reported only once for each function it appears in
src/uc2/libimg/_libimg.c:193:23: error: ‘PaletteMatteType’ undeclared (first use in this function)
  else if (img_type == PaletteMatteType){
                       ^
src/uc2/libimg/_libimg.c:199:23: error: ‘TrueColorMatteType’ undeclared (first use in this function)
  else if (img_type == TrueColorMatteType){
                       ^
src/uc2/libimg/_libimg.c:205:23: error: ‘ColorSeparationMatteType’ undeclared (first use in this function)
  else if (img_type == ColorSeparationMatteType){
                       ^
src/uc2/libimg/_libimg.c:211:23: error: ‘PaletteBilevelMatteType’ undeclared (first use in this function)
  else if (img_type == PaletteBilevelMatteType){
                       ^
src/uc2/libimg/_libimg.c: In function ‘im_GetColorspace’:
src/uc2/libimg/_libimg.c:308:17: error: ‘Rec601LumaColorspace’ undeclared (first use in this function)
  else if (cs == Rec601LumaColorspace){
                 ^
src/uc2/libimg/_libimg.c:314:17: error: ‘Rec709LumaColorspace’ undeclared (first use in this function)
  else if (cs == Rec709LumaColorspace){

But as far as I can see those types are defined in <MagickCore/image.h> resp. pixel.h, which get included by MagickWand.h. ATM no idea what's going wrong...
Comment 4 Franz Trischberger 2016-07-11 08:19:18 UTC
Created attachment 440336 [details, diff]
uniconvertor-2.0_pre379-ImageMagick7.patch

It seems I was wrong in my last comment. Those types really got removed. I attached a patch that fixes those issues. Here is the ebuild diff:

--- uniconvertor-2.0_pre379-r1.ebuild   2016-07-11 10:00:48.863225675 +0200
+++ uniconvertor-2.0_pre379-r2.ebuild   2016-07-11 10:18:25.833154346 +0200
@@ -6,7 +6,7 @@
 
 PYTHON_COMPAT=( python2_7 )
 
-inherit distutils-r1
+inherit distutils-r1 eutils
 
 DESCRIPTION="Commandline tool for popular vector formats convertion"
 HOMEPAGE="http://sk1project.org/modules.php?name=Products&product=uniconvertor https://code.google.com/p/uniconvertor/"
@@ -42,6 +42,11 @@
                -e "/libraries/s:'MagickWand':${wand}:g" \
                -i setup.py || die
 
+       if has_version ">=media-gfx/imagemagick-7.0"; then
+               sed  -e "s:ImageMagick-6:ImageMagick-7:" -i setup.py || die
+               epatch "${FILESDIR}"/${P}-ImageMagick7.patch || die
+       fi
+
        ln -sf \
                "${EPREFIX}"/usr/share/imagemagick/sRGB.icm \
                src/unittests/cms_tests/cms_data/sRGB.icm || die
Comment 5 Franz Trischberger 2016-07-12 06:48:48 UTC
Having another look also at the includes from ImageMagick6:
* *MatteType got renamed to *AlphaType, so no need to remove it but only rename it.
* Rec601Luma and Rec709Luma colorspaces are no longer supported, instead one as to use gray and specify intensity [1]
* Those (Matt) types get used in the python file (so removing in the first place was a bad idea). MatteType-porting should be straight forward. Rec-Colorspaces probably are not, as it requires additional steps. At least they aren't used directly in uniconvertor, so probably removing them is safe.
* Upstream seems to have moved development from https://github.com/sk1project/uniconvertor to https://github.com/sk1project/sk1-wx.

I am not a graphics specialist so I lack knowledge of how all this works ;) So I will stop here and leave the work to someone who knows what he does. I just needed it to compile to get my preserved-libs-queue cleaned - uniconvertor is a hard dep of inkscape, and I never use the offered functionality, so I am happy with the result...

[1] http://www.imagemagick.org/script/porting.php#colorspace
Comment 6 Juergen Rose 2016-08-28 13:52:05 UTC
(In reply to Franz Fellner from comment #4)
> Created attachment 440336 [details, diff] [details, diff]
> uniconvertor-2.0_pre379-ImageMagick7.patch
> 
> It seems I was wrong in my last comment. Those types really got removed. I
> attached a patch that fixes those issues. Here is the ebuild diff:
> 
> --- uniconvertor-2.0_pre379-r1.ebuild   2016-07-11 10:00:48.863225675 +0200
> +++ uniconvertor-2.0_pre379-r2.ebuild   2016-07-11 10:18:25.833154346 +0200
> @@ -6,7 +6,7 @@
>  
>  PYTHON_COMPAT=( python2_7 )
>  
> -inherit distutils-r1
> +inherit distutils-r1 eutils
>  
>  DESCRIPTION="Commandline tool for popular vector formats convertion"
>  HOMEPAGE="http://sk1project.org/modules.
> php?name=Products&product=uniconvertor
> https://code.google.com/p/uniconvertor/"
> @@ -42,6 +42,11 @@
>                 -e "/libraries/s:'MagickWand':${wand}:g" \
>                 -i setup.py || die
>  
> +       if has_version ">=media-gfx/imagemagick-7.0"; then
> +               sed  -e "s:ImageMagick-6:ImageMagick-7:" -i setup.py || die
> +               epatch "${FILESDIR}"/${P}-ImageMagick7.patch || die
> +       fi
> +
>         ln -sf \
>                 "${EPREFIX}"/usr/share/imagemagick/sRGB.icm \
>                 src/unittests/cms_tests/cms_data/sRGB.icm || die


Thanks for the patch. It worked here.
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-02-22 15:52:38 UTC
commit 0fe2ae29d1f246b07e4e8f564e8bc7db025d1461
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Wed Feb 22 16:51:50 2017

    media-gfx/uniconvertor: Revbump to fix compilation with imagemagick-7

    https://bugs.gentoo.org/581816

    Package-Manager: Portage-2.3.3, Repoman-2.3.1
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2017-12-03 11:52:12 UTC
*** Bug 629650 has been marked as a duplicate of this bug. ***
Comment 9 groepaz 2017-12-15 15:09:07 UTC
after todays sync/update i get exactly this problem. this is on a stable profile and with imagemagick-7.0.7.14
Comment 10 Jesús Guerrero 2017-12-15 16:35:54 UTC
(In reply to groepaz from comment #9)
> after todays sync/update i get exactly this problem. this is on a stable
> profile and with imagemagick-7.0.7.14

Same here. Patch doesn't work. Adding the "ImageMagick-7" bit to the header file in the patch gets me a bit further, but it fails in some other header file.

Each time inkscape appears in the upgrade list it's always the same :P
Comment 11 Fabio Rossi 2017-12-15 17:08:36 UTC
Reopening because the problem is not solved yet, adding depend bug
Comment 12 Sergey S. Starikoff 2017-12-15 19:42:21 UTC
For me it tries to build with ImageMagic-6:

x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -fPIC -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/usr/include/ImageMagick-6 -I/usr/include/python2.7 -c src/uc2/libimg/_libimg.c -o /var/tmp/portage/media-gfx/uniconvertor-2.0_pre379-r1/work/uniconvertor-2.0_pre379-python2_7/temp.linux-x86_64-2.7/src/uc2/libimg/_libimg.o
src/uc2/libimg/_libimg.c:20:29: fatal error: wand/MagickWand.h: No such file or directory
 #include <wand/MagickWand.h>
Comment 13 Fabio Rossi 2017-12-15 23:39:19 UTC
The solution is quite simple, install version 2.0_pre379-r2
Comment 14 Pacho Ramos gentoo-dev 2018-06-20 15:21:35 UTC
media-gfx/uniconvertor-2.0_pre379-r2 looks to fix it finally (and it was stabilized)
Comment 15 Larry the Git Cow gentoo-dev 2020-07-01 15:57:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19cf35ae4e42736d6e82e2768e83840ba5da144d

commit 19cf35ae4e42736d6e82e2768e83840ba5da144d
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-07-01 15:55:29 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-07-01 15:56:57 +0000

    media-gfx/uniconvertor: Drop 2.0_pre379-r1
    
    Long obsolete...
    
    Bug: https://bugs.gentoo.org/581816
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../uniconvertor/uniconvertor-2.0_pre379-r1.ebuild | 64 ----------------------
 1 file changed, 64 deletions(-)