unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7955: configure does not thoroughly test for ImageMagick includes
@ 2011-02-01 20:38 Glenn Morris
  2011-02-02  2:48 ` Chong Yidong
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Glenn Morris @ 2011-02-01 20:38 UTC (permalink / raw)
  To: 7955

Package: emacs
Version: 24.0.50
Severity: minor

I tried to build the current trunk on a RHEL 4.8 system.
This has ImageMagick 6.0.7 installed.
configure decided that ImageMagick was usable:

  checking for Wand... yes
  checking IMAGEMAGICK_CFLAGS...  
  checking IMAGEMAGICK_LIBS... -lWand -lMagick  
  checking for MagickExportImagePixels... no
  [...]
  Does Emacs use imagemagick?                             yes

However, the build failed because of this:

  image.c:7455:29: warning: wand/MagickWand.h: No such file or directory

The system has /usr/include/wand/magick_wand.h, but it does not
have /usr/include/wand/MagickWand.h. Looks like the former is now
deprecated. The latter does exist on RHEL 5.5, with ImageMagick 6.2.8.

Obviously I can just re-configure using --without-imagemagick, but
Emacs should do this for me. Either configure should test for some
required minimum version of ImageMagick (I was not able to find out in
what version wand/MagickWand.h was added); or image.c should fall back
to wand/magick_wand.h if it can.






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: configure does not thoroughly test for ImageMagick includes
  2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
@ 2011-02-02  2:48 ` Chong Yidong
  2011-02-02  9:30   ` joakim
  2011-02-03  8:16 ` bug#7955: reply from the IM team joakim
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Chong Yidong @ 2011-02-02  2:48 UTC (permalink / raw)
  To: Joakim Verona; +Cc: 7955

Joakim, mind taking a look at this?  Thanks.


Glenn Morris <rgm@gnu.org> writes:

> Package: emacs
> Version: 24.0.50
> Severity: minor
>
> I tried to build the current trunk on a RHEL 4.8 system.
> This has ImageMagick 6.0.7 installed.
> configure decided that ImageMagick was usable:
>
>   checking for Wand... yes
>   checking IMAGEMAGICK_CFLAGS...
>   checking IMAGEMAGICK_LIBS... -lWand -lMagick
>   checking for MagickExportImagePixels... no
>   [...]
>   Does Emacs use imagemagick?                             yes
>
> However, the build failed because of this:
>
>   image.c:7455:29: warning: wand/MagickWand.h: No such file or directory
>
> The system has /usr/include/wand/magick_wand.h, but it does not
> have /usr/include/wand/MagickWand.h. Looks like the former is now
> deprecated. The latter does exist on RHEL 5.5, with ImageMagick 6.2.8.
>
> Obviously I can just re-configure using --without-imagemagick, but
> Emacs should do this for me. Either configure should test for some
> required minimum version of ImageMagick (I was not able to find out in
> what version wand/MagickWand.h was added); or image.c should fall back
> to wand/magick_wand.h if it can.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: configure does not thoroughly test for ImageMagick includes
  2011-02-02  2:48 ` Chong Yidong
@ 2011-02-02  9:30   ` joakim
  2011-02-02 19:32     ` Glenn Morris
  0 siblings, 1 reply; 16+ messages in thread
From: joakim @ 2011-02-02  9:30 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 7955

Chong Yidong <cyd@stupidchicken.com> writes:

> Joakim, mind taking a look at this?  Thanks.

I'll ask the ImageMagick maintainers.

If that fails, I can try to add a specific configure check for the include file
we need.

If I could get a pointer to a virtualization image for rhel 4.8 that
would be splendid too.

>
> Glenn Morris <rgm@gnu.org> writes:
>
>> Package: emacs
>> Version: 24.0.50
>> Severity: minor
>>
>> I tried to build the current trunk on a RHEL 4.8 system.
>> This has ImageMagick 6.0.7 installed.
>> configure decided that ImageMagick was usable:
>>
>>   checking for Wand... yes
>>   checking IMAGEMAGICK_CFLAGS...
>>   checking IMAGEMAGICK_LIBS... -lWand -lMagick
>>   checking for MagickExportImagePixels... no
>>   [...]
>>   Does Emacs use imagemagick?                             yes
>>
>> However, the build failed because of this:
>>
>>   image.c:7455:29: warning: wand/MagickWand.h: No such file or directory
>>
>> The system has /usr/include/wand/magick_wand.h, but it does not
>> have /usr/include/wand/MagickWand.h. Looks like the former is now
>> deprecated. The latter does exist on RHEL 5.5, with ImageMagick 6.2.8.
>>
>> Obviously I can just re-configure using --without-imagemagick, but
>> Emacs should do this for me. Either configure should test for some
>> required minimum version of ImageMagick (I was not able to find out in
>> what version wand/MagickWand.h was added); or image.c should fall back
>> to wand/magick_wand.h if it can.

-- 
Joakim Verona





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: configure does not thoroughly test for ImageMagick includes
  2011-02-02  9:30   ` joakim
