conan-center-index icon indicating copy to clipboard operation
conan-center-index copied to clipboard

ImageMagick: switch to CMake, migrate to Conan v2

Open valgur opened this issue 1 year ago • 16 comments
trafficstars

Continues from #10003 by @Cyriuz.

It merges the build scripts from the latest commit at https://github.com/Cyriuz/ImageMagick into the official source archive.

I also exposed all available options and added support for all dependencies available on CCI.

valgur avatar Dec 09 '23 22:12 valgur

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: Cyriuz
:x: Martin Valgur


Martin Valgur seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Dec 09 '23 22:12 CLAassistant

@Cyriuz Could you please sign the CLA for this PR?

valgur avatar Dec 09 '23 22:12 valgur

Conan v1 pipeline :x:

Changes not allowed in build 4:

[date, imagemagick]

Only one library can be changed in the same PR.

conan-center-bot avatar Dec 10 '23 22:12 conan-center-bot

Conan v1 pipeline :x:

Failure in build 6 (ef9ff9847ab6a2af786f6f69cfc6db46505369b0):

  • imagemagick/7.1.1-22: CI failed to create some packages (All logs)

    Logs for packageID cd1da0c1d9e474c3d5009a10550b98fbeb08818b:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=clang
    compiler.libcxx=libstdc++
    compiler.version=13
    os=Linux
    [options]
    imagemagick:shared=False
    
    [...]
            ^
    <built-in>:305:9: note: previous definition is here
    #define _OPENMP 201811
            ^
    In file included from <built-in>:347:
    <command line>:15:9: warning: '_OPENMP' macro redefined [-Wmacro-redefined]
    #define _OPENMP 
            ^
    <built-in>:305:9: note: previous definition is here
    #define _OPENMP 201811
            ^
    In file included from /home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/src/MagickCore/animate.c:42:
    /home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    In file included from /home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/src/MagickCore/annotate.c:45:
    /home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    In file included from /home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/src/MagickCore/accelerate.c:44:
    /home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    1 warning and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/animate.c.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    /home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/src/MagickCore/accelerate.c:2628:65: warning: implicit conversion from 'long' to 'float' changes value from 3999999999 to 4.0E+9 [-Wimplicit-const-int-float-conversion]
          passes = (((1.0f * imageRows) * imageColumns * iRadius) + 3999999999) / 4000000000.0f;
                                                                  ~ ^~~~~~~~~~
    2 warnings and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/accelerate.c.o] Error 1
    1 warning and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/annotate.c.o] Error 1
    make[1]: *** [MagickCore/CMakeFiles/MagickCore.dir/all] Error 2
    make: *** [all] Error 2
    WARN: cairo/1.18.0: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-22 to zlib/1.3 
    WARN: freetype/2.13.2: requirement zlib/[>=1.2.10 <2] overridden by cairo/1.18.0 to zlib/1.3 
    WARN: libpng/1.6.40: requirement zlib/[>=1.2.11 <2] overridden by freetype/2.13.2 to zlib/1.3 
    WARN: glib/2.78.1: requirement zlib/[>=1.2.11 <2] overridden by cairo/1.18.0 to zlib/1.3 
    WARN: pcre2/10.42: requirement zlib/[>=1.2.11 <2] overridden by glib/2.78.1 to zlib/1.3 
    WARN: openexr/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-22 to zlib/1.3 
    WARN: libtiff/4.6.0: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-22 to zlib/1.3 
    WARN: libxml2/2.12.2: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-22 to zlib/1.3 
    imagemagick/7.1.1-22: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    imagemagick/7.1.1-22: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    imagemagick/7.1.1-22: ERROR: Package 'cd1da0c1d9e474c3d5009a10550b98fbeb08818b' build failed
    imagemagick/7.1.1-22: WARN: Build folder /home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/build/Release
    ERROR: imagemagick/7.1.1-22: Error in build() method, line 325
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build "/home/conan/w/prod-v1/bsr/69533/dffbc/.conan/data/imagemagick/7.1.1-22/_/_/build/cd1da0c1d9e474c3d5009a10550b98fbeb08818b/build/Release" '--' '-j3'
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline :x:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 6 (ef9ff9847ab6a2af786f6f69cfc6db46505369b0):

  • imagemagick/7.1.1-22: CI failed to create some packages (All logs)

    Logs for packageID 3a7f03d7930b57a0bdc5c1a6df40afb27d911ea4:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    -- Conan: Component target declared 'Imath::ImathConfig'
    -- Conan: Component target declared 'Imath::Imath'
    -- Conan: Target declared 'openjp2'
    -- Conan: Including build module from '/home/conan/w/prod-v2/bsr/56650/adfea/p/openj48a934e3bd0a1/p/lib/cmake/conan-official-openjpeg-variables.cmake'
    -- Conan: Target declared 'libraw::libraw'
    -- Conan: Target declared 'lcms::lcms'
    -- Conan: Target declared 'Jasper::Jasper'
    -- Conan: Target declared 'JPEG::JPEG'
    -- Conan: Including build module from '/home/conan/w/prod-v2/bsr/56650/adfea/p/jaspec8ac2933df029/p/lib/cmake/conan-official-jasper-variables.cmake'
    -- Conan: Target declared 'TIFF::TIFF'
    -- Conan: Component target declared 'libdeflate::libdeflate_static'
    -- Conan: Target declared 'LibLZMA::LibLZMA'
    -- Conan: Including build module from '/home/conan/w/prod-v2/bsr/56650/adfea/p/xz_ut1cf28d476c611/p/lib/cmake/conan-official-xz_utils-variables.cmake'
    -- Conan: Target declared 'jbig::jbig'
    -- Conan: Component target declared 'WebP::webpdecoder'
    -- Conan: Component target declared 'WebP::sharpyuv'
    -- Conan: Component target declared 'WebP::webp'
    -- Conan: Component target declared 'WebP::webpdemux'
    -- Conan: Component target declared 'WebP::libwebpmux'
    -- Conan: Target declared 'libwebp::libwebp'
    -- Conan: Component target declared 'zstd::libzstd_static'
    -- Conan: Target declared 'LibXml2::LibXml2'
    -- Conan: Target declared 'Iconv::Iconv'
    -- Conan: Including build module from '/home/conan/w/prod-v2/bsr/56650/adfea/p/libxmeb434976c3933/p/lib/cmake/conan-official-libxml2-variables.cmake'
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_POLICY_DEFAULT_CMP0091
    
    
    -- Build files have been written to: /home/conan/w/prod-v2/bsr/cci-90714211/recipes/imagemagick/cmake/test_package/build/gcc-11-x86_64-17-release
    
    imagemagick/7.1.1-22 (test package): Running CMake.build()
    imagemagick/7.1.1-22 (test package): RUN: cmake --build "/home/conan/w/prod-v2/bsr/cci-90714211/recipes/imagemagick/cmake/test_package/build/gcc-11-x86_64-17-release" -- -j3
    Scanning dependencies of target test_package
    [ 50%] Building C object CMakeFiles/test_package.dir/test_package.c.o
    [100%] Linking C executable test_package
    [100%] Built target test_package
    
    
    ======== Testing the package: Executing test ========
    imagemagick/7.1.1-22 (test package): Running test()
    imagemagick/7.1.1-22 (test package): RUN: identify -list format
    /bin/sh: 1: identify: not found
    
    ERROR: imagemagick/7.1.1-22 (test package): Error in test() method, line 39
    	self.run("identify -list format", env="conanrun")
    	ConanException: Error 127 while executing
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

