View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015007CMakeModulespublic2014-07-05 05:002016-06-10 14:31
Reporterbroucari 
Assigned ToKitware Robot 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformDebian OSlinuxOS Versionsid
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0015007: FindImageMagick detection broken with multi-arch imagemagick, need CFLAGS from pkgconfig
DescriptionImagemagick detection is still broken with cmake. Indeed some headers are installed under arch dependant dir and it need to specify CFLAGS in order to get quantum selection.

May be related to 0014012

Reported downstream as:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747907 [^]

I have made an untested patch using pkg-config.

Please fix it, it lead to multiple FTBFS.

Thanks

Steps To ReproduceDownload recent imagemagick from debian experimental, and try to compile libtuxcap See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747908 [^]
Additional InformationBlock newer imagemagick in experimental.
TagsNo tags attached.
Attached Files? file icon Fix-imagemagick-multiarch [^] (3,509 bytes) 2014-07-05 05:00 [Show Content]
diff file icon Imagemagick2try.diff [^] (1,850 bytes) 2014-07-12 16:22 [Show Content]
? file icon patch [^] (2,403 bytes) 2014-07-22 16:44 [Show Content]
patch file icon 0001-FindImageMagick-Find-arch-include-dir-15007.patch [^] (2,135 bytes) 2014-07-23 09:42 [Show Content]
patch file icon 0002-FindImageMagick-Provide-per-component-include-dirs-15007.patch [^] (2,015 bytes) 2014-07-23 15:35 [Show Content]

 Relationships
related to 0014012closedBrad King FindImageMagick.cmake needs update for ImageMagick >= 6.8.0-8, perhaps use pkgconfig 

  Notes
(0036321)
Brad King (manager)
2014-07-07 09:57

One reason little progress on this module is made is that there is no module maintainer for it as mentioned in 0014012:0032631.

The patch proposed in this issue hard-codes use of pkgconfig if it is available but we need to still fall back to a normal search if pkgconfig fails to find the component. See 0014012:0036320 for an update to the patch in 0014012.
(0036357)
broucari (reporter)
2014-07-12 16:23

Hi,

I have attached a second patch with fallback. Please review
(0036372)
Brad King (manager)
2014-07-14 11:06

Thanks. However, we still need to let users control the find results in the cache. The pkgconfig results can be used at most for hints to the normal find_ commands. See 0001-FindImageMagick-Use-pkgconfig-hints-if-available-14012.patch in 0014012.

Also, LDFLAGS cannot be used as the _LIBRARY result. Perhaps other fields from FindPkgConfig can be used:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindPkgConfig.cmake;hb=v3.0.0#l369 [^]
(0036375)
broucari (reporter)
2014-07-14 13:32

Hi,

Your patch is perfect, CFLAGS lack is not critical, imagemagick try to guess the correct answer and will only warn for now.

I do not understand the LDFLAGS part. Your solution is good
(0036379)
Brad King (manager)
2014-07-14 15:09

Re 0015007:0036375: I've applied the patch as recorded in 0014012:0036377.

This issue will remain open pending a solution for CFLAGS.
(0036430)
broucari (reporter)
2014-07-22 15:24

The previous patch does not work indeed:
- imagemagick need -I/usr/include/ImagemaMagick
AND -I/usr/include/somearch/ImagemaMagick-6

pkgconfig give the two path
(0036431)
Brad King (manager)
2014-07-22 15:35

Re 0015007:0036430: We search for ImagemaMagick-6 since 0014174 but still only return one of the two. We still need a solution that works without pkgconfig, so the module will have to be taught that both directories are needed.

Are they always next to one another? What determines the number "6" in the name?
(0036432)
broucari (reporter)
2014-07-22 16:45

The last patch work, at least for me.

Bastien
(0036436)
Brad King (manager)
2014-07-23 09:43

