By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

Compile/Linking problem

P: n/a
Hello,

So it seems that there still is an incompatibility between GD and
libpng-1.2.x... fine

So I installed into a dedicated directory an older version, 1.0.15

In my configure line I inserted
--with-png-dir=/my/old-libpng/path

Everything goes fine, and all once built

[patrice@localhost php-5.0.0b1]$ ldd sapi/cli/php|grep png
libpng.so.2 => /usr/lib/./libpng.so.2 (0x40350000)

The command line php is indeed linked against the "old" libpng and all works
like a charm, but...

[patrice@localhost php-5.0.0b1]$ ldd libs/libphp5.so |grep png
libpng.so.3 => /usr/lib/libpng.so.3 (0x403bc000)

The Apache module (--with-apxs) is linked against my system libpng, so any
script that calls ImageCreateFromPng() causes apache to SegFault :-(((

How do I tell apxs to link according to the configure script ???

Thanks,
Patrice

P.S: This is not related to the beta status of PHP5, older stable versions
behave in the same way.
--
Posté avec Knode, le lecteur de niouzes de KDE
Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Patrice Lazareff wrote:

So it seems that there still is an incompatibility between GD and
libpng-1.2.x... fine

So I installed into a dedicated directory an older version, 1.0.15

In my configure line I inserted
--with-png-dir=/my/old-libpng/path

Everything goes fine, and all once built

[patrice@localhost php-5.0.0b1]$ ldd sapi/cli/php|grep png
libpng.so.2 => /usr/lib/./libpng.so.2 (0x40350000)

The command line php is indeed linked against the "old" libpng and all
works like a charm, but...

[patrice@localhost php-5.0.0b1]$ ldd libs/libphp5.so |grep png
libpng.so.3 => /usr/lib/libpng.so.3 (0x403bc000)

The Apache module (--with-apxs) is linked against my system libpng, so any
script that calls ImageCreateFromPng() causes apache to SegFault :-(((

How do I tell apxs to link according to the configure script ???


Assuming
1 - you have an "old" and "new" libpng present on your server
2 - the "old" libpng is in a non-standard place that ldconfig doesn't know about
3 - the "new" libpng *is* in a standard location

Then you will have problems doing this. The thing to do, is to remove
the new libpng, install the "old" one in a suitable location/prefix,
and then rebuild php that way

Unless I've misunderstood what you've been doing!

Matt
Jul 16 '05 #2

P: n/a
Hi Matt,

Thanks for the input, you do assume well :-)

The one thing is that the server in question is my own development laptop, a
Sony Vaio running what once was a RedHat 7, heavily modified since and now
almost a LinuxFromScratch sort of thinggy... (never got used to rpm ;-)

IOW, downgrading libpng would mean recompiling all my KDE apps, which is
somewhat loooonnnng.

So I finally managed my way with a very dirty trick involving cut'n paste
from the right portion from the compile output (where the line ends by -o
..libs/libphp5.so) and removing all the -lpng and adding
/my/non-standard/libpng/path/lib/libpng.so

This relinks libphp5.so and puts it into .libs/

A simple su -c 'make install' later and you now what, it finally works and I
am quite happy to say the least...

So now, I can resume trying to setup the OpenSource CMS Typo3
(typo3.com|org) which made me discover my config flaw (broken
ImageCreateFromPng())

Okay now, enough keywords for groups.google.com ;-)

Thanks again, cheers,

Patrice

Matt wrote:
Assuming
1 - you have an "old" and "new" libpng present on your server
2 - the "old" libpng is in a non-standard place that ldconfig doesn't know
about 3 - the "new" libpng *is* in a standard location

Then you will have problems doing this. The thing to do, is to remove
the new libpng, install the "old" one in a suitable location/prefix,
and then rebuild php that way

Unless I've misunderstood what you've been doing!

Matt


--
Posté avec Knode, le lecteur de niouzes de KDE
Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.