Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure with MinGW-w64 #67

Closed
kleisauke opened this issue Dec 26, 2019 · 2 comments
Closed

Build failure with MinGW-w64 #67

kleisauke opened this issue Dec 26, 2019 · 2 comments

Comments

@kleisauke
Copy link

I'm unable to cross-compile ImageMagick 6.9.10-80 with MinGW-w64. Here's the salient part of the build log: https://gist.github.com/kleisauke/d385c6b02d31690fb9b22a6ddecad612

Note that the multiple definition linker error also affects other dependent packages: Imagick/imagick#311

This patch fixes it for me:

diff --git a/magick/memory_.h b/magick/memory_.h
index 1111111..2222222 100644
--- a/magick/memory_.h
+++ b/magick/memory_.h
@@ -68,7 +68,7 @@ extern MagickExport void
   SetMagickMemoryMethods(AcquireMemoryHandler,ResizeMemoryHandler,
     DestroyMemoryHandler);
 
-inline MagickExport MagickBooleanType HeapOverflowSanityCheck(
+inline MagickBooleanType HeapOverflowSanityCheck(
   const size_t count,const size_t quantum)
 {
   if ((count == 0) || (quantum == 0))
@@ -81,7 +81,7 @@ inline MagickExport MagickBooleanType HeapOverflowSanityCheck(
   return(MagickFalse);
 }
 
-inline MagickExport MagickBooleanType HeapOverflowSanityCheckGetSize(
+inline MagickBooleanType HeapOverflowSanityCheckGetSize(
   const size_t count,const size_t quantum,size_t *const extent)
 {
   size_t
diff --git a/magick/magick-config.h b/magick/magick-config.h
index 1111111..2222222 100644
--- a/magick/magick-config.h
+++ b/magick/magick-config.h
@@ -162,7 +162,7 @@ extern "C" {
 #  define __has_builtin(x) 0
 #endif
 
-#if __STDC_VERSION__ > 201112L
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201112L && !defined(__MINGW32__)
 # define MAGICKCORE_HAVE_STDC_ALIGNED_ALLOC 1
 #endif
 
urban-warrior pushed a commit to ImageMagick/ImageMagick that referenced this issue Dec 26, 2019
@urban-warrior
Copy link
Member

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

@kleisauke
Copy link
Author

I confirm that this build failure has been resolved in ImageMagick 6.9.10-82. Thanks for fixing this! I'll close this issue.

bmwiedemann added a commit to bmwiedemann/openSUSE that referenced this issue Jan 6, 2020
https://build.opensuse.org/request/show/760458
by user dimstar_suse
- version update to 7.0.9.13
  * xc:white no longer creates a black PNM image (reference
    ImageMagick/ImageMagick#1817).
  * Sync pixel cache for -kmeans option.
  * Thread -kmeans option.
  * PSD: only set the alpha channel when type is not 0.
 * Fix Lab to custom profile (CMYK or RGB) conversion bug (reference
   https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=37318).
  * Fix Build failure with MinGW-w64 (reference
    ImageMagick/ImageMagick6#67).
  * Inject image profile properties immediately after the image is read.
  * Replace pseudo-random number generator with a Xoshiro generator.
  * The -layers optimize option requires a fully transparent previous image.
  * Some clang releases do not support _aligned_alloc().
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jan 6, 2020
2019-12-30  7.0.9-13 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-13, GIT revision 16616:dbafe0b:20191230.

2019-12-27  7.0.9-13 Cristy  <quetzlzacatenango@image...>
  * xc:white no longer creates a black PNM image (reference
    ImageMagick/ImageMagick#1817).
  * Sync pixel cache for -kmeans option.
  * Thread -kmeans option.
  * PSD: only set the alpha channel when type is not 0.
 * Fix Lab to custom profile (CMYK or RGB) conversion bug (reference
   https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=37318).

2019-12-26  7.0.9-12 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-12, GIT revision 16587:7d6a559:20191226.

2019-12-26  7.0.9-12 Cristy  <quetzlzacatenango@image...>
  * Fix Build failure with MinGW-w64 (reference
    ImageMagick/ImageMagick6#67).
  * Inject image profile properties immediately after the image is read.

2019-12-23  7.0.9-11 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-11, GIT revision 16568:1d6c960:20191224.

2019-12-18  7.0.9-11 Cristy  <quetzlzacatenango@image...>
  * Replace pseudo-random number generator with a Xoshiro generator.
  * The -layers optimize option requires a fully transparent previous image.

2019-12-22  7.0.9-10 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-10, GIT revision 16548:281649843:20191222.

2019-12-18  7.0.9-10 Cristy  <quetzlzacatenango@image...>
  * Some clang releases do not support _aligned_alloc().
  * Support -kmeans command-line option.
  * The -layers optimize option requires a fully transparent previous image.

2019-12-07  7.0.9-9 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-9, GIT revision 16513:8ec82f4:20191215.

2019-12-07  7.0.9-9 Cristy  <quetzlzacatenango@image...>
  * Build file clean-up (reference
    ImageMagick/ImageMagick#1798).
  * Improve semaphore handling @
    ImageMagick/ImageMagick#1798).
  * Introduce HeapOverflowSanityCheckGetExtent() method (reference
    ImageMagick/ImageMagick#1798).

2019-12-01  7.0.9-8 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-8, GIT revision 16474:0bc0e95:20191207.

2019-12-01  7.0.9-8 Cristy  <quetzlzacatenango@image...>
  * -type bilevel behavior restored, it creates a black and white image.

2019-11-30  7.0.9-7 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-7, GIT revision 16449:971ba06:20191130.

2019-11-26  7.0.9-7 Cristy  <quetzlzacatenango@image...>
  * Support Pocketmod image format, e.g.
    convert -density 300 pages?.pdf pocketmod:organize.pdf
  * Fixed numerous issues  posted to GitHub (reference
    https://github.com/ImageMagick/ImageMagick/issues).
  * Update documentation.

2019-11-26  7.0.9-6 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-6, GIT revision 16407:1725ec3:20191126.

2019-11-19  7.0.9-6 Cristy  <quetzlzacatenango@image...>
  * Increase the maximum number of bezier coordinates (reference
    ImageMagick/ImageMagick#1784).
  * Santize "'" from SHOW and WIN delegates under Linux, '"\' for Windows
    (thanks to Enzo Puig).
  * Correct for TGA orientation (reference
    https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=34757).
  * The result for -compose Copy -extent on a  MYK image is CMYK (reference
    https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=37118).
  * Fix potential buffer overflow when reading a fax image (alert from
    Justin).
  * Support dng:use-camera-wb option.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jan 14, 2020
2019-12-30  7.0.9-13 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-13, GIT revision 16616:dbafe0b:20191230.

2019-12-27  7.0.9-13 Cristy  <quetzlzacatenango@image...>
  * xc:white no longer creates a black PNM image (reference
    ImageMagick/ImageMagick#1817).
  * Sync pixel cache for -kmeans option.
  * Thread -kmeans option.
  * PSD: only set the alpha channel when type is not 0.
 * Fix Lab to custom profile (CMYK or RGB) conversion bug (reference
   https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=37318).

2019-12-26  7.0.9-12 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-12, GIT revision 16587:7d6a559:20191226.

2019-12-26  7.0.9-12 Cristy  <quetzlzacatenango@image...>
  * Fix Build failure with MinGW-w64 (reference
    ImageMagick/ImageMagick6#67).
  * Inject image profile properties immediately after the image is read.

2019-12-23  7.0.9-11 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-11, GIT revision 16568:1d6c960:20191224.

2019-12-18  7.0.9-11 Cristy  <quetzlzacatenango@image...>
  * Replace pseudo-random number generator with a Xoshiro generator.
  * The -layers optimize option requires a fully transparent previous image.

2019-12-22  7.0.9-10 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-10, GIT revision 16548:281649843:20191222.

2019-12-18  7.0.9-10 Cristy  <quetzlzacatenango@image...>
  * Some clang releases do not support _aligned_alloc().
  * Support -kmeans command-line option.
  * The -layers optimize option requires a fully transparent previous image.

2019-12-07  7.0.9-9 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-9, GIT revision 16513:8ec82f4:20191215.

2019-12-07  7.0.9-9 Cristy  <quetzlzacatenango@image...>
  * Build file clean-up (reference
    ImageMagick/ImageMagick#1798).
  * Improve semaphore handling @
    ImageMagick/ImageMagick#1798).
  * Introduce HeapOverflowSanityCheckGetExtent() method (reference
    ImageMagick/ImageMagick#1798).

2019-12-01  7.0.9-8 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-8, GIT revision 16474:0bc0e95:20191207.

2019-12-01  7.0.9-8 Cristy  <quetzlzacatenango@image...>
  * -type bilevel behavior restored, it creates a black and white image.

2019-11-30  7.0.9-7 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-7, GIT revision 16449:971ba06:20191130.

2019-11-26  7.0.9-7 Cristy  <quetzlzacatenango@image...>
  * Support Pocketmod image format, e.g.
    convert -density 300 pages?.pdf pocketmod:organize.pdf
  * Fixed numerous issues  posted to GitHub (reference
    https://github.com/ImageMagick/ImageMagick/issues).
  * Update documentation.

2019-11-26  7.0.9-6 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-6, GIT revision 16407:1725ec3:20191126.

2019-11-19  7.0.9-6 Cristy  <quetzlzacatenango@image...>
  * Increase the maximum number of bezier coordinates (reference
    ImageMagick/ImageMagick#1784).
  * Santize "'" from SHOW and WIN delegates under Linux, '"\' for Windows
    (thanks to Enzo Puig).
  * Correct for TGA orientation (reference
    https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=34757).
  * The result for -compose Copy -extent on a  MYK image is CMYK (reference
    https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=37118).
  * Fix potential buffer overflow when reading a fax image (alert from
    Justin).
  * Support dng:use-camera-wb option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants