Bug Description

Ubuntu Gutsy Gibbon 7.10 - libpng 1.2.15~beta5-2ubuntu0.1 (bug probably concerned with libpng-dev)

Ubuntu Hardy Heron 8.04 (current dev version) - libpng 1.2.15~beta5-3 (bug probably concerned with libpng-dev)

-

Compiling svn rev 2400 of FIFEngine (http://fifengine.de) via scons.

Building is terminated because of errors:

/usr/include/pngconf.h:317: error: expected constructor, destructor, or type conversion before '.' token
/usr/include/pngconf.h:318: error: '__dont__' does not name a type

-

Commenting out the lines mentioned above in pngconf.h will solve the problem in this case.

 
 
 
dauerflucher (dauerflucher) wrote on 2008-04-30: #1

Gentoo devs offer a patch for this problem.

--- libpng/pngconf.h
+++ libpng/pngconf.h
@@ -323,8 +323,8 @@
      /* If you encounter a compiler error here, see the explanation
       * near the end of INSTALL.
       */
- __pngconf.h__ already includes setjmp.h;
- __dont__ include it again.;
+#warning __pngconf.h__ already includes setjmp.h;
+#warning __dont__ include it again.;
 # endif
 # endif /* __linux__ */

Patch taken from:
http://mirrors.usc.edu/pub/linux/distributions/gentoo/media-libs/libpng/files/libpng-1.2.24-pngconf-setjmp.patch

Bart de Koning (bratdaking) wrote on 2008-10-27: #2

I could confirm this in Ubuntu 8.04 using libpng12-dev 1.2.15~beta5-3

I could solve it using the above mentioned patch from Gentoo

Bart de Koning (bratdaking) wrote on 2008-11-14: #3

Hey all,

Ubuntu Intrepid Ibex 8.10 - libpng12-dev 1.2.27-1
has the same problem:
compiling imal (http://brneurosci.org/imal.html) using dpkg-buildpackage -rfakeroot gives the following error and exits:

---
In file included from /usr/include/png.h:438,
                 from xmtnimage65.cc:17:
/usr/include/pngconf.h:326: fout: expected constructor, destructor, or type conversion before ‘.’ token
/usr/include/pngconf.h:327: fout: ‘__dont__’ does not name a type
make[1]: *** [xmtnimage65.o] Fout 1
make: *** [build-stamp] Fout 2
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
---

Changing /usr/include/pngconf.h according to the patch described above, solves the problem like it did in Hardy.
Could this be implemented upstream, or is there a good reason not to do so?

Cheers,
Bart

Daniel T Chen (crimsun) wrote on 2008-12-14: #4

Arguably the applications should be using the correct interfaces...

Changed in libpng:
importance: Undecided → Wishlist
status: New → Confirmed
Christoph Egger (christoph-egger) wrote on 2009-05-16: #5

If this is using the wrong interfaces libpng *may* fail with an #error directive. Failing because someone believes putting invalid code somewhere is funny is definitely a bug.

cousteau (cousteaulecommandant) wrote on 2009-12-25: #6

2009-12-25 and the bug's still there. And although I browsed all the code I was trying to compile searching for "#include <setjmp.h>" I didn't found it, so I don't know why the error even appears.

Commenting those 2 lines on /usr/include/pngconf.h works, and the compiled program works perfectly after that.

(Ubuntu 9.04, it seems to also be in 9.10)

Siegfried Gevatter (rainct) wrote on 2010-03-04: #7

This is still present in Lucid (1.2.42-1ubuntu1).

Amir (aameli8) on 2010-03-22
description: updated
summary: - libpng causes error concerning pngconf.h
+ Installing problem under ubuntu 9.10
description: updated

Aehm what exactly was that supposed to be?

Bluppie (benhyper) wrote on 2010-06-20: #9

In Ubuntu 10.04 no problems with Calibre 0.7.4.
Look on the link for details.
http://calibre-ebook.com/download_linux

Ryan Steele (rgsteele) on 2010-06-26
description: updated
summary: - Installing problem under ubuntu 9.10
+ libpng causes error concerning pngconf.h
Meekohi (meekohi) wrote on 2012-06-06: #10

Just experienced this on Amazon AMI.

Meekohi (meekohi) wrote on 2012-06-06: #11

Fixed by putting #include "png.h" at the top of my program instead of letting it be included later.

michael (reeves-87) wrote on 2012-06-25: #12

Invalid code is still present as of 12.04. Header should be fixed to use #error or #warning.

Vistaus (djmusic121) wrote on 2012-07-30: #13

Why isn't any dev fixing this? It's such an easy-to-apply patch and this bug is open for so many years already!!!

Marc Deslauriers (mdeslaur) wrote on 2012-07-30: #14

It's not being fixed because the upstream libpng project put that there deliberately.

Once you make sure your project is using the same setjmp.h, in lucid and later, you simply need to set PNG_SKIP_SETJMP_CHECK in your application to skip the error.

If you disagree, please debate this issue with the upstream libpng project.

Changed in libpng (Ubuntu):
status: Confirmed → Opinion

libpng causes error concerning pngconf.h的更多相关文章

  1. redis make时 提示 zmalloc.h:50:31: error: jemalloc/jemalloc.h:

    redis安装需要环境必备 gcc 但是若未先安装好gcc,make失败后再次 make 会提示如下错误 zmalloc.h:50:31: error: jemalloc/jemalloc.h: 这时 ...

  2. fatal error: openssl/sha.h: No such file or directory 解决方案

    出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries, ...

  3. 如何解决编译linux内核(解决声卡问题),遭遇fatal error: linux/limits.h: 没有那个文件或目录

    最近帮一位上海的朋友搞一块小板,在ubuntu15.04 vivid上已经加载了对应了.ko驱动包 但关键是系统根本就枚举不到该声卡ALC5640,试了OpenSUSE也是一样的结果,看来是内核漏加载 ...

  4. 误mlogc.c:32:23: error: curl/curl.h: No such file or directory

    出现以下错误: mlogc.c:32:23: error: curl/curl.h: No such file or directory mlogc.c:1091: error: expected ' ...

  5. lua.c:80:31: fatal error: readline/readline.h: No such file or directory

    make linuxcd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all ...

  6. 编译内核时出现drivers/mfd/mxc-hdmi-core.c:36:24: fatal error: mach/clock.h: No such file or directory

    在学习恩智浦IMX6D开发板时,编译内核出现 drivers/mfd/mxc-hdmi-core.c::: fatal error: mach/clock.h: No such file or dir ...

  7. 编译Linux-4.15.1内核时遇到:“error : openssl/bio.h :No such file or folder”

    如题: scripts/extract-cert.c::: fatal error: openssl/bio.h: No such file or directory compilation term ...

  8. ubuntu16.04 编译出错:fatal error: SDL/SDL.h: No such file or directory

    在ubuntu 16.04编译神经网络代码时候,遇到了这样一种错误? fatal error: SDL/SDL.h: No such file or directory 原因是SDL库没有安装,根据你 ...

  9. Mac os fatal error: 'numpy/arrayobject.h' file not found

    $ python setup.py install 出错信息如: clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g ...

随机推荐

  1. MSSQL:修改tempdb设置增加DW性能

    Temp DB 在DW中变得非常重要,因为要进行大量的运算,如果内存不够数据就会放在Temp DB中 1. 把Temp DB移动到高性能的磁盘上. 2. 增加tempdb 的大小 3. 把Auto S ...

  2. ES配置详解

    elasticsearch的config文件夹里面有两个配置文件:elasticsearch.yml和logging.yml,第一个是es的基本配置文件,第二个是日志配置文件,es也是使用log4j来 ...

  3. JavaSE学习总结第27天_反射 & 设计模式 & JDK5、7、8新特性

      27.01  反射_类的加载概述和加载时机 类的加载:当程序要使用某个类时,如果该类还未被加载到内存中,则系统会通过加载,连接,初始化三步来实现对这个类进行初始化. 加载:就是指将class文件读 ...

  4. C程序的存储空间布局

    历史沿袭至今,C程序一直由下列几部分组成: 1. 正文段.这是由CPU执行的机器指令部分.通常,正文段是可共享的,所以即使是频繁执行的程序(编辑器,编译器,命令解释器)在存储器中也只需一个副本,另外正 ...

  5. BZOJ 1051: [HAOI2006]受欢迎的牛( tarjan )

    tarjan缩点后, 有且仅有一个出度为0的强连通分量即answer, 否则无解 ----------------------------------------------------------- ...

  6. C++对象模型2--指针cout结果

    在开始之前,首先科普一下cout指针的知识,这样才能在测试程序中很好的理解: 看下面的代码: void main(void) { int a = 10; int *p = &a; cout & ...

  7. Spring学习之Aop的各种增强方法

    AspectJ允许使用注解用于定义切面.切入点和增强处理,而Spring框架则可以识别并根据这些注解来生成AOP代理.Spring只是使用了和AspectJ 5一样的注解,但并没有使用AspectJ的 ...

  8. html 浮动元素

    在CSS布局中分为内联元素(display:inline)和块状元素(display:block),块状元素默认会占据一行,可设置高度宽度以及边距,而内联元素不会也不能设置.常见的内联元素有:a.sp ...

  9. PHP的环境搭建

    下载开发环境 wampserver 下载sublime text 2 sublime使用技巧 1:安装漂亮的编程字体http://pan.baidu.com/s/1xMex9 下载"程序编写 ...

  10. 10min系列之二日志可视化进阶

    10min系列之二日志可视化进阶(作者原创,同步发布在github) 本文需要有一定的python和前端基础,如果没基础的,请关注我后续的基础教程系列博客 本文所有的demo,都是浏览器下展示的 原创 ...