Solved

Compile PHP as DSO on Solaris 10

Posted on 2006-06-09
2
1,695 Views
Last Modified: 2013-12-13
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() {
      xmlInitParser();
      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?

Ben


0
Comment
Question by:benmathis
2 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 500 total points
ID: 16882550
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 )
from:

http://sunfreeware.com/

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:
 PATH=/usr/local/bin:$PATH
  export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH

  also have a look at the instructions in:
  http://meljr.com/~meljr/AMPSolaris10.html

  The procedures is simplar to Solaris 8:
  http://ampubsvc.com/~meljr/a2m4p5s8.html

  Good luck!
 
0
 

Author Comment

by:benmathis
ID: 16884034
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
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now