Helpful Information
 
 
Category: Apache Development
ld problem in Apache build w/ PHP

Hi,

I'm trying to install PHP on my Redhat 6.2 box. I've built PHP statically w/ MySQL, and SSL, and everything went just fine.

I'm configuring Apache to include the php4 module. I'm running Apache 1.3.17. I'm trying to use the old non-APACI config/installation tool. The ./Configure step goes just fine but when I run make I get the following error halfway through:

/usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function `my_uncompress':
my_compress.o(.text+0x9a): undefined reference to `uncompress'
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
my_compress.o(.text+0x12a): undefined reference to `compress'
collect2: ld returned 1 exit status
make: *** [target_static] Error 1

And it exits. At first I thought it was an ld problem. I have ld 2.9.5, and I haven't been able to find a newer one. I'm using MySQL 3.23.33 (the latest) and I installed it using the RPMs. It's working fine.

I can't even tell if this is an ld problem, a MySQL problem, a PHP problem or an apache problem. Any thoughts????

please don't email me and tell me to install through apxs or to use APACI, those failed as well. The last time I built a box with php4 this combo worked i.e. static PHP4 build and non-APACI httpd update.

Again, I'm stumped.

thanks for any help,
Eric

Start here -> http://forums.devshed.com/showthread.php?threadid=7564 and don't cross-post next time.

/usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function `my_uncompress':
my_compress.o(.text+0x9a): undefined reference to `uncompress'
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
my_compress.o(.text+0x12a): undefined reference to `compress'
collect2: ld returned 1 exit status
make: *** [target_static] Error 1
-----------------------
I am having the exact problem Eric had. The difference between our cases is that I have Apache 1.3.19 and mySQL 3.23.36 instead. I followed the link freebsd gave, but I really don't understand what to do.

I am not sure what xho meant to add "-lz", but I changed the PHP Makefile so that the LTLIBRARY_LDFLAGS line looks like:

LTLIBRARY_LDFLAGS = -lz -rpath $(phptempdir) ....

I only added the "-lz" in front. I re-made PHP, then try to re-make Apache but got the same error.

Sorry I don't know what I am doing here but could someone please tell me what I am doing wrong?

Thanks in advance.

Ok I kinda got it working, at least the Apache "make" works now (my original problem).

I found this:
http://www.php.net/bugs.php?id=7247

I "make clean" everything, then started with PHP again.

1) I ran the PHP "./configure" with "--with-zlib",
2)"make" and "make install" PHP,
3)"make" Apache, the problem didn't appear again.










privacy (GDPR)