Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 664226 - >=media-gfx/imagemagick-7.0.8.8[hdri] fails to build: MagickCore/quantum-private.h:662:27: error: expected ‘)’ before ‘quantum’
Summary: >=media-gfx/imagemagick-7.0.8.8[hdri] fails to build: MagickCore/quantum-priv...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-22 04:49 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2018-08-22 20:21 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2018-08-22 04:49:24 UTC
MagickCore/quantum-private.h between media-gfx/imagemagick-7.0.8.7 and media-gfx/imagemagick-7.0.8.8 contains this difference:

@@ -648,5 +653,13 @@
 static inline MagickSizeType ScaleQuantumToLongLong(const Quantum quantum)
 {
-  return((MagickSizeType) (quantum/18446744073709551615.0+0.5));
+#if !defined(MAGICKCORE_HDRI_SUPPORT)
+  return((MagickSizeType) quantum);
+#else
+  if (quantum <= 0.0)
+    return(0);
+  if (quantum >= 18446744073709551615)
+    return(18446744073709551615);
+  return((MagickSizeType (quantum+0.5));
+#endif
 }


Mismatched parentheses on 'return((MagickSizeType (quantum+0.5));' line cause compilation failure (already for the first file compiled in src_compile()):


./MagickCore/quantum-private.h:662:27: error: expected ‘)’ before ‘quantum’
   return((MagickSizeType (quantum+0.5));
                           ^~~~~~~
                           )
./MagickCore/quantum-private.h:662:40: error: expected ‘)’ before ‘;’ token
   return((MagickSizeType (quantum+0.5));
         ~                              ^
                                        )
./MagickCore/quantum-private.h:662:41: error: expected ‘;’ before ‘}’ token
   return((MagickSizeType (quantum+0.5));
                                         ^
                                         ;
./MagickCore/quantum-private.h:664:1:
 }
 ~                                        
make[1]: *** [Makefile:9273: coders/coders_aai_la-aai.lo] Error 1
make[1]: Opuszczenie katalogu '/var/tmp/portage/media-gfx/imagemagick-7.0.8.10/work/ImageMagick-7.0.8-10'
make: *** [Makefile:5179: all] Error 2
 * ERROR: media-gfx/imagemagick-7.0.8.10::gentoo failed (compile phase):
 *   emake failed
Comment 1 Arfrever Frehtes Taifersar Arahesis 2018-08-22 05:02:43 UTC
Apparently already fixed by upstream:
https://github.com/ImageMagick/ImageMagick/commit/6cc5e2d68431249a647f22e5320f8a0481e3e3f4
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2018-08-22 20:05:27 UTC
For some reason I cannot reproduce but I'll add the fix.
Comment 3 Larry the Git Cow gentoo-dev 2018-08-22 20:21:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5e2bfcba50b555f8bfd7083c5f74c265771a2e

commit 5f5e2bfcba50b555f8bfd7083c5f74c265771a2e
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-08-22 20:12:30 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-08-22 20:21:39 +0000

    media-gfx/imagemagick: fix build issue in MagickCore/quantum-private.h
    
    Closes: https://bugs.gentoo.org/664226
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 ...gick-7.0.8.10-quantum-private-compile-fix.patch | 24 ++++++++++++++++++++++
 .../imagemagick/imagemagick-7.0.8.10-r1.ebuild     |  2 ++
 2 files changed, 26 insertions(+)