Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-01-2011, 03:11 AM   #1
Registered: Jun 2006
Posts: 84

Rep: Reputation: 16
Build problem hard to solve : zeroradiant and libpng 1.4 (libpng compatibility pb)

Hello !

I'd like to build Zeroradiant (1.6) but I've got a problem to compile it...
Indeed, Zeroradiant only works with libpng 1.2.X (which is not compatible with libpng 1.4.X ...). Then when I start compiling the sources I got this typical error :
plugins/imagepng/plugin.cpp: In function 'void LoadImage(const char*, unsigned char**, int*, int*)':
plugins/imagepng/plugin.cpp:140: error: 'png_voidp_NULL' was not declared in this scope
plugins/imagepng/plugin.cpp:151: error: 'png_infopp_NULL' was not declared in this scope
plugins/imagepng/plugin.cpp:159: error: 'png_infopp_NULL' was not declared in this scope
plugins/imagepng/plugin.cpp:167: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/png.h:1096)
plugins/imagepng/plugin.cpp:167: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/png.h:1096)
plugins/imagepng/plugin.cpp:191: error: 'png_set_gray_1_2_4_to_8' was not declared in this scope
plugins/imagepng/plugin.cpp:237: error: 'png_infopp_NULL' was not declared in this scope
scons: *** [build/debug/shobjs/plugins/imagepng/plugin.os] Error 1
scons: building terminated because of errors.
I've got the two libpng installed on my computer however I still continue
to get that error message ...

I had noticed that /usr/lib/ and /usr/lib64/ were
linked to /usr/lib/, so I decided to remove the symbolic link and create one from /usr/lib/ to /usr/lib/
But that didn't solve my problem.

To build Zeroradiant I've got to use scons, I tried to "configure scons" so that it choose the right libpng but I found nothing (that's why I used the trick above).

Do you know how I could simply solve it ?

Thanks !


To build Zeroradiant I use theses instructions :

I'm running a Gentoo GNU/Linux.
Old 01-01-2011, 05:03 AM   #2
Registered: Jun 2006
Posts: 84

Original Poster
Rep: Reputation: 16
In order to get rid of this compile problem I decided to edit plugin.cpp :
I changed png_voidp_NULL to (png_voidp)NULL
and png_infopp_NULL to (png_infopp)NULL.
I also changed this function : png_set_gray_1_2_4_to_8 to this one :
png_set_expand_1_2_4_to_8 and it seems to work :-)

It's very very dirty but it's the only way I found :-/


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem with libpng soppy Linux - Software 3 11-08-2010 10:12 PM
libpng and libpng-devel driving me crazy latino Linux - Server 6 06-27-2007 07:15 PM
error while loading shared libraries: [I reinstalled libPNG!] Shioni Linux - Software 1 09-09-2006 08:21 PM
libpng and libpng-devel missing in mplayer configure mmarkvillanueva Linux - Software 2 11-29-2005 11:40 PM
MPlayer install problems with libpng & libpng-devel Trey2501 Linux - Newbie 18 03-06-2004 12:24 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration