LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ./configure php5 error - log included (https://www.linuxquestions.org/questions/linux-newbie-8/configure-php5-error-log-included-199869/)

Transition 07-01-2004 07:39 AM

./configure php5 error - log included
 
hi everyone,

trying to install php5 on a slackware10 system with the following options..

./configure --with-mysql --with-apxs=/usr/sbin/apxs

also just tried doing a compile w/ no options

./configure

either way the intallation fails and this is what my config.log says. I'm having a hard time identifying exactly what the error is.


!http://www.dionsys.com/config.log

any help is greatly appreciated!

Transition 07-01-2004 10:43 AM

bump

btmiller 07-01-2004 02:23 PM

This is the critical section of your config.log:

Code:

configure:18053: checking whether libxml build works
configure:18080: gcc -o conftest -g -O2  conftest.c
         
        -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm 1>&5
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
configure: failed program was:
#line 18069 "configure"
#include "confdefs.h"

   
    char xmlInitParser();
    int main() {
      xmlInitParser();
      return 0;
    }

In particular note the line ending with "cannot find -lz". This means that the linker could not find your zlib library, which is used for compression. Check and see if you have zlib installed (you probably need zlib-devel, or whatever package contains the library's headers, too). If not, go ahead and install it. If you do, check "locate *libz*", which should spit out the path to the libz .so file. Then use ./configure --with-zlib=<directory the libz file is in>.

Note that all of this is happening during a check for libxml, so make sure you have that too.

DaCypher 07-15-2004 09:57 PM

I am actually getting a pretty similar problem but I am running Debian. At first PHP's configure script would fail saying that my version of libxml was too old. I eventually modified my sources.list to use testing code instead of stable and apt-get'ed libxml so I am now upgraded above what PHP requires. However, I still have trouble around the same point as I did before as well as the original poster's problem (libxml stuff).

Here is the last part of the configure output:
Code:

Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking whether libxml build works... no
configure: error: build test failed.  Please check the config.log for details.

And here is the relevant last part of the config.log:
Code:

configure:17846: checking whether to enable LIBXML support
configure:17893: checking libxml2 install dir
configure:18053: checking whether libxml build works
configure:18080: gcc -o conftest -g -O2  conftest.c

        -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm 1>&5
/usr/lib/libxml2.a(threads.o): In function `xmlGetGlobalState__internal_alias':
threads.o(.text+0x2b9): undefined reference to `pthread_once'
threads.o(.text+0x2c6): undefined reference to `pthread_getspecific'
threads.o(.text+0x2e9): undefined reference to `pthread_setspecific'
/usr/lib/libxml2.a(threads.o): In function `xmlIsMainThread__internal_alias':
threads.o(.text+0x326): undefined reference to `pthread_once'
/usr/lib/libxml2.a(threads.o): In function `xmlOnceInit':
threads.o(.text+0x3b6): undefined reference to `pthread_key_create'
collect2: ld returned 1 exit status
configure: failed program was:
#line 18069 "configure"
#include "confdefs.h"


    char xmlInitParser();
    int main() {
      xmlInitParser();
      return 0;
    }

It appears as though I am missing a library as the linker is throwing errors (possibly I just have an incorrect directory?). Thanks for any help.

DaCypher 07-16-2004 08:11 AM

Ok, I fixed it, this is what I did:
I ended up having to apt-get remove libxml2-devel and then apt-get install libxml2-dev (I guess there are some problems between the two, I think the devel package is gnome related the dev package is general xml stuff). Anyways, once I did that, the configure worked fine. Hopefully this will help someone in a similar situation as I came to this thread via google...


All times are GMT -5. The time now is 11:25 PM.