lcms2.h not found correctly

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
hbfl
Posts: 2
Joined: 2015-10-17T11:13:41-07:00
Authentication code: 1151

lcms2.h not found correctly

Post by hbfl »

started compiling with version 6.9.2-4, configure can not find the lcms2.h header correctly. The header located in /usr/include but configure locks only for /usr/include/lcms2

Ok, I can fix this by create a symlink and configure can find them, now in config/config.h it was defined as
  • /* Define if you have the <lcms2/lcms2.h> header file. */
    #define HAVE_LCMS2_LCMS2_H 1
but in magick/property.c the entry was defined as
  • #if defined(MAGICKCORE_LCMS_DELEGATE)
    #if defined(MAGICKCORE_HAVE_LCMS_LCMS2_H)
    #include <lcms/lcms2.h>
and so the correct header was not found

them same mistake in version 6.9.1-10

I am going back to 9.8.9-8, configure found the correct header in /usr/include, but in config/config.h and magick/property.c it was the same mistake

this patch solved this

Code: Select all

--- magick/property.c.orig  2015-10-17 17:54:09.767928830 +0200
+++ magick/property.c   2015-10-17 17:54:32.635928244 +0200
@@ -81,8 +81,8 @@
 #include "magick/version.h"
 #include "magick/xml-tree.h"
 #if defined(MAGICKCORE_LCMS_DELEGATE)
-#if defined(MAGICKCORE_HAVE_LCMS_LCMS2_H)
-#include <lcms/lcms2.h>
+#if defined(MAGICKCORE_HAVE_LCMS2_LCMS2_H)
+#include <lcms2/lcms2.h>
 #elif defined(MAGICKCORE_HAVE_LCMS2_H)
 #include "lcms2.h"
 #elif defined(MAGICKCORE_HAVE_LCMS_LCMS_H)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: lcms2.h not found correctly

Post by fmw42 »

It would probably help the IM developers if you provided your platform
hbfl
Posts: 2
Joined: 2015-10-17T11:13:41-07:00
Authentication code: 1151

Re: lcms2.h not found correctly

Post by hbfl »

oh, sorry

linux gcc-4.7.4 glibc-2.15 kernel-3.2.71 lcms2-2.7
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: lcms2.h not found correctly

Post by magick »

We'll add your patch to ImageMagick 6.9.2-5 Beta by sometime tomorrow. Thanks.
ballapete
Posts: 1
Joined: 2016-04-01T14:30:43-07:00
Authentication code: 1151

Re: lcms2.h not found correctly

Post by ballapete »

The same is true on Mac OS X 10.6.8, Snow Leopard, with ImageMagick 6.9.3. The header file is installed in the include directory directly. And pkg-config correctly reports this directory's name.
Post Reply