Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1779
  • Last Modified:

Compile PHP as DSO on Solaris 10

Hello Experts

I'm trying to compile PHP version 5.1.4 as DSO for Apache 2.0.55 on Solaris 10 (Generic_118822-30 sun4v sparc SUNW,Sun-Fire-T2000)

./configure --with-apxs2=/opt/httpd/bin/apxs --enable-track-vars --disable-debug

The config stops with the following error:

------------------- begin paste-------------------

checking whether to enable short tags by default... yes
checking whether to enable dmalloc... no
checking whether to enable IPv6 support... yes
checking how big to make fd sets... using system default
checking whether to enable versioning... no
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
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.
---------------------------- end paste -----------------------------

Here the tail of the config.log

------------------- begin paste-------------------

configure:19665: checking how big to make fd sets
configure:19685: checking whether to enable versioning
configure:19733: checking whether to enable LIBXML support
configure:19780: checking libxml2 install dir
configure:19809: checking for xml2-config path
configure:19966: checking whether libxml build works
configure:19993: gcc -o conftest -g -O2  -D_POSIX_PTHREAD_SEMANTICS  -R/usr/ucblib -L/usr/ucblib -R/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3 -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3 -R/usr/local/lib -L/usr/local/lib conftest.c
         -lresolv -lm -lnsl -lsocket  -lgcc -lxml2 -lz -liconv -lm -lsocket -lnsl 1>&5
ld: fatal: library -liconv: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 19982 "configure"
#include "confdefs.h"
    char xmlInitParser();
    int main() {
      return 0;
---------------------------- end paste -----------------------------

I also tried supplying the libxml2 path but it didnt work either

the libxml2 package is installed:
---------------------------- begin paste -----------------------------
/usr/local/lib% pkginfo | grep xml2
application SMClxml2                         libxml2
---------------------------- end paste -----------------------------

Any Ideas?


1 Solution
You can download and install the php  binary (also need to install all the dependency packages, eg: libiconv. libxml2, zlib, and either libgcc-3.3 or gcc )


If you still want to install it from source, make sure that you install all the download the GNU tools from the above site before you start, eg, you need:

gcc, glib, make(GNU), flex, bison, autoconf, automake, perl, gzip, tar (GNU),zlib, and openssl.

they are install in /usr/local, you need to set PATH and  LD_LIBRARY_PATH to
use them, eg:
  export PATH

  also have a look at the instructions in:

  The procedures is simplar to Solaris 8:

  Good luck!
benmathisAuthor Commented:
The instructions http://meljr.com/~meljr/AMPSolaris10.html did the job!
The libxml2 package I had downloaded from sunfreeware.com did not work correctly.
After downloading the source from xmlsoft.org and building it from scratch configure and make ran through.

Thanks for the help

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now