terminus

Registered
Dec 21, 2014
2
0
1
cPanel Access Level
Root Administrator
hi!

we need use GMP with our project ( https://gmplib.org/) and we're trying to compile it with easyapache, apache 2.4 and php 5.5 .

But all time we're getting error 256 while we are updating with easyapache.

we tried:

http://ssh9.com/cPanel-Server/install-GMP-5-Math-Library-in-cPanel-Server

http://documentation.cPanel.net/display/EA/RAW+opts

but it doesnt work.

any advice are welcome, why we want use cPanel for this project, but, we need GMP.

thanks!!!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,236
463
Hello :)

Do you notice any specific error messages in the EasyApache build logs located in the /usr/local/cpanel/logs/easy/apache directory? Could you post the contents of the raw opts file?

Thank you.
 

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
Good morning,

I was able to replicate this by following the instructions on that web page. The full error that I got was from libgmp not being found when compiling PHP:
configure:47918: result: no
configure:47931: checking size of short
configure:47936: cc -o conftest -g -O2 -fvisibility=hidden -L/usr/X11R6/lib64 -Wl,-rpath,/opt/xml2/lib -L/opt/xml2/lib -Wl,-rpath,/opt/pcre/lib64 -L
/opt/pcre/lib64 -Wl,-rpath,/opt/curlssl/lib -L/opt/curlssl/lib -Wl,-rpath,/opt/curlssl//lib64 -L/opt/curlssl//lib64 -Wl,-rpath,/usr/local/lib64 -L/usr
/local/lib64 conftest.c -lgmp -lX11 -lXpm -lpng -lz -ljpeg -lcrypto -lssl -lcrypto -lcurl -lz -lpcre -lcrypto -lssl -lcrypto -lrt -lm -ldl -lnsl -lxm
l2 -lz -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lidn -lssl -lcrypto -lz -lrt -lxml2 -lz -lm -ldl -lfreetype >&5
configure:47936: $? = 0
configure:47936: ./conftest
./conftest: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
configure:47936: $? = 127
configure: program exited with status 127
configure: failed program was:
I fixed this by running
Code:
yum install gmp-devel
and then re-running
Code:
/scripts/easyapache --build
Code:
> php -i | grep -i gmp
Configure Command =>  './configure'  '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libx
ml' '--enable-pdo=shared' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-freet
ype-dir=/usr' '--with-gd' '--with-gmp' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--wit
h-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--wi
th-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png
-dir=/usr' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'
gmp
gmp support => enabled
GMP version => 4.3.1
PWD => /usr/local/src/gmp-5.1.0
_SERVER["PWD"] => /usr/local/src/gmp-5.1.0
_ENV["PWD"] => /usr/local/src/gmp-5.1.0
 

terminus

Registered
Dec 21, 2014
2
0
1
cPanel Access Level
Root Administrator
thanks to all for answer.

cPJacob -> with your commands is working.

yum install gmp-devel

/scripts/easyapache --build

note: i did a clean install again, the first time that followed your instructions, got error about of the gmp library, i think that is because, the first time used a manual instalation of gmp, using yum ( yum install gmp-devel in a clean instalation all ok ).

thanks again ;)