[csw-users] php5 and mysql5 and SUNW libz

Cory Omand comand at blastwave.org
Tue Aug 15 18:55:15 CEST 2006


On 8/15/06, Guy D <dy2t7t at gmail.com> wrote:
> The php5_mysql and php5_mysqli packages have dependencies on mysql4, though:
> $ ldd /opt/csw/php5/lib/php/extensions/no-debug-non-zts-20050922/mysql.so
>        libmysqlclient.so.14 =>  /opt/csw/mysql4/lib/mysql/libmysqlclient.so.14
>        ...
>
> But, when I examined the configuration of CSW's php5 at
> http://svn.blastwave.org/browser/csw/trunk/lang/php5/files/config.mk
> it looked like it should be linked against mysql5 libraries:

And it should be --

> So, I am wondering why the php extensions do not seem to be linked
> against the mysql 5 libraries.  If they were, would a mysql4 database
> still be able to be used with it?

Yes, you'll still be able to connect to MySQL 4 databases using MySQL 5.

> On an unrelated note, I notice a dependency on a SUNW library in the
> "gd" php5 extension:

This is actually something awry with libgd itself:

-bash$ ldd /opt/csw/lib/libgd.so.2.0.0
        libXpm.so.4.11 =>        /opt/csw/lib/i386/libXpm.so.4.11
        libX11.so.4 =>   /usr/lib/libX11.so.4
        libjpeg.so.62 =>         /opt/csw/lib/i386/libjpeg.so.62
        libfontconfig.so.1 =>    /opt/csw/lib/i386/libfontconfig.so.1
        libfreetype.so.6 =>      /opt/csw/lib/i386/libfreetype.so.6
        libpng12.so.0 =>         /opt/csw/lib/i386/libpng12.so.0
        libz.so =>       /opt/csw/lib/i386/libz.so
        libm.so.1 =>     /usr/lib/libm.so.1
        libiconv.so.2 =>         /opt/csw/lib/i386/libiconv.so.2
        libc.so.1 =>     /usr/lib/libc.so.1
        libXext.so.0 =>  /usr/openwin/lib/libXext.so.0
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libexpat.so.0 =>         /opt/csw/lib/i386/libexpat.so.0
        libz.so.1 (SUNW_1.1) =>  (version not found)
        libmp.so.2 =>    /usr/lib/libmp.so.2
-bash$

> Why does the libz.so appear twice and linked to two different
> libraries?  What is the significance of the "libz.so.1 (SUNW_1.1)" one
> and the fact that it reports that it cannot find a proper version?

Chances are, one of the support libraries that libgd relies on was
compiled to use the Solaris 8 libz, which has the internal version
SUNW_1.1.  However, the libz symbols that are required are satisfied
by /opt/csw/lib/libz, so everything works.  The support library that
appears to be at the core of this is libfreetype:

-bash$ ldd /opt/csw/lib/i386/libfreetype.so.6
        libz.so.1 =>     /opt/csw/lib/libz.so.1
        libz.so.1 (SUNW_1.1) =>  (version not found)
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
-bash$

This library should be recompiled to use /opt/csw libz.

Regards,
Cory.



More information about the users mailing list