View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014012CMakeModulespublic2013-03-14 12:012015-01-05 08:39
ReporterOrion Poplawski 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 2.8.10.2 
Target VersionCMake 3.1Fixed in VersionCMake 3.1 
Summary0014012: FindImageMagick.cmake needs update for ImageMagick >= 6.8.0-8, perhaps use pkgconfig
Description    From ImageMagick's 6.8.0-8 changelog:

  ABI is incompatible if quantum depth change. Add abi indication to library
  name, thanks to Bastien Roucaries (reference
  http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=22352 [^] [^]).

The library names now include a new suffix, either -6.Q8 or -6.Q16 (maybe others too?), depending on the quantum depth ImageMagick was compiled with.

For example on Fedora Linux we have the following library name changes:

/usr/lib/libMagick++.so.5 => /usr/lib/libMagick++-6.Q16.so.1
/usr/lib/libMagickCore.so.5 => /usr/lib/libMagickCore-6.Q16.so.1
/usr/lib/libMagickWand.so.5 => /usr/lib/libMagickWand-6.Q16.so.1


I think FindImageMagick really should be using pkgconfig instead of hacks to search for possible names.
TagsNo tags attached.
Attached Filespatch file icon cmake-2.8.11-rc1-IM_pkgconfig_hints.patch [^] (2,294 bytes) 2013-03-16 21:28 [Show Content]
patch file icon cmake-2.8.11-rc1-IM_pkgconfig_hints-2.patch [^] (2,578 bytes) 2013-03-18 10:23 [Show Content]
patch file icon 0001-FindImageMagick-Use-pkgconfig-hints-if-available-14012.patch [^] (1,735 bytes) 2014-07-07 09:53 [Show Content]

 Relationships
related to 0013859closedBrad King FindImageMagick.cmake needs update for ImageMagick >= 6.8.0-8 
related to 0014174closedBrad King FindImageMagick.cmake does not find new imagemagick include dir 
related to 0015007closedKitware Robot FindImageMagick detection broken with multi-arch imagemagick, need CFLAGS from pkgconfig 

  Notes
(0032631)
Brad King (manager)
2013-03-14 13:26

Our policy for find module maintenance is here:

 http://www.cmake.org/Wiki/CMake:Module_Maintainers [^]

If you would like to implement the proposed pkgconfig functionality we welcome the contribution.

Of course the "C" in CMake stands for "cross-platform" and pkgconfig does not work on all Windows toolchains so if ImageMagick supports Windows there still needs to be a way to work without pkgconfig.
(0032652)
Rex Dieter (reporter)
2013-03-16 21:31

cmake-2.8.11-rc1-IM_pkgconfig_hints.patch is a first draft if adding pkg-config hints as well as searching for new 6.<quantum> style libraries.

Probably would to conditionalize the pkgconfig support for certain platforms (wrapped in 'if (NOT WIN32)' ... ), but hopefully you get the idea.
(0032654)
Brad King (manager)
2013-03-18 09:02

Re 0014012:0032652: Thanks, that looks like a good start. I do not think we need a platform conditional, my request in 0014012:0032631 was simply that it also work without pkgconfig.

In order to be sure the PKG_CHECK_MODULES macro is available one must first find_package(PkgConfig QUIET). See Modules/FindLibXml2.cmake for an example.
(0032655)
Rex Dieter (reporter)
2013-03-18 10:23

Great, iteration 2, cmake-2.8.11-rc1-IM_pkgconfig_hints-2.patch
adds find_package(PkgConfig QUIET)
(0032657)
Brad King (manager)
2013-03-18 11:10

Re 0014012:0032655: Thanks. Orion, does Rex's patch work for you? Please also try it with the hard-coded name combinations commented out so you know it is pkgconfig that works.
(0032658)
Orion Poplawski (reporter)
2013-03-18 11:15

Brad - Rex is building the Fedora cmake package with this patch, so we are doing our testing there, and Rex can speak for me about whether this is fixed or not. So far so good it seems though. I'll try to do a test with the name search commented out soon.
(0032660)
Orion Poplawski (reporter)
2013-03-18 11:41

So, the pkgconfig patch really isn't doing much to help find the name for the library other than telling us *where* to look.

We'd need to somehow parse:

# pkg-config MagickCore --libs
-lm -lMagickCore-6.Q16

