Solved

Compile PHP as DSO on Solaris 10

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

861 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

22 Experts available now in Live!

Get 1:1 Help Now