@ 2011-02-02 19:32     ` Glenn Morris
  0 siblings, 0 replies; 16+ messages in thread
From: Glenn Morris @ 2011-02-02 19:32 UTC (permalink / raw)
  To: joakim; +Cc: 7955, Chong Yidong

joakim@verona.se wrote:

> If I could get a pointer to a virtualization image for rhel 4.8 that
> would be splendid too.

I don't think you can get one without paying Red Hat cash money;
but Scientific Linux:

http://www.scientificlinux.org/
http://www.scientificlinux.org/distributions/4x/48/

or CentOS

http://www.centos.org/
http://mirror.centos.org/centos/4/isos/

ought to be functionally equivalent in every way.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: reply from the IM team
  2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
  2011-02-02  2:48 ` Chong Yidong
@ 2011-02-03  8:16 ` joakim
  2011-02-08 19:19   ` Glenn Morris
  2011-02-11 23:38 ` bug#7955: patch for imagemagick header rename joakim
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: joakim @ 2011-02-03  8:16 UTC (permalink / raw)
  To: 7955

http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=17985

basically:

,----
| The magick_wand.h header file was deprecated after ImageMagick version 6. Its still included in the distribution but probably should not be used since it will be removed in version 7 of ImageMagick (due in 3-4 years). It should not be a problem. Change your configure.ac file to check for MagickWand.h then use a conditional compile, something like:
| 
| #if defined (HAVE_MAGICKWAND_H)
| #include <wand/MagickWand.h>
| #else
| #include <wand/magick_wand.h>
| #endif /* HAVE_MAGICKWAND_H */
`----

-- 
Joakim Verona





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: reply from the IM team
  2011-02-03  8:16 ` bug#7955: reply from the IM team joakim
@ 2011-02-08 19:19   ` Glenn Morris
  0 siblings, 0 replies; 16+ messages in thread
From: Glenn Morris @ 2011-02-08 19:19 UTC (permalink / raw)
  To: joakim; +Cc: 7955


OK, so can you implement that then?





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
  2011-02-02  2:48 ` Chong Yidong
  2011-02-03  8:16 ` bug#7955: reply from the IM team joakim
@ 2011-02-11 23:38 ` joakim
  2011-02-12  1:11 ` Glenn Morris
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: joakim @ 2011-02-11 23:38 UTC (permalink / raw)
  To: 7955, rgm

I have a patch attempt now. I was going to test it and push it to the
imagemagick branch but experienced some infuriating setbacks.

If you could help me test and commit that would be spectacular.


=== modified file 'src/image.c'
--- src/image.c	2011-02-01 19:46:21 +0000
+++ src/image.c	2011-02-11 23:23:42 +0000
@@ -7452,7 +7452,12 @@
 /* The GIF library also defines DrawRectangle, but its never used in Emacs.
    Therefore rename the function so it doesnt collide with ImageMagick.  */
 #define DrawRectangle DrawRectangleGif
+#if defined (HAVE_WAND_MAGICKWAND_H)
 #include <wand/MagickWand.h>
