Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiling PHP5 Problem

Status
Not open for further replies.

ponetguy2

MIS
Aug 28, 2002
442
0
0
US
I'm trying to compile PHP5. I've installed mysql successfully and apache 1.3 is working great, but I get the message
below when I compile PHP5. I double checked if I have libxml2 installed and I do. I installed the binary from
sunfreeware. Please see below for details:



./configure --with-mysql --with-apxs=/usr/apache/bin/apxs --enable-libxml --with-libxml-dir=/usr/include/libxml2/libxml


Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /usr/include/libxml2/libxml
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed. Please check the config.log for details.

# pkginfo -l SMClxml2
PKGINST: SMClxml2
NAME: libxml2
CATEGORY: application
ARCH: sparc
VERSION: 2.6.16
BASEDIR: /usr/local
VENDOR: Daniel Veillard
PSTAMP: Steve Christensen
INSTDATE: Jun 12 2006 14:12
EMAIL: steve@smc.vnet.net
STATUS: completely installed
FILES: 539 installed pathnames
10 shared pathnames
29 directories
38 executables
45020 blocks used (approx)


# find / -name libxml2
/usr/include/libxml2
/opt/local/include/libxml2
/opt/local/doc/libxml2

Please help.
 
I'm not sure what I'm looking at when I checked config.log. I just did a grep on errors and this is what I came up with:

# grep error config.log
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: File processing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
perror("fopen");
configure:17008: error: structure has no member named `tm_zone'
configure:17077: error: `localtime_r' undeclared (first use in this function)
configure:17077: error: (Each undeclared identifier is reported only once
configure:17077: error: for each function it appears in.)
configure:17102: error: `gmtime_r' undeclared (first use in this function)
configure:17102: error: (Each undeclared identifier is reported only once
configure:17102: error: for each function it appears in.)
configure:17177: error: `strtok_r' undeclared (first use in this function)
configure:17177: error: (Each undeclared identifier is reported only once
configure:17177: error: for each function it appears in.)
configure:17245: error: structure has no member named `tm_gmtoff'
configure:17371: error: `intmax_t' undeclared (first use in this function)
configure:17371: error: (Each undeclared identifier is reported only once
configure:17371: error: for each function it appears in.)
configure:17488: error: `ptrdiff_t' undeclared (first use in this function)
configure:17488: error: (Each undeclared identifier is reported only once
configure:17488: error: for each function it appears in.)
configure:17893: error: structure has no member named `sa_len'
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
configure:18133: checking for gai_strerror
configure:18133: checking for perror
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
configure:18133: checking for strerror
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
ld: fatal: Symbol referencing errors. No output written to conftest
/* Override any gcc2 internal prototype to avoid an error. */
configure:18681: error: too many arguments to function `asctime_r'
configure:18713: error: too many arguments to function `asctime_r'

Please help.
 
Try looking for 'check whether libxml build works' in the config.log and the messages around that should be the most relevant; I would expect it to be near the end since it stopped at that point. The output above isn't very useful because it's quite normal for lots of errors to be produced by the configure scripts when it is determining whether or not various libraries or utilities are available on your system.

Annihilannic.
 
I think SMClxml2 installs in /usr/local, so you should run configure like this:

Code:
./configure --with-mysql --with-apxs=/usr/apache/bin/apxs --enable-libxml [b]--with-libxml-dir=/usr/local[/b]
 
thank you huebs and Annihilannic. i appreciate the reply. i found a binary for apache2 and php5 on sunfreeware and i installed it successfully.

thank you.
 
I have never built php with libxml. Unless you have a specific reason to add it, you can build without it. The pre-built package probably isn't built with libxml anyway. (maybe it is though.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top