GNU bug report logs - #12464
24.2.50; nt/configure.bat fails to detect giflib-5.0.0

Previous Next

Package: emacs;

Reported by: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>

Date: Tue, 18 Sep 2012 09:16:02 UTC

Severity: normal

Found in version 24.2.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12464 in the body.
You can then email your comments to 12464 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12464; Package emacs. (Tue, 18 Sep 2012 09:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 18 Sep 2012 09:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2.50; nt/configure.bat fails to detect giflib-5.0.0
Date: Tue, 18 Sep 2012 18:13:45 +0900
Because gif_lib.h of giflib-5.0.0 assumes size_t is defined (I don't
know whether that is intended), nt/configure.bat fails to check its
availability.

In nt/config.log
> In file included from junk.c:1:0:
> f:/build/emacs-w32/include/gif_lib.h:262:37: error: expected ';', ',' or ')' before 'GifExtensionLength'
> f:/build/emacs-w32/include/gif_lib.h:265:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EGifGCBToExtension'
> The failed program was: 
> #include "gif_lib.h" 
> main (){} 
> gcc -If:/build/emacs-w32/include -If:/build/emacs-w32/include/libxml2 -g  -c junk.c -o junk.obj 
> gcc -If:/build/emacs-w32/include -If:/build/emacs-w32/include/libxml2 -g  -c junk.c -o junk.obj 

Though I don't know whether Emacs supports giflib-5.0.0, the below
patch can fix the problem.  Gif support on my binaries (built by gcc
4.5.2, MinGW) has no problem with giflib-5.0.0 as far as I tested.

=== modified file 'nt/configure.bat'
--- nt/configure.bat	2012-09-08 11:20:32 +0000
+++ nt/configure.bat	2012-09-18 03:14:43 +0000
@@ -627,7 +627,8 @@
 if (%gifsupport%) == (N) goto gifDone
 
 echo Checking for libgif...
-echo #include "gif_lib.h" >junk.c
+echo #include "stdio.h" >junk.c
+echo #include "gif_lib.h" >>junk.c
 echo main (){} >>junk.c
 rem   -o option is ignored with cl, but allows result to be consistent.
 echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log


-- 
Kazuhiro Ito




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12464; Package emacs. (Tue, 18 Sep 2012 10:06:01 GMT) Full text and rfc822 format available.

Message #8 received at 12464 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Cc: 12464 <at> debbugs.gnu.org
Subject: Re: bug#12464: 24.2.50; nt/configure.bat fails to detect giflib-5.0.0
Date: Tue, 18 Sep 2012 13:04:10 +0300
> Date: Tue, 18 Sep 2012 18:13:45 +0900
> From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
> 
> Because gif_lib.h of giflib-5.0.0 assumes size_t is defined (I don't
> know whether that is intended), nt/configure.bat fails to check its
> availability.
> 
> In nt/config.log
> > In file included from junk.c:1:0:
> > f:/build/emacs-w32/include/gif_lib.h:262:37: error: expected ';', ',' or ')' before 'GifExtensionLength'
> > f:/build/emacs-w32/include/gif_lib.h:265:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EGifGCBToExtension'
> > The failed program was: 
> > #include "gif_lib.h" 
> > main (){} 
> > gcc -If:/build/emacs-w32/include -If:/build/emacs-w32/include/libxml2 -g  -c junk.c -o junk.obj 
> > gcc -If:/build/emacs-w32/include -If:/build/emacs-w32/include/libxml2 -g  -c junk.c -o junk.obj 
> 
> Though I don't know whether Emacs supports giflib-5.0.0, the below
> patch can fix the problem.  Gif support on my binaries (built by gcc
> 4.5.2, MinGW) has no problem with giflib-5.0.0 as far as I tested.
> 
> === modified file 'nt/configure.bat'
> --- nt/configure.bat	2012-09-08 11:20:32 +0000
> +++ nt/configure.bat	2012-09-18 03:14:43 +0000
> @@ -627,7 +627,8 @@
>  if (%gifsupport%) == (N) goto gifDone
>  
>  echo Checking for libgif...
> -echo #include "gif_lib.h" >junk.c
> +echo #include "stdio.h" >junk.c
> +echo #include "gif_lib.h" >>junk.c
>  echo main (){} >>junk.c
>  rem   -o option is ignored with cl, but allows result to be consistent.
>  echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log

Does it work to use stddef.h instead of stdio.h?  stddef.h is where
size_t is normally defined.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12464; Package emacs. (Tue, 18 Sep 2012 10:34:02 GMT) Full text and rfc822 format available.

Message #11 received at 12464 <at> debbugs.gnu.org (full text, mbox):

From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12464 <at> debbugs.gnu.org
Subject: Re: bug#12464: 24.2.50; nt/configure.bat fails to detect giflib-5.0.0
Date: Tue, 18 Sep 2012 19:32:21 +0900
> > Because gif_lib.h of giflib-5.0.0 assumes size_t is defined (I don't
> > know whether that is intended), nt/configure.bat fails to check its
> > availability.
> > 
> > In nt/config.log
> > > In file included from junk.c:1:0:
> > > f:/build/emacs-w32/include/gif_lib.h:262:37: error: expected ';', ',' or ')' before 'GifExtensionLength'
> > > f:/build/emacs-w32/include/gif_lib.h:265:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EGifGCBToExtension'
> > > The failed program was: 
> > > #include "gif_lib.h" 
> > > main (){} 
> > > gcc -If:/build/emacs-w32/include -If:/build/emacs-w32/include/libxml2 -g  -c junk.c -o junk.obj 
> > > gcc -If:/build/emacs-w32/include -If:/build/emacs-w32/include/libxml2 -g  -c junk.c -o junk.obj 
> > 
> > Though I don't know whether Emacs supports giflib-5.0.0, the below
> > patch can fix the problem.  Gif support on my binaries (built by gcc
> > 4.5.2, MinGW) has no problem with giflib-5.0.0 as far as I tested.
> > 
> > === modified file 'nt/configure.bat'
> > --- nt/configure.bat	2012-09-08 11:20:32 +0000
> > +++ nt/configure.bat	2012-09-18 03:14:43 +0000
> > @@ -627,7 +627,8 @@
> >  if (%gifsupport%) == (N) goto gifDone
> >  
> >  echo Checking for libgif...
> > -echo #include "gif_lib.h" >junk.c
> > +echo #include "stdio.h" >junk.c
> > +echo #include "gif_lib.h" >>junk.c
> >  echo main (){} >>junk.c
> >  rem   -o option is ignored with cl, but allows result to be consistent.
> >  echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
> 
> Does it work to use stddef.h instead of stdio.h?  stddef.h is where
> size_t is normally defined.

Yes, stddef.h also works.  I didn't care where size_t is defined.

-- 
Kazuhiro Ito




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 18 Sep 2012 10:54:01 GMT) Full text and rfc822 format available.

