unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17429: 24.4.50; __pngconf.h__ in libpng already includes setjmp.h
@ 2014-05-07  6:34 Sven Joachim
  2014-05-07 17:42 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Joachim @ 2014-05-07  6:34 UTC (permalink / raw)
  To: 17429; +Cc: Sven Joachim

Trunk does not build for me, I get an error when compiling image.c:

,----
| In file included from /usr/include/libpng12/png.h:540:0,
|                  from image.c:5515:
| /usr/include/libpng12/pngconf.h:371:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
|             __pngconf.h__ in libpng already includes setjmp.h;
|                      ^
| /usr/include/libpng12/pngconf.h:372:12: error: unknown type name '__dont__'
|             __dont__ include it again.;
|             ^
| /usr/include/libpng12/pngconf.h:372:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'it'
|             __dont__ include it again.;
|                              ^
| /usr/include/libpng12/pngconf.h:372:29: error: unknown type name 'it'
| Makefile:339: recipe for target 'image.o' failed
`----

In pngconf.h there is the following explanation:

,----
| #ifdef PNG_SETJMP_SUPPORTED
| /* This is an attempt to force a single setjmp behaviour on Linux.  If
|  * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
|  *
|  * You can bypass this test if you know that your application uses exactly
|  * the same setjmp.h that was included when libpng was built.  Only define
|  * PNG_SKIP_SETJMP_CHECK while building your application, prior to the
|  * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK
|  * while building a separate libpng library for general use.
|  */
| 
| #  ifndef PNG_SKIP_SETJMP_CHECK
| #    ifdef __linux__
| #      ifdef _BSD_SOURCE
| #        define PNG_SAVE_BSD_SOURCE
| #        undef _BSD_SOURCE
| #      endif
| #      ifdef _SETJMP_H
|        /* If you encounter a compiler error here, see the explanation
|         * near the end of INSTALL.
|         */
|            __pngconf.h__ in libpng already includes setjmp.h;
|            __dont__ include it again.;
| #      endif
| #    endif /* __linux__ */
| #  endif /* PNG_SKIP_SETJMP_CHECK */
`----

This is with libpng 1.2.50.





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

* bug#17429: 24.4.50; __pngconf.h__ in libpng already includes setjmp.h
  2014-05-07  6:34 bug#17429: 24.4.50; __pngconf.h__ in libpng already includes setjmp.h Sven Joachim
@ 2014-05-07 17:42 ` Glenn Morris
  2014-05-07 18:22   ` Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2014-05-07 17:42 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 17429, Sven Joachim


Sven Joachim wrote:

> Trunk does not build for me, I get an error when compiling image.c:


Prior to trunk r117068, image.c included png.h before setjmp.h.


> ,----
> | In file included from /usr/include/libpng12/png.h:540:0,
> |                  from image.c:5515:
> | /usr/include/libpng12/pngconf.h:371:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
> |             __pngconf.h__ in libpng already includes setjmp.h;
> |                      ^
> | /usr/include/libpng12/pngconf.h:372:12: error: unknown type name '__dont__'
> |             __dont__ include it again.;
> |             ^
> | /usr/include/libpng12/pngconf.h:372:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'it'
> |             __dont__ include it again.;
> |                              ^
> | /usr/include/libpng12/pngconf.h:372:29: error: unknown type name 'it'
> | Makefile:339: recipe for target 'image.o' failed
> `----
>
> In pngconf.h there is the following explanation:
>
> ,----
> | #ifdef PNG_SETJMP_SUPPORTED
> | /* This is an attempt to force a single setjmp behaviour on Linux.  If
> |  * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
> |  *
> |  * You can bypass this test if you know that your application uses exactly
> |  * the same setjmp.h that was included when libpng was built.  Only define
> |  * PNG_SKIP_SETJMP_CHECK while building your application, prior to the
> |  * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK
> |  * while building a separate libpng library for general use.
> |  */
> | 
> | #  ifndef PNG_SKIP_SETJMP_CHECK
> | #    ifdef __linux__
> | #      ifdef _BSD_SOURCE
> | #        define PNG_SAVE_BSD_SOURCE
> | #        undef _BSD_SOURCE
> | #      endif
> | #      ifdef _SETJMP_H
> |        /* If you encounter a compiler error here, see the explanation
> |         * near the end of INSTALL.
> |         */
> |            __pngconf.h__ in libpng already includes setjmp.h;
> |            __dont__ include it again.;
> | #      endif
> | #    endif /* __linux__ */
> | #  endif /* PNG_SKIP_SETJMP_CHECK */
> `----






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

* bug#17429: 24.4.50; __pngconf.h__ in libpng already includes setjmp.h
  2014-05-07 17:42 ` Glenn Morris
@ 2014-05-07 18:22   ` Paul Eggert
  2014-05-07 18:41     ` Sven Joachim
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2014-05-07 18:22 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17429-done, Sven Joachim

> Sven Joachim wrote:
>> |             __pngconf.h__ in libpng already includes setjmp.h;
>> |                      ^

Thanks, that doesn't happen for me on Fedora 20 (libpng16), so I didn't 
run into the problem.  I installed an obvious patch in trunk bzr 117070; 
please give it a try.  I'll take the liberty of marking this bug as done 
to save us all work later; if I'm wrong I'll unmark it.





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

* bug#17429: 24.4.50; __pngconf.h__ in libpng already includes setjmp.h
  2014-05-07 18:22   ` Paul Eggert
@ 2014-05-07 18:41     ` Sven Joachim
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Joachim @ 2014-05-07 18:41 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 17429

On 2014-05-07 20:22 +0200, Paul Eggert wrote:

>> Sven Joachim wrote:
>>> |             __pngconf.h__ in libpng already includes setjmp.h;
>>> |                      ^
>
> Thanks, that doesn't happen for me on Fedora 20 (libpng16), so I
> didn't run into the problem.  I installed an obvious patch in trunk
> bzr 117070; please give it a try.  I'll take the liberty of marking
> this bug as done to save us all work later; if I'm wrong I'll unmark
> it.

This change fixes the problem, thanks.

Cheers,
       Sven





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

end of thread, other threads:[~2014-05-07 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07  6:34 bug#17429: 24.4.50; __pngconf.h__ in libpng already includes setjmp.h Sven Joachim
2014-05-07 17:42 ` Glenn Morris
2014-05-07 18:22   ` Paul Eggert
2014-05-07 18:41     ` Sven Joachim

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).