Can't Compile PHP - sockets

#1
PHP 5.3.3
CentOS 5.5 x86_64
Litespeed 4.0.17

I get this error when compiling PHP:

Code:
/bin/sh /usr/local/lsws/phpbuild/php-5.3.3/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/sockets/ -I/usr/local/lsws/phpbuild/php-5.3.3/ext/sockets/ -DPHP_ATOM_INC -I/usr/local/lsws/phpbuild/php-5.3.3/include -I/usr/local/lsws/phpbuild/php-5.3.3/main -I/usr/local/lsws/phpbuild/php-5.3.3 -I/usr/local/lsws/phpbuild/php-5.3.3/ext/date/lib -I/usr/local/lsws/phpbuild/php-5.3.3/ext/ereg/regex -I/opt/xml2/include/libxml2 -I/opt/pcre/include -I/opt/curlssl//include -I/usr/include/freetype2 -I/opt/php_with_imap_client//include -I/usr/local/lsws/phpbuild/php-5.3.3/ext/mbstring/oniguruma -I/usr/local/lsws/phpbuild/php-5.3.3/ext/mbstring/libmbfl -I/usr/local/lsws/phpbuild/php-5.3.3/ext/mbstring/libmbfl/mbfl -I/opt/libmcrypt//include -I/usr/include/mysql -I/usr/local/lsws/phpbuild/php-5.3.3/ext/sqlite3/libsqlite -I/usr/local/lsws/phpbuild/php-5.3.3/TSRM -I/usr/local/lsws/phpbuild/php-5.3.3/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /usr/local/lsws/phpbuild/php-5.3.3/ext/sockets/sockets.c -o ext/sockets/sockets.lo 
/tmp/ccwi4Lyc.s: Assembler messages:
/tmp/ccwi4Lyc.s:3304: Error: Incorrect register `%rax' used with `l' suffix
/tmp/ccwi4Lyc.s:3472: Error: Incorrect register `%rdx' used with `l' suffix
make: *** [ext/sockets/sockets.lo] Error 1
**ERROR** Could not compile PHP
Please advise.
 

webizen

Well-Known Member
#2
to help troubleshoot, pls run from command line (shell):
Code:
# cd /usr/local/lsws/phpbuild/php-5.3.3
# /bin/sh -xv /usr/local/lsws/phpbuild/php-5.3.3/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/sockets/ -I/usr/local/lsws/phpbuild/php-5.3.3/ext/sockets/ -DPHP_ATOM_INC -I/usr/local/lsws/phpbuild/php-5.3.3/include -I/usr/local/lsws/phpbuild/php-5.3.3/main -I/usr/local/lsws/phpbuild/php-5.3.3 -I/usr/local/lsws/phpbuild/php-5.3.3/ext/date/lib -I/usr/local/lsws/phpbuild/php-5.3.3/ext/ereg/regex -I/opt/xml2/include/libxml2 -I/opt/pcre/include -I/opt/curlssl//include -I/usr/include/freetype2 -I/opt/php_with_imap_client//include -I/usr/local/lsws/phpbuild/php-5.3.3/ext/mbstring/oniguruma -I/usr/local/lsws/phpbuild/php-5.3.3/ext/mbstring/libmbfl -I/usr/local/lsws/phpbuild/php-5.3.3/ext/mbstring/libmbfl/mbfl -I/opt/libmcrypt//include -I/usr/include/mysql -I/usr/local/lsws/phpbuild/php-5.3.3/ext/sqlite3/libsqlite -I/usr/local/lsws/phpbuild/php-5.3.3/TSRM -I/usr/local/lsws/phpbuild/php-5.3.3/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /usr/local/lsws/phpbuild/php-5.3.3/ext/sockets/sockets.c -o ext/sockets/sockets.lo
then paste the result here.
 
Last edited:
#3
Hello,

The troubleshoot commands generated a rather large output.
Please see (replace **** with http): ****://pastebin.com/1xriCpuL

Let me know what you can gather from this.
 

webizen

Well-Known Member
#4
Looks like (line 7783) your server is unable to build socket related object. This is likely your server running with mixed libraries. Hence the error. If you build php from source, you will likely run into same issue. What are your php build options? Try to build (with lsws and without lsws) a different php version (5.2.14 or etc) and see if any difference.
 
#5
We're using CloudLinux - could this be the problem?
I would really not rather go through the hassle of compiling anything command line... could I switch to Apache and then use cPanel's EasyApache, create a config, then back to Litespeed?
 

webizen

Well-Known Member
#6
Then it is better to build php with EasyApache in cPanel and switch back to Litespeed and build matching php. Don't think ClouldLinux could be the cause at this point.
 
Top