conan-center-bot avatar Dec 12 '23 02:12 conan-center-bot

Conan v1 pipeline :x:

Failure in build 7 (035eb30ea6abe4689c91094649b0b8994594b04c):

  • imagemagick/7.1.1-22: Error running command conan export recipes/imagemagick/cmake/conanfile.py imagemagick/7.1.1-22@:
    [HOOK - conan-center.py] pre_export(): [DEPRECATED GLOBAL CPPSTD (KB-H001)] OK
    [HOOK - conan-center.py] pre_export(): [REFERENCE LOWERCASE (KB-H002)] OK
    [HOOK - conan-center.py] pre_export(): [RECIPE METADATA (KB-H003)] OK
    [HOOK - conan-center.py] pre_export(): [HEADER_ONLY, NO COPY SOURCE (KB-H005)] OK
    [HOOK - conan-center.py] pre_export(): [FPIC OPTION (KB-H006)] OK
    [HOOK - conan-center.py] pre_export(): [VERSION RANGES (KB-H008)] OK
    [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] Total recipe size: 25.8056640625 KB
    [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] OK
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE FOLDER (KB-H024)] OK
    [HOOK - conan-center.py] pre_export(): [META LINES (KB-H025)] OK
    [HOOK - conan-center.py] pre_export(): [CONAN CENTER INDEX URL (KB-H027)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE MINIMUM VERSION (KB-H028)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - RUN ENVIRONMENT (KB-H029)] OK
    [HOOK - conan-center.py] pre_export(): [SYSTEM REQUIREMENTS (KB-H032)] OK
    [HOOK - conan-center.py] pre_export(): [CONANDATA.YML FORMAT (KB-H030)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO IMPORTS() (KB-H034)] OK
    [HOOK - conan-center.py] pre_export(): [NO AUTHOR (KB-H037)] OK
    [HOOK - conan-center.py] pre_export(): [NOT ALLOWED ATTRIBUTES (KB-H039)] OK
    [HOOK - conan-center.py] pre_export(): [NO TARGET NAME (KB-H040)] OK
    [HOOK - conan-center.py] pre_export(): [NO FINAL ENDLINE (KB-H041)] OK
    [HOOK - conan-center.py] pre_export(): [NO REQUIRES.ADD() (KB-H044)] OK
    [HOOK - conan-center.py] pre_export(): [DELETE OPTIONS (KB-H045)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE VERBOSE MAKEFILE (KB-H046)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE VERSION REQUIRED (KB-H048)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE WINDOWS EXPORT ALL SYMBOLS (KB-H049)] OK
    [HOOK - conan-center.py] pre_export(): [DEFAULT OPTIONS AS DICTIONARY (KB-H051)] OK
    [HOOK - conan-center.py] pre_export(): [PRIVATE IMPORTS (KB-H053)] OK
    [HOOK - conan-center.py] pre_export(): [SINGLE REQUIRES (KB-H055)] OK
    [HOOK - conan-center.py] pre_export(): [TOOLS RENAME (KB-H057)] OK
    [HOOK - conan-center.py] pre_export(): [ILLEGAL CHARACTERS (KB-H058)] OK
    [HOOK - conan-center.py] pre_export(): [CLASS NAME (KB-H059)] OK
    [HOOK - conan-center.py] pre_export(): [NO CRLF (KB-H060)] OK
    [HOOK - conan-center.py] pre_export(): [NO BUILD SYSTEM FUNCTIONS (KB-H061)] OK
    [HOOK - conan-center.py] pre_export(): [TOOLS CROSS BUILDING (KB-H062)] OK
    [HOOK - conan-center.py] pre_export(): [INVALID TOPICS (KB-H064)] OK
    [HOOK - conan-center.py] pre_export(): [NO REQUIRED_CONAN_VERSION (KB-H065)] OK
    [HOOK - conan-center.py] pre_export(): [TEST_TYPE MANAGEMENT (KB-H068)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO DEFAULT OPTIONS (KB-H069)] OK
    [HOOK - conan-center.py] pre_export(): [MANDATORY SETTINGS (KB-H070)] OK
    [HOOK - conan-center.py] pre_export(): [PYLINT EXECUTION (KB-H072)] OK
    [HOOK - conan-center.py] pre_export(): [REQUIREMENT OVERRIDE PARAMETER (KB-H075)] OK
    [HOOK - conan-center.py] pre_export(): ERROR: [CONFIG.YML HAS NEW VERSION (KB-H052)] The version "7.1.1-25" exists in "conandata.yml" but not in "../config.yml", so it will not be built. Please update "../config.yml" to include newly added version "7.1.1-25". (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H052-CONFIG.YML-HAS-NEW-VERSION) 
    ERROR: [HOOK - conan-center.py] pre_export(): Some checks failed running the hook, check the output
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

