Compile PHP5


#1

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? )


#2

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.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

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


#4

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

[compile GMP]

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

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)


#6

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


#7

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… :\