compiling php5 on solaris 9. please help.

I'm trying to compile PHP5. I've installed mysql5 successfully and apache1.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 libxml2 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.

What does config.log show regarding that error? Post those relevant lines only please as the file can be long.

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.

thank you for the reply. i found php and apache binaries from sunfreeware.com and installed those instead. apache and php is running great. thank you.

Hi,

I have tried in vain to compile from source PHP 5.2.3 with Tidy (HTML Tidy program) on a solaoris10/sparc box.

I cannot use the binary build of PHP since it does not include Tidy.

Is there a a "php-5.2.3-sol10-sparc-local" build that contains Tidy?

Thank you for any assistance or suggestions.

Mark

-----------

Typical simple test config and associated error in the log are:

Config: under /usr/local/src/php-5.2.3

./configure --with-config-file-path=/usr/local/apache2 --with-apxs2=/usr/apache2/bin/apxs --enable-dbase \
--with-libxml-dir=/usr/local --with-curl=/usr/local --with-tidy

Error:

configure:12523: gcc -o conftest -g -O2 -D_POSIX_PTHREAD_SEMANTICS -R/usr/ucblib -L/usr/ucblib conftest.c 1>&5
Undefined first referenced
symbol in file
socket /var/tmp//ccO8Qzik.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 12500 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char socket(); below. /
ymbol referencing errors. No output written to conftest
/
Override any gcc2 internal prototype to avoid an error. /
/
We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char socket();

I found that I could not install php-5.2.x unless I upgraded to gcc3 of later.

goto blastwave.org and get the pkg-get util and update as needed.

This should solve the problem.

I do like the sunfreeware stuff because it wants to install into /usr/local which I don't have permissions to manage or alter.

using blastwave I can install it to where ever I want.