Installing PHP with custombuild fails

luco

New member
Joined
Feb 14, 2010
Messages
2
I get the following error during compilation
Code:
/usr/local/directadmin/custombuild/php-5.2.12/ext/gd/libgd/gd_png.c:142: undefined reference to `png_check_sig'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
can someone help please ?

Installing DA on Centos 5.4 32bit openvz vps.
 
Installing DA on Centos 5.4 64bit

error ?

ext/gd/libgd/.libs/gd_png.o: In function `php_gd_gdImageCreateFromPngCtx':
/usr/local/directadmin/custombuild/php-5.2.12/ext/gd/libgd/gd_png.c:142: undefined reference to `png_check_sig'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

i think GD bug libpng version 1.4
http://bugs.php.net/bug.php?id=50734

help me please.
thank you
 
Edit : php-5.2.12/ext/gd/libgd/gd_png.c
or php-5.x.x

search
if (!png_check_sig (sig, 8)) { /* bad signature */

replace to
if (png_sig_cmp (sig, 0, 8)) { /* bad signature */

Delete old file
rm -R php-5.2.12.tar.gz

Create new tar.gz file
tar -zcvf php-5.2.12.tar.gz /php-5.2.12

Thank : FeNixZ,hack3rb43
good luck

Patch
...........
http://trac.wxwidgets.org/ticket/11625
 
Last edited:
Hello,

I've downgraded png in custombuild to 1.2.41. Type:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build libpng
./build php n
or if this is a new install, use "./build all d" instead of "./build php n"[/code]Hopefully, php will be updating their source with an official fix soon.

John
 
Hello,

I've downgraded png in custombuild to 1.2.41.

Hi,

I am a bit puzzled. I have done exactly what you said but I still get the same error. Before build I even tried

Code:
./build clean

but still keep getting the same error. Moreover, in versions.txt I can still see:
Code:
libpng:1.2.42:562066eb8557db91156eaeb309458488

So the version is 1.2.42 instead of the 'downgraded' one.

I have tried rebuilding at least half a dozen times, even hand-editing the versions.txt but PHP will still not compile. What is the exact status of this problem now?

Markku
 
Hi,

I'm quite a newbie so perhaps what I'll say it's nonsense... but it worked for me and I just wanted to share.

I manually downloaded and complied libpng-1.4.2 because I installed something that needed it. Luckly I saved the sources in a separate directory, so I tried make uninstall (I don't even know if that really did something)

Then I searched for all the files starting with libpng using this command:

Code:
cd /
find -name libpng*

Then I deleted them all directory by directory

Code:
rm -f /path/to/files/libpng*

Just in case, I also tried

Code:
yum remove libpng*

And after tha I could do what was said before in this post:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build libpng
./build php n

As I said, I'm a complete newbie and I don't really know what I did... but the thing is I finally could build php again.

I hope this helps.

Regards,
 
make *** sapi/cli/php error 1 on debian8

Makefile:247: recipe for target 'sapi/cli/php' failed
make *** sapi/cli/php error 1

i have this on debian 8
what i have to do?
 
Back
Top