conan-center-bot avatar Jan 07 '24 20:01 conan-center-bot

Conan v1 pipeline :x:

Changes not allowed in build 8:

[imagemagick, plf_list]

Only one library can be changed in the same PR.

conan-center-bot avatar Jan 08 '24 07:01 conan-center-bot

Conan v1 pipeline :x:

Failure in build 9 (d4f6254b001de4c59d998aaf4513a3ef9ed23643):

  • imagemagick/7.1.1-25: An unexpected error happened and has been reported

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline :x:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 9 (d4f6254b001de4c59d998aaf4513a3ef9ed23643):

  • imagemagick/7.1.1-25: CI failed to create some packages (All logs)

    Logs for packageID 03f23660966e2a1a5115868b49c37f7f5c394f4c:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    -- Conan: Component target declared 'Imath::ImathConfig'
    -- Conan: Component target declared 'Imath::Imath'
    -- Conan: Target declared 'openjp2'
    -- Conan: Including build module from '/home/conan/w/prod-v2/bsr/70427/feffb/p/openj48a934e3bd0a1/p/lib/cmake/conan-official-openjpeg-variables.cmake'
    -- Conan: Target declared 'libraw::libraw'
    -- Conan: Target declared 'lcms::lcms'
    -- Conan: Target declared 'Jasper::Jasper'
    -- Conan: Target declared 'JPEG::JPEG'
    -- Conan: Including build module from '/home/conan/w/prod-v2/bsr/70427/feffb/p/jaspe50012e04acaf6/p/lib/cmake/conan-official-jasper-variables.cmake'
    -- Conan: Target declared 'TIFF::TIFF'
    -- Conan: Component target declared 'libdeflate::libdeflate_static'
    -- Conan: Target declared 'LibLZMA::LibLZMA'
    -- Conan: Including build module from '/home/conan/w/prod-v2/bsr/70427/feffb/p/xz_ut1cf28d476c611/p/lib/cmake/conan-official-xz_utils-variables.cmake'
    -- Conan: Target declared 'jbig::jbig'
    -- Conan: Component target declared 'WebP::webpdecoder'
    -- Conan: Component target declared 'WebP::sharpyuv'
    -- Conan: Component target declared 'WebP::webp'
    -- Conan: Component target declared 'WebP::webpdemux'
    -- Conan: Component target declared 'WebP::libwebpmux'
    -- Conan: Target declared 'libwebp::libwebp'
    -- Conan: Component target declared 'zstd::libzstd_static'
    -- Conan: Target declared 'LibXml2::LibXml2'
    -- Conan: Target declared 'Iconv::Iconv'
    -- Conan: Including build module from '/home/conan/w/prod-v2/bsr/70427/feffb/p/libxmac51c7767412f/p/lib/cmake/conan-official-libxml2-variables.cmake'
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_POLICY_DEFAULT_CMP0091
    
    
    -- Build files have been written to: /home/conan/w/prod-v2/bsr/cci-d5c18a7d/recipes/imagemagick/cmake/test_package/build/gcc-11-x86_64-17-release
    
    imagemagick/7.1.1-25 (test package): Running CMake.build()
    imagemagick/7.1.1-25 (test package): RUN: cmake --build "/home/conan/w/prod-v2/bsr/cci-d5c18a7d/recipes/imagemagick/cmake/test_package/build/gcc-11-x86_64-17-release" -- -j3
    Scanning dependencies of target test_package
    [ 50%] Building C object CMakeFiles/test_package.dir/test_package.c.o
    [100%] Linking C executable test_package
    [100%] Built target test_package
    
    
    ======== Testing the package: Executing test ========
    imagemagick/7.1.1-25 (test package): Running test()
    imagemagick/7.1.1-25 (test package): RUN: identify -list format
    /bin/sh: 1: identify: not found
    
    ERROR: imagemagick/7.1.1-25 (test package): Error in test() method, line 39
    	self.run("identify -list format", env="conanrun")
    	ConanException: Error 127 while executing
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

