Operating System - HP-UX
1832978 Members
3072 Online
110048 Solutions
New Discussion

recompiling php -> libz.so linker troubles

 
Heinrich Fink_1
Occasional Advisor

recompiling php -> libz.so linker troubles

I'm compiling php-4.3.11 for apache2 on HP-UX Itanium 2

configure options:

--with-gd=/usr/local \
--with-config-file-path=/opt/hpws/apache/conf \
--prefix=/opt/hpws/apache/php4 \
--with-apxs2=/opt/hpws/apache/bin/apxs \
--with-apache2=/opt/hpws/apache \
--with-xml \
--with-zlib

I get the following error in make:

*** Warning: linker path does not have real file for library -lz.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libz and none of the candidates passed a file format test
*** using a file magic. Last file checked: /usr/local/lib/libz.so

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libphp4. Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

Therefore no shared library (libphp4.sl) is build which I need for apache2.

It builds right without the zlib - option, but zlib-php support is quite important for my Web-CMS-System.

libz.so is under /usr/local/lib/libz.so and

I tried both, the depot, and the manually compiled version,

ldd -r libz.so says:

root, brweb:/usr/local/lib >> ldd -r libz.so
symbol not found: malloc (./libz.so)
symbol not found: memcpy (./libz.so)
symbol not found: memset (./libz.so)
symbol not found: errno (./libz.so)
symbol not found: vsnprintf (./libz.so)
symbol not found: sprintf (./libz.so)
symbol not found: fprintf (./libz.so)
symbol not found: fflush (./libz.so)
symbol not found: fopen (./libz.so)
symbol not found: fputc (./libz.so)
symbol not found: fread (./libz.so)
symbol not found: fseek (./libz.so)
symbol not found: ftell (./libz.so)
symbol not found: fclose (./libz.so)
symbol not found: fwrite (./libz.so)
symbol not found: free (./libz.so)
symbol not found: fdopen (./libz.so)
symbol not found: strcat (./libz.so)
symbol not found: strcpy (./libz.so)
symbol not found: strlen (./libz.so)

Any suggestions, libz.so is also needed for libpng.so which is needed for libgd.so

Thanks very much
1 REPLY 1
harry d brown jr
Honored Contributor

Re: recompiling php -> libz.so linker troubles

Can you use PHP 4.3.0 ?
if so, then get it from here: http://hpux.cs.utah.edu/hppd/hpux/Networking/WWW/apache+php-1327.430/

Otherwise, look at HOW they PORTED it (this is the available documentation in the source HPUX.Install):

Package name: apache+php
Version number: 1327.430
Original author: apache and php teams
Original URL: http://www.apache.org/
HP-UX URL: http://hpux.connect.org.uk/hppd/cgi-bin/search?package=&term=apache+php-
License: GNU General Public License V2
Dependencies: db expat freetype gd gettext jpeg libiconv libpng mysql ncurses openssl perl xpm zlib
Install tree: /usr/local/apache+php
Report bugs to: lavasani@connect.org.uk
Tested on: HP 9000/780/C160 running HP-UX 11.00 and
HP rx4610 running HP-UX 11.20 and
HP i2000 running HP-UX 11.22
C compiler used: gcc version 3.2
Purpose:
Apache web server with PHP support. This is the combined apache-1.3.27 and
php-4.3.0. The php program has been compiled with mysql support. You can use
any version of mysql, but I suggest you to use the latest.
Date archived: Wed 19 Mar 2003

-------------------------------------------------------------------------------

This the Apache and php combined package. It also have the Mysql support.

I have used "apache-1.3.27" and "php-4.3.0".

To use this package you will need to install the following packages:

mysql
zlib
libiconv
freetype
xpm
libpng
libjpeg
db
openssl
gettext
expat


Changes:

I didn't make to much changes in order to compile this package.

Added:

1- Top level Makefile to drive the build and installation.
2- apache-1.3.27/Build and php-4.3.0/Build to pass the option to
"configure" file.

Build:

In top level directory type:

gmake

Install:

gmake install

Configuration:

I will set up a page to explain how to configure this package:

http://hpux.connect.org.uk/hppd/answers/4-6.html


Test:

I 've tested the program and in works fine. It connects to
mysql server. Looks fine to me



live free or die
harry d brown jr
Live Free or Die