Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Compile PHP as DSO on Solaris 10

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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.

840 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