to extract the name to do that. Brad - any suggestions here?
(0032661)
Orion Poplawski (reporter)
2013-03-18 12:12

I've posted this: http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=22986 [^] to see if we can get ImageMagick to export a library name.
(0032662)
Brad King (manager)
2013-03-18 12:33

If ImageMagick is willing to become CMake-aware they could provide a package configuration file:

 http://www.cmake.org/Wiki/CMake/Tutorials/Packaging [^]

even if they don't build with CMake. That would allow find_package to work even without a find module.

Qt5 does this for example.
(0032663)
Brad King (manager)
2013-03-18 12:34

Re 0014012:0032660: I'm not particularly familiar with CMake's PkgConfig API so I don't know whether it already has something for parsing library names.
(0032664)
Orion Poplawski (reporter)
2013-03-18 12:36

I passed your CMake configuration file suggestion on in my thread as well. Good idea!
(0032668)
Brad King (manager)
2013-03-18 16:41

Regardless of how future suffixes are detected (pkgconfig or upstream help) we still need to detect the existing versions. I've taken that part of Rex's patch:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbd895b8 [^]
(0036320)
Brad King (manager)
2014-07-07 09:54

I've split what remains of Rex's patch out as attachment "0001-FindImageMagick-Use-pkgconfig-hints-if-available-14012.patch".

According to 0015007 it looks like it may be necessary to use pkgconfig to get CFLAGS in some cases.
(0036356)
broucari (reporter)
2014-07-12 16:13

No the problem is more than cflags. You need to check arch include dir also
(0036377)
Brad King (manager)
2014-07-14 15:05

After the report in 0015007:0036375 I've applied the rest of Rex's patch:

 FindImageMagick: Use pkgconfig hints if available
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90245fe8 [^]
(0036378)
Brad King (manager)
2014-07-14 15:07

The remaining issue is to use the CFLAGS, and issue 0015007 covers that, so I've resolved this issue.
(0037584)
Robert Maynard (manager)
2015-01-05 08:39

Closing resolved issues that have not been updated in more than 4 months

 Issue History
Date Modified Username Field Change
2013-03-14 12:01 Orion Poplawski New Issue
2013-03-14 13:23 Brad King Relationship added related to 0013859
2013-03-14 13:26 Brad King Note Added: 0032631
2013-03-14 13:26 Brad King Severity major => minor
2013-03-14 13:26 Brad King Status new => backlog
2013-03-16 21:28 Rex Dieter File Added: cmake-2.8.11-rc1-IM_pkgconfig_hints.patch
2013-03-16 21:31 Rex Dieter Note Added: 0032652
2013-03-18 09:02 Brad King Note Added: 0032654
2013-03-18 10:23 Rex Dieter File Added: cmake-2.8.11-rc1-IM_pkgconfig_hints-2.patch
2013-03-18 10:23 Rex Dieter Note Added: 0032655
2013-03-18 11:10 Brad King Note Added: 0032657
2013-03-18 11:15 Orion Poplawski Note Added: 0032658
2013-03-18 11:41 Orion Poplawski Note Added: 0032660
2013-03-18 12:12 Orion Poplawski Note Added: 0032661
2013-03-18 12:33 Brad King Note Added: 0032662
2013-03-18 12:34 Brad King Note Added: 0032663
2013-03-18 12:36 Orion Poplawski Note Added: 0032664
2013-03-18 16:41 Brad King Note Added: 0032668
2013-05-28 09:43 Brad King Relationship added related to 0014174
2014-07-07 09:27 Brad King Relationship added related to 0015007
2014-07-07 09:53 Brad King File Added: 0001-FindImageMagick-Use-pkgconfig-hints-if-available-14012.patch
2014-07-07 09:54 Brad King Note Added: 0036320
2014-07-12 16:13 broucari Note Added: 0036356
2014-07-14 15:05 Brad King Note Added: 0036377
2014-07-14 15:06 Brad King Assigned To => Brad King
2014-07-14 15:06 Brad King Status backlog => resolved
2014-07-14 15:06 Brad King Resolution open => fixed
2014-07-14 15:06 Brad King Fixed in Version => CMake 3.1
2014-07-14 15:06 Brad King Target Version => CMake 3.1
2014-07-14 15:07 Brad King Note Added: 0036378
2015-01-05 08:39 Robert Maynard Note Added: 0037584
2015-01-05 08:39 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team