Re 0015007:0036432: Thanks! Based on that I constructed a slightly simpler version. Please try "0001-FindImageMagick-Find-arch-include-dir-15007.patch".
(0036441)
broucari (reporter)
2014-07-23 13:49

No it does not work because you do not add arch include to component include variable.

Bastien
(0036442)
Brad King (manager)
2014-07-23 14:04

Re 0015007:0036441: Although ImageMagick_<component>_INCLUDE_DIRS is documented I do not see anywhere that sets it prior to your patch. Fixing that is a separate problem of either setting it or removing the docs.

Do the proper paths end up in ImageMagick_INCLUDE_DIRS?
(0036443)
broucari (reporter)
2014-07-23 14:40

Yes ImageMagick_INCLUDE_DIRS are set.

I do not agree with you ImageMagick_<component>_INCLUDE_DIRS end in Cmake cache due to findPath.

Bastien
(0036445)
Brad King (manager)
2014-07-23 14:56

Re 0015007:0036443: Only the singular name "ImageMagick_${component}_INCLUDE_DIR" is in the cache, and that one is not documented for public use. Now
"ImageMagick_${component}_ARCH_INCLUDE_DIR" is also in the cache, but also not documented for public use.

If we want to set the plural ImageMagick_${component}_INCLUDE_DIRS name to satisfy the documentation then that can be done as a follow-up fix. It should not be cached.
(0036447)
Brad King (manager)
2014-07-23 15:35

Re 0015007:0036445: Please try "0002-FindImageMagick-Provide-per-component-include-dirs-15007.patch" on top of the previous patch to get ImageMagick_${component}_INCLUDE_DIRS.
(0036453)
broucari (reporter)
2014-07-24 13:11

Now work as a charm
(0036454)
Brad King (manager)
2014-07-24 13:44

Re 0015007:0036453: Thanks for testing! Applied:

 FindImageMagick: Find arch include dir
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f5581c1 [^]

 FindImageMagick: Provide per-component include dirs
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1342e022 [^]

This issue must still remain open as in 0015007:0036379.
(0042581)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-07-05 05:00 broucari New Issue
2014-07-05 05:00 broucari File Added: Fix-imagemagick-multiarch
2014-07-07 09:27 Brad King Relationship added related to 0014012
2014-07-07 09:57 Brad King Note Added: 0036321
2014-07-07 09:57 Brad King Status new => backlog
2014-07-12 16:22 broucari File Added: Imagemagick2try.diff
2014-07-12 16:23 broucari Note Added: 0036357
2014-07-14 11:06 Brad King Note Added: 0036372
2014-07-14 13:32 broucari Note Added: 0036375
2014-07-14 15:08 Brad King Summary [patch] Imagemagick detection stlli broken with multi-arch imagemagick => FindImageMagick detection broken with multi-arch imagemagick, need CFLAGS from pkgconfig
2014-07-14 15:09 Brad King Note Added: 0036379
2014-07-22 15:24 broucari Note Added: 0036430
2014-07-22 15:35 Brad King Note Added: 0036431
2014-07-22 16:44 broucari File Added: patch
2014-07-22 16:45 broucari Note Added: 0036432
2014-07-23 09:42 Brad King File Added: 0001-FindImageMagick-Find-arch-include-dir-15007.patch
2014-07-23 09:43 Brad King Note Added: 0036436
2014-07-23 13:49 broucari Note Added: 0036441
2014-07-23 14:04 Brad King Note Added: 0036442
2014-07-23 14:40 broucari Note Added: 0036443
2014-07-23 14:56 Brad King Note Added: 0036445
2014-07-23 15:35 Brad King File Added: 0002-FindImageMagick-Provide-per-component-include-dirs-15007.patch
2014-07-23 15:35 Brad King Note Added: 0036447
2014-07-24 13:11 broucari Note Added: 0036453
2014-07-24 13:44 Brad King Note Added: 0036454
2016-06-10 14:29 Kitware Robot Note Added: 0042581
2016-06-10 14:29 Kitware Robot Status backlog => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team