conan-center-bot avatar Jan 09 '24 13:01 conan-center-bot

Conan v1 pipeline :x:

Failure in build 10 (ab11b1c759f71640445d87bee96ac23c4936ac4e):

  • imagemagick/7.1.1-25: CI failed to create some packages (All logs)

    Logs for packageID c55511d2e163c9eba6856f586ea3f144d721588f:
    [settings]
    arch=x86_64
    build_type=Debug
    compiler=clang
    compiler.libcxx=libstdc++
    compiler.version=13
    os=Linux
    [options]
    imagemagick:shared=False
    
    [...]
    
    #define _OPENMP #define _OPENMP 
    
            ^        ^
    
    <built-in><built-in>::305305::99::  note: note: previous definition is hereprevious definition is here
    
    #define _OPENMP 201811#define _OPENMP 201811
    
            ^        ^
    
    In file included from /home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/src/MagickCore/accelerate.c:44:
    /home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    In file included from /home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/src/MagickCore/annotate.c:45:
    /home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    In file included from /home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/src/MagickCore/animate.c:42:
    /home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    /home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/src/MagickCore/accelerate.c:2628:65: warning: implicit conversion from 'long' to 'float' changes value from 3999999999 to 4.0E+9 [-Wimplicit-const-int-float-conversion]
          passes = (((1.0f * imageRows) * imageColumns * iRadius) + 3999999999) / 4000000000.0f;
                                                                  ~ ^~~~~~~~~~
    2 warnings and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/accelerate.c.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    1 warning and 1 error generated.
    1 warning and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/animate.c.o] Error 1
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/annotate.c.o] Error 1
    make[1]: *** [MagickCore/CMakeFiles/MagickCore.dir/all] Error 2
    make: *** [all] Error 2
    WARN: cairo/1.18.0: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-25 to zlib/1.3 
    WARN: freetype/2.13.2: requirement zlib/[>=1.2.10 <2] overridden by cairo/1.18.0 to zlib/1.3 
    WARN: libpng/1.6.40: requirement zlib/[>=1.2.11 <2] overridden by freetype/2.13.2 to zlib/1.3 
    WARN: glib/2.78.1: requirement zlib/[>=1.2.11 <2] overridden by cairo/1.18.0 to zlib/1.3 
    WARN: pcre2/10.42: requirement zlib/[>=1.2.11 <2] overridden by glib/2.78.1 to zlib/1.3 
    WARN: openexr/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-25 to zlib/1.3 
    WARN: libtiff/4.6.0: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-25 to zlib/1.3 
    WARN: libxml2/2.12.3: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-25 to zlib/1.3 
    imagemagick/7.1.1-25: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    imagemagick/7.1.1-25: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    imagemagick/7.1.1-25: ERROR: Package 'c55511d2e163c9eba6856f586ea3f144d721588f' build failed
    imagemagick/7.1.1-25: WARN: Build folder /home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/build/Debug
    ERROR: imagemagick/7.1.1-25: Error in build() method, line 334
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build "/home/conan/w/prod-v1/bsr/86392/aeedd/.conan/data/imagemagick/7.1.1-25/_/_/build/c55511d2e163c9eba6856f586ea3f144d721588f/build/Debug" '--' '-j3'
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline :x:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 10 (ab11b1c759f71640445d87bee96ac23c4936ac4e):

  • imagemagick/7.1.1-25: CI failed to create some packages (All logs)

    Logs for packageID 76ba6406bb2adf0a816c7460efc43fab2667e980:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=17
    compiler.libcxx=libc++
    compiler.version=13
    os=Macos
    [options]
    */*:shared=False
    
    [...]
                                      ^
    In file included from /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/src/MagickCore/animate.c:42:
    /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    In file included from /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/src/MagickCore/artifact.c:43:
    /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    In file included from /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/src/MagickCore/cache-view.c:49:
    /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    In file included from /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/src/MagickCore/accelerate.c:44:
    /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/src/MagickCore/studio.h:157:35: error: invalid token at start of a preprocessor expression
    #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
                                      ^
    1 warning and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/artifact.c.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    1 warning and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/animate.c.o] Error 1
    1 warning and 1 error generated.
    1 warning and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/attribute.c.o] Error 1
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/cache-view.c.o] Error 1
    1 warning and 1 error generated.
    1 warning and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/cache.c.o] Error 1
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/blob.c.o] Error 1
    1 warning and 1 error generated.
    1 warning and 1 error generated.
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/annotate.c.o] Error 1
    make[2]: *** [MagickCore/CMakeFiles/MagickCore.dir/accelerate.c.o] Error 1
    make[1]: *** [MagickCore/CMakeFiles/MagickCore.dir/all] Error 2
    make: *** [all] Error 2
    
    imagemagick/7.1.1-25: ERROR: 
    Package '76ba6406bb2adf0a816c7460efc43fab2667e980' build failed
    imagemagick/7.1.1-25: WARN: Build folder /Users/jenkins/w/prod-v2/bsr/71790/becae/p/b/image86c5ccdb9f5e8/b/build/Release
    *********************************************************
    Recipe 'imagemagick/7.1.1-25' cannot build its binary
    It is possible that this recipe is not Conan 2.0 ready
    If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
    If it is your recipe, check if it is updated to 2.0
    *********************************************************
    
    ERROR: imagemagick/7.1.1-25: Error in build() method, line 334
    	cmake.build()
    	ConanException: Error 2 while executing
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

conan-center-bot avatar Jan 11 '24 15:01 conan-center-bot

Conan v1 pipeline :x:

Failure in build 11 (0176c0c34de8b016b6a563e2829c0c2d1aeef9af):

  • imagemagick/7.1.1-25: CI failed to create some packages (All logs)

    Logs for packageID 4f32311aea55023f8e5f70aad2b9cbc1901d3bef:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=clang
    compiler.libcxx=libc++
    compiler.version=12
    os=Linux
    [options]
    imagemagick:shared=False
    
    [...]
    dpkg-query: no packages found matching libxv-dev
    dpkg-query: no packages found matching libxxf86vm-dev
    dpkg-query: no packages found matching libxcb-render0-dev
    dpkg-query: no packages found matching libxcb-render-util0-dev
    dpkg-query: no packages found matching libxcb-xkb-dev
    dpkg-query: no packages found matching libxcb-icccm4-dev
    dpkg-query: no packages found matching libxcb-image0-dev
    dpkg-query: no packages found matching libxcb-keysyms1-dev
    dpkg-query: no packages found matching libxcb-randr0-dev
    dpkg-query: no packages found matching libxcb-shape0-dev
    dpkg-query: no packages found matching libxcb-sync-dev
    dpkg-query: no packages found matching libxcb-xfixes0-dev
    dpkg-query: no packages found matching libxcb-xinerama0-dev
    dpkg-query: no packages found matching libxcb-dri3-dev
    dpkg-query: no packages found matching uuid-dev
    dpkg-query: no packages found matching libxcb-cursor-dev
    debconf: delaying package configuration, since apt-utils is not installed
    dpkg-query: no packages found matching libxcb-util-dev
    debconf: delaying package configuration, since apt-utils is not installed
    Delegate BZip2 found.
    Delegate LibLZMA found.
    Delegate ZLIB found.
    Delegate zstd found.
    Delegate Freetype found.
    Delegate LibXml2 found.
    CMake Error at /home/conan/w/prod-v1/bsr/89797/bcbcd/.conan/data/cmake/3.28.1/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
    Call Stack (most recent call first):
      /home/conan/w/prod-v1/bsr/89797/bcbcd/.conan/data/cmake/3.28.1/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
      /home/conan/w/prod-v1/bsr/89797/bcbcd/.conan/data/cmake/3.28.1/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.28/Modules/FindOpenMP.cmake:580 (find_package_handle_standard_args)
      cmake/delegates.cmake:5 (find_package)
      cmake/delegates.cmake:36 (magick_find_delegate)
      CMakeLists.txt:73 (include)
    
    
    WARN: cairo/1.18.0: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-25 to zlib/1.3 
    WARN: freetype/2.13.2: requirement zlib/[>=1.2.10 <2] overridden by cairo/1.18.0 to zlib/1.3 
    WARN: libpng/1.6.40: requirement zlib/[>=1.2.11 <2] overridden by freetype/2.13.2 to zlib/1.3 
    WARN: glib/2.78.1: requirement zlib/[>=1.2.11 <2] overridden by cairo/1.18.0 to zlib/1.3 
    WARN: pcre2/10.42: requirement zlib/[>=1.2.11 <2] overridden by glib/2.78.1 to zlib/1.3 
    WARN: openexr/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-25 to zlib/1.3 
    WARN: libtiff/4.6.0: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-25 to zlib/1.3 
    WARN: libxml2/2.12.3: requirement zlib/[>=1.2.11 <2] overridden by imagemagick/7.1.1-25 to zlib/1.3 
    imagemagick/7.1.1-25: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    imagemagick/7.1.1-25: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    imagemagick/7.1.1-25: ERROR: Package '4f32311aea55023f8e5f70aad2b9cbc1901d3bef' build failed
    imagemagick/7.1.1-25: WARN: Build folder /home/conan/w/prod-v1/bsr/89797/bcbcd/.conan/data/imagemagick/7.1.1-25/_/_/build/4f32311aea55023f8e5f70aad2b9cbc1901d3bef/build/Release
    ERROR: imagemagick/7.1.1-25: Error in build() method, line 340
    	cmake.configure()
    	ConanException: Error 1 while executing cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/w/prod-v1/bsr/89797/bcbcd/.conan/data/imagemagick/7.1.1-25/_/_/build/4f32311aea55023f8e5f70aad2b9cbc1901d3bef/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/conan/w/prod-v1/bsr/89797/bcbcd/.conan/data/imagemagick/7.1.1-25/_/_/package/4f32311aea55023f8e5f70aad2b9cbc1901d3bef" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/w/prod-v1/bsr/89797/bcbcd/.conan/data/imagemagick/7.1.1-25/_/_/build/4f32311aea55023f8e5f70aad2b9cbc1901d3bef/src"
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline :x:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 11 (0176c0c34de8b016b6a563e2829c0c2d1aeef9af):

  • imagemagick/7.1.1-25: CI failed to create some packages (All logs)

    Logs for packageID 76ba6406bb2adf0a816c7460efc43fab2667e980:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=17
    compiler.libcxx=libc++
    compiler.version=13
    os=Macos
    [options]
    */*:shared=False
    
    [...]
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clReleaseContext", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clReleaseEvent", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clReleaseKernel", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clReleaseMemObject", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clReleaseProgram", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clRetainEvent", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clRetainMemObject", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clSetEventCallback", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clSetKernelArg", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
      "_clWaitForEvents", referenced from:
          _InitializeOpenCL in libMagickCore-7.Q16HDRI.a(opencl.c.o)
    [ 97%] Building CXX object Magick++/CMakeFiles/Magick++.dir/lib/Pixels.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [utilities/magick] Error 1
    make[1]: *** [utilities/CMakeFiles/magick.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 98%] Building CXX object Magick++/CMakeFiles/Magick++.dir/lib/ResourceLimits.cpp.o
    [ 98%] Building CXX object Magick++/CMakeFiles/Magick++.dir/lib/SecurityPolicy.cpp.o
    [ 98%] Building CXX object Magick++/CMakeFiles/Magick++.dir/lib/Statistic.cpp.o
    [ 99%] Building CXX object Magick++/CMakeFiles/Magick++.dir/lib/STL.cpp.o
    [ 99%] Building CXX object Magick++/CMakeFiles/Magick++.dir/lib/Thread.cpp.o
    [100%] Building CXX object Magick++/CMakeFiles/Magick++.dir/lib/TypeMetric.cpp.o
    [100%] Linking CXX static library libMagick++-7.Q16HDRI.a
    [100%] Built target Magick++
    make: *** [all] Error 2
    
    imagemagick/7.1.1-25: ERROR: 
    Package '76ba6406bb2adf0a816c7460efc43fab2667e980' build failed
    imagemagick/7.1.1-25: WARN: Build folder /Users/jenkins/w/prod-v2/bsr/75086/bdcda/p/b/imagebf966bfd70826/b/build/Release
    *********************************************************
    Recipe 'imagemagick/7.1.1-25' cannot build its binary
    It is possible that this recipe is not Conan 2.0 ready
    If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
    If it is your recipe, check if it is updated to 2.0
    *********************************************************
    
    ERROR: imagemagick/7.1.1-25: Error in build() method, line 341
    	cmake.build()
    	ConanException: Error 2 while executing
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

