libpng causes error concerning pngconf.h
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).
description: | updated |
summary: | - libpng causes error concerning pngconf.h + Installing problem under ubuntu 9.10 |
description: | updated |
Christoph Egger (christoph-egger) wrote on 2010-03-22: Re: Installing problem under ubuntu 9.10 | #8 |
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
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的更多相关文章
- redis make时 提示 zmalloc.h:50:31: error: jemalloc/jemalloc.h:
redis安装需要环境必备 gcc 但是若未先安装好gcc,make失败后再次 make 会提示如下错误 zmalloc.h:50:31: error: jemalloc/jemalloc.h: 这时 ...
- fatal error: openssl/sha.h: No such file or directory 解决方案
出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries, ...
- 如何解决编译linux内核(解决声卡问题),遭遇fatal error: linux/limits.h: 没有那个文件或目录
最近帮一位上海的朋友搞一块小板,在ubuntu15.04 vivid上已经加载了对应了.ko驱动包 但关键是系统根本就枚举不到该声卡ALC5640,试了OpenSUSE也是一样的结果,看来是内核漏加载 ...
- 误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 ' ...
- 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 ...
- 编译内核时出现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 ...
- 编译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 ...
- 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库没有安装,根据你 ...
- 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 ...
随机推荐
- 深入了解epoll (转)
一. 介绍 Epoll 是一种高效的管理socket的模型,相对于select和poll来说具有更高的效率和易用性.传统的select以及poll的效率会因为 socket数量的线形递增而导致呈二次乃 ...
- sql表连接的几种方式
这里有两张表TableA和TableB,分别是姓名表和年龄表,用于我们例子的测试数据 TableA id name 1 t1 2 t2 4 t4 TableB id age 1 18 2 20 3 1 ...
- 一个页面从输入URL到页面加载显示完成的详细过程
下面以访问baidu页面来做一个过程分析 输入 URL:http://www.baidu.com DNS 域名解析 计算机无法识别域名,计算机与计算机之间要想进行通信,必须通过ip地址用来定位该计算机 ...
- Java如何实现对Mysql数据库的行锁
场景如下: 用户账户有余额,当发生交易时,需要实时更新余额.这里如果发生并发问题,那么会造成用户余额和实际交易的不一致,这对公司和客户来说都是很危险的. 那么如何避免: 网上查了下,有 ...
- jQuery学习之结构解析
jQuery内核解析 1.jQuery整体的结构是一个匿名函数 (function( window, undefined ) {})(window); 2.jQuery就是一个很普通的函数,也是一个很 ...
- verilog中always块延时总结
在上一篇博文中 verilog中连续性赋值中的延时中对assign的延时做了讨论,现在对always块中的延时做一个讨论. 观测下面的程序,@0时刻,输入的数据分别是0x13,0x14 . @2时刻, ...
- 针对PCB飞针测试快速有效的技巧
测试探针通过多路传输(multiplexing)系统连接到驱动器(信号发生器.电源供应等)和传感器(数字万用表.频率计数器等)来测试UUT上的元件.当一个元件正在测试的时候,UUT上的其它元件通过探针 ...
- 关于 OnCloseQuery: 顺序、不能关机等(所有的windows的广播消息都是逐窗口传递的)——如果一个窗体的OnCloseQuery事件中如果写了代码那么WM_QUERYENDSESSION消息就传不过去了msg.result会返回0,关机事件也就停止了
系统关闭窗体的事件顺序为: OnCloseQuery ----> OnClose ----> OnDestroy 下面的代码说明问题: unit Unit3; interface uses ...
- (C#)Windows Shell 编程系列2 - 解释,从“桌面”开始展开
原文 (C#)Windows Shell 编程系列2 - 解释,从“桌面”开始展开 (本系列文章由柠檬的(lc_mtt)原创,转载请注明出处,谢谢-) 接上一篇:(C#)Windows Shell 编 ...
- javascript 定义类(转载)
Javascript本身并不支持面向对象,它没有访问控制符,它没有定义类的关键字class,它没有支持继承的extend或冒号,它也没有用来支持虚函数的virtual,不过,Javascript是一门 ...