Notification sent to Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>:
bug acknowledged by developer. (Tue, 18 Sep 2012 10:54:01 GMT) Full text and rfc822 format available.

Message #16 received at 12464-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Cc: 12464-done <at> debbugs.gnu.org
Subject: Re: bug#12464: 24.2.50; nt/configure.bat fails to detect giflib-5.0.0
Date: Tue, 18 Sep 2012 13:52:12 +0300
> Date: Tue, 18 Sep 2012 19:32:21 +0900
> From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
> Cc: 12464 <at> debbugs.gnu.org
> 
> > Does it work to use stddef.h instead of stdio.h?  stddef.h is where
> > size_t is normally defined.
> 
> Yes, stddef.h also works.  I didn't care where size_t is defined.

Thanks, I committed the change below to fix this, as trunk revision
110088, and I'm marking the bug as done.

=== modified file 'nt/ChangeLog'
--- nt/ChangeLog	2012-09-17 13:22:45 +0000
+++ nt/ChangeLog	2012-09-18 10:49:33 +0000
@@ -1,3 +1,8 @@
+2012-09-18  Eli Zaretskii  <eliz <at> gnu.org>
+
+	* configure.bat: Include stddef.h before gif_lib.h, to have size_t
+	defined, as needed by giflib-5.0.0.  (Bug#12464)
+
 2012-09-17  Juanma Barranquero  <lekktu <at> gmail.com>
 
 	* config.nt: Sync with autogen/config.in.

=== modified file 'nt/configure.bat'
--- nt/configure.bat	2012-09-08 11:20:32 +0000
+++ nt/configure.bat	2012-09-18 10:49:33 +0000
@@ -627,7 +627,10 @@ rm -f junk.c junk.obj
 if (%gifsupport%) == (N) goto gifDone
 
 echo Checking for libgif...
-echo #include "gif_lib.h" >junk.c
+rem giflib-5.0.0 needs size_t defined before gif_lib.h is included
+rem redirection characters need to be protected from the shell
+echo #include ^<stddef.h^> >junk.c
+echo #include "gif_lib.h" >>junk.c
 echo main (){} >>junk.c
 rem   -o option is ignored with cl, but allows result to be consistent.
 echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 16 Oct 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 217 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.