conan-center-bot avatar Jan 15 '24 17:01 conan-center-bot

Hey there, small feedback on the relevance of this PR:

libvips requires imagemagick for working with .bmp files ( https://github.com/libvips/libvips/issues/1528 ). If I understand the changes correctly, this PR would enable imagemagick for windows? I would very much welcome this.

jsinge avatar Apr 04 '24 06:04 jsinge

@valgur What is the state of this? I tried using it with the newest Imagemagick (7.1.1-32) and it worked? I had to make some changes though: I changed the freetype version to 2.15.0 and disabled fftw and openmp since they did not work. In the test_package the identify test does not work, as it cannot find it, and the check for gslib and ps did not work (both not in the options?). When disabling these everything seemed to work?

(Built on Windows mvsc)

Julianiolo avatar May 14 '24 13:05 Julianiolo

@Julianiolo Thanks for testing the recipe. That's good to know!

However, the custom build system included from the forked repo is a too significant change to be acceptable on CCI, I'm afraid. It should really be merged upstream instead, ultimately.

For CCI, a more realistic approach would be to substitute the custom "configure.exe" executable on Windows with a simpler workaround, I think.

valgur avatar May 14 '24 14:05 valgur

Yeah I guess the build situation with imagemagick is a little .... unfortunate at the moment.

About an configure.exe workaround: I guess that could work, but that would probably be the same deal as with cmake now. I'm not sure on how this is handled best. Maybe using the cmake solution isn't that bad of an idea?, it does not seem they will adopt more portable build systems any time soon ...

Julianiolo avatar May 14 '24 16:05 Julianiolo

I guess it would maybe be possible to use msys2/mingw gcc, but I don't know how conan would/can handle that, when building with msvc...

Julianiolo avatar May 14 '24 16:05 Julianiolo

However, the custom build system included from the forked repo is a too significant change to be acceptable on CCI, I'm afraid. It should really be merged upstream instead, ultimately.

The big problem is that they won't accept any new build system unless it is used by the community and "proven" to work, so at least when I tried to get this into CCI it was with the intent to do just that and then possibly get it merged upstream later. But yes it would be quite some code to maintain on the recipe level unfortunately.

Cyriuz avatar May 14 '24 17:05 Cyriuz

Thanks for working on this! I've been using this recipe locally and it's working fairly well.

I've encountered two small issues though:

  • On macOS, linking fails unless with_opencl=False: "_clBuildProgram", referenced from: _InitializeOpenCL in libMagickCore-7.Q16HDRI.a[55](opencl.c.o) (maybe it's picking up the wrong opencl library?)
  • Conan generates CMake targets named imagemagick::Magick++/MagickCore from the recipe, but CMake's FindImageMagick module ImageMagick::Magick++/MagickCore. I think this can be fixed by setting self.cpp_info.components["MagickCore"].set_property("cmake_target_name", "ImageMagick::MagickCore")

Since I copied the recipe locally I can just work around this issues easily, but I figured I'd let you know :)

neobrain avatar May 18 '24 08:05 neobrain

I patched out the MFC dependency for configure.exe on Windows at #18623, so that version should support all platforms now.

valgur avatar May 19 '24 10:05 valgur

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 15 '25 06:02 github-actions[bot]

hello world

valgur avatar Feb 15 '25 09:02 valgur