Solved

Compile PHP as DSO on Solaris 10

Posted on 2006-06-09
2
1,708 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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

809 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