+#else
+#include <wand/magick_wand.h>
+#endif /* HAVE_MAGICKWAND_H */
+
 
 /* imagemagick_load_image is a helper function for imagemagick_load,
    which does the actual loading given contents and size, apart from
=== modified file 'configure.in'
--- configure.in	2011-01-31 23:54:50 +0000
+++ configure.in	2011-02-11 23:20:24 +0000
@@ -1832,6 +1832,7 @@
       CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
       LIBS="$IMAGEMAGICK_LIBS $LIBS"
       AC_CHECK_FUNCS(MagickExportImagePixels)
+      AC_CHECK_HEADERS(wand/MagickWand.h)
     fi
   fi
 fi



-- 
Joakim Verona





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
                   ` (2 preceding siblings ...)
  2011-02-11 23:38 ` bug#7955: patch for imagemagick header rename joakim
@ 2011-02-12  1:11 ` Glenn Morris
  2011-02-12 22:39   ` Chong Yidong
  2011-02-12 23:37 ` Glenn Morris
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Glenn Morris @ 2011-02-12  1:11 UTC (permalink / raw)
  To: joakim; +Cc: 7955


Seems fine on RHEL5. On RHEL4, build still fails.

configure says:

checking IMAGEMAGICK_CFLAGS...  
checking IMAGEMAGICK_LIBS... -lWand -lMagick  
checking for MagickExportImagePixels... no
checking wand/MagickWand.h usability... no
checking wand/MagickWand.h presence... no
checking for wand/MagickWand.h... no
  Does Emacs use imagemagick?                             yes

make says:

image.c: In function `imagemagick_load_image':
image.c:7521: warning: implicit declaration of function `MagickWandGenesis'
image.c:7525: warning: implicit declaration of function `MagickSetResolution'
image.c:7532: warning: implicit declaration of function `MagickPingImageBlob'
image.c:7560: warning: implicit declaration of function `AcquireExceptionInfo'
image.c:7560: warning: assignment makes pointer from integer without a cast
image.c:7725: warning: implicit declaration of function `PixelGetMagickColor'
image.c:7809: warning: implicit declaration of function `MagickWandTerminus'
image.c: In function `Fimagemagick_types':
image.c:7899: error: too many arguments to function `GetMagickList'
make[1]: *** [image.o] Error 1

/usr/include/magick/magick.h says:

 **GetMagickList(const char *,unsigned long *),


Looks like it may be best for configure to check for a minimum
imagemagick version.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-12  1:11 ` Glenn Morris
@ 2011-02-12 22:39   ` Chong Yidong
  2011-02-13  0:28     ` joakim
  0 siblings, 1 reply; 16+ messages in thread
From: Chong Yidong @ 2011-02-12 22:39 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 7955, joakim

Glenn Morris <rgm@gnu.org> writes:

> Seems fine on RHEL5. On RHEL4, build still fails.
>
> configure says:
>
> checking IMAGEMAGICK_CFLAGS...
> checking IMAGEMAGICK_LIBS... -lWand -lMagick
> checking for MagickExportImagePixels... no
> checking wand/MagickWand.h usability... no
> checking wand/MagickWand.h presence... no
> checking for wand/MagickWand.h... no
>   Does Emacs use imagemagick?                             yes

ImageMagick-6.0 is almost 7 years old.  Let's just set HAVE_IMAGEMAGICK
back to "no" if AC_CHECK_HEADER doesn't find MagickWand.h, and not try
to handle the magick_wand.h case.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
                   ` (3 preceding siblings ...)
  2011-02-12  1:11 ` Glenn Morris
@ 2011-02-12 23:37 ` Glenn Morris
  2011-02-14 20:13 ` Glenn Morris
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Glenn Morris @ 2011-02-12 23:37 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 7955, joakim

Chong Yidong wrote:

> ImageMagick-6.0 is almost 7 years old. Let's just set HAVE_IMAGEMAGICK
> back to "no" if AC_CHECK_HEADER doesn't find MagickWand.h, and not try
> to handle the magick_wand.h case.

I'm fine with not supporting old versions, but AFAIK we have no idea if
an ImageMagick with MagickWand.h also satisfies all the other
assumptions Emacs has made about the API. So, again, I think it is
better if configure tests for the minimum version of ImageMagick that is
known to work.

As a data point, 6.2.8, which is over 4 years old, seems fine.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-12 22:39   ` Chong Yidong
@ 2011-02-13  0:28     ` joakim
  0 siblings, 0 replies; 16+ messages in thread
From: joakim @ 2011-02-13  0:28 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 7955

Chong Yidong <cyd@stupidchicken.com> writes:

> Glenn Morris <rgm@gnu.org> writes:
>
>> Seems fine on RHEL5. On RHEL4, build still fails.
>>
>> configure says:
>>
>> checking IMAGEMAGICK_CFLAGS...
>> checking IMAGEMAGICK_LIBS... -lWand -lMagick
>> checking for MagickExportImagePixels... no
>> checking wand/MagickWand.h usability... no
>> checking wand/MagickWand.h presence... no
>> checking for wand/MagickWand.h... no
>>   Does Emacs use imagemagick?                             yes
>
> ImageMagick-6.0 is almost 7 years old.  Let's just set HAVE_IMAGEMAGICK
> back to "no" if AC_CHECK_HEADER doesn't find MagickWand.h, and not try
> to handle the magick_wand.h case.

I managed to push to the imagemagick branch. it checks for IM version
now. Im still not sure which version to require yet though so I just
picked one.
-- 
Joakim Verona





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
                   ` (4 preceding siblings ...)
  2011-02-12 23:37 ` Glenn Morris
@ 2011-02-14 20:13 ` Glenn Morris
  2011-02-14 20:37   ` joakim
  2011-02-15  2:51 ` Glenn Morris
  2011-04-12  3:56 ` Glenn Morris
  7 siblings, 1 reply; 16+ messages in thread
From: Glenn Morris @ 2011-02-14 20:13 UTC (permalink / raw)
  To: joakim; +Cc: 7955, Chong Yidong

joakim@verona.se wrote:

> I managed to push to the imagemagick branch.

Why are you still using that branch?





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-14 20:13 ` Glenn Morris
@ 2011-02-14 20:37   ` joakim
  0 siblings, 0 replies; 16+ messages in thread
From: joakim @ 2011-02-14 20:37 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 7955, Chong Yidong

Glenn Morris <rgm@gnu.org> writes:

> joakim@verona.se wrote:
>
>> I managed to push to the imagemagick branch.
>
> Why are you still using that branch?

I thought it was suitable to work on a branch since I find the autoconf
machinery to be brittle and I'm not even able to test the patch properly
atm. The branch has been updated from trunk so I thought it was ok.

Why is it a concern? 

-- 
Joakim Verona





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
                   ` (5 preceding siblings ...)
  2011-02-14 20:13 ` Glenn Morris
@ 2011-02-15  2:51 ` Glenn Morris
  2011-04-07 21:00   ` Glenn Morris
  2011-04-12  3:56 ` Glenn Morris
  7 siblings, 1 reply; 16+ messages in thread
From: Glenn Morris @ 2011-02-15  2:51 UTC (permalink / raw)
  To: joakim; +Cc: 7955, Chong Yidong

joakim@verona.se wrote:

> I thought it was suitable to work on a branch since I find the autoconf
> machinery to be brittle and I'm not even able to test the patch properly
> atm. The branch has been updated from trunk so I thought it was ok.
>
> Why is it a concern? 

I'm not concerned, just seems like it makes more work to continue using
a branch after the feature in question has been merged to the trunk.
There are several uses of a ">=" test with PKG_CHECK_MODULES in
configure already, so I think you can feel pretty confident about adding
another.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-15  2:51 ` Glenn Morris
@ 2011-04-07 21:00   ` Glenn Morris
  0 siblings, 0 replies; 16+ messages in thread
From: Glenn Morris @ 2011-04-07 21:00 UTC (permalink / raw)
  To: joakim; +Cc: 7955, Chong Yidong


Please can we have this fix installed in the trunk and close this report.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#7955: patch for imagemagick header rename
  2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
                   ` (6 preceding siblings ...)
  2011-02-15  2:51 ` Glenn Morris
@ 2011-04-12  3:56 ` Glenn Morris
  7 siblings, 0 replies; 16+ messages in thread
From: Glenn Morris @ 2011-04-12  3:56 UTC (permalink / raw)
  To: 7955-done

Version: 24.1

Done.





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-04-12  3:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 20:38 bug#7955: configure does not thoroughly test for ImageMagick includes Glenn Morris
2011-02-02  2:48 ` Chong Yidong
2011-02-02  9:30   ` joakim
2011-02-02 19:32     ` Glenn Morris
2011-02-03  8:16 ` bug#7955: reply from the IM team joakim
2011-02-08 19:19   ` Glenn Morris
2011-02-11 23:38 ` bug#7955: patch for imagemagick header rename joakim
2011-02-12  1:11 ` Glenn Morris
2011-02-12 22:39   ` Chong Yidong
2011-02-13  0:28     ` joakim
2011-02-12 23:37 ` Glenn Morris
2011-02-14 20:13 ` Glenn Morris
2011-02-14 20:37   ` joakim
2011-02-15  2:51 ` Glenn Morris
2011-04-07 21:00   ` Glenn Morris
2011-04-12  3:56 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).