Compile PHP5

Compile PHP5

Posted by: exelence
Posted on: 2009-04-20 08:21:00

Hello,

I tried to compile PHP 5 to gt GMP support. I used script form here http://wiki.dreamhost.com/PHP5_installscript

But during PHP compilation I got the following error:

tls.o .libs/sslgen.o -Wl,--rpath -Wl,/home/username/php5/lib -Wl,--rpath -Wl,/home/username/php5/lib -L/home/username/php5/lib /home/username/php5/lib/libidn.so -lssl -lcrypto -ldl -lz -Wl,-soname -Wl,libcurl.so.3 -o .libs/libcurl.so.3.0.0
/usr/bin/ld: /home/username/php5/lib/libssl.a(s2_clnt.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/username/php5/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libcurl.la] Error 1
make[2]: Leaving directory `/home/username/source/curl-7.14.0/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/username/source/curl-7.14.0/lib'
make: *** [all-recursive] Error 1


What I did wrong? )

Re: Compile PHP5

Posted by: sXi
Posted on: 2009-04-20 10:19:00

Try this in your OpenSSL config:

./config --prefix=[$loc] --openssldir=[$loc] --shared


* Replace [$loc] with w/e variable the script is using (and compile OpenSSL before cURL).

If you still receive an error you may need to set CFLAGS in the zlib config too.




How To Install PHP.INI / ionCube on DreamHost

Re: Compile PHP5

Posted by: exelence
Posted on: 2009-04-21 13:22:00

Thank you very much. This helps.
However I still have problem with activating GMP )


Do you know why while compile PHP I got error
checking for GNU MP support... yes
configure: error: Unable to locate gmp.h

I checked
ls -l /home/username/php5/include/

and gmp. h is there


Edited by exelence on 04/21/09 01:47 PM (server time).

Re: Compile PHP5

Posted by: sXi
Posted on: 2009-04-21 17:44:00

export CPATH=/home/[username]/php5/include:/usr/local/include:$CPATH

[compile GMP]




How To Install PHP.INI / ionCube on DreamHost

Re: Compile PHP5

Posted by: exelence
Posted on: 2009-04-22 07:27:00

Thanks a lot.
I solve this issue with
--with-gmp=[INSTALLDIR]

and face another one ))
Copying PHP CGI
cp: cannot stat `/home/[username]/php5/bin/php-cgi': No such file or directory

I didn't know that it's so hard)



Re: Compile PHP5

Posted by: exelence
Posted on: 2009-04-22 23:51:00

Finally I did this!!!
Thanks for the help.

Re: Compile PHP5

Posted by: dab
Posted on: 2009-04-25 02:36:00

Hey I have PHP5 custom Compiled on my account. Instead of creating a new thread, I figured I'd use this thread too.

I want to install SSH2, but I can't seem to get it. It is being a bugger... :\

Tags: curl 7installscriptscript formexit statuslibsphp 5x86libidnlibcompilation