Complie Error

masood_y

Well-Known Member
#1
Hello,

I cant conpile php and have following error log:

Code:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     1    0     1    0     0      2      0 --:--:-- --:--:-- --:--:--  1000
  0 11.4M    0  2595    0     0   2381      0  1:24:19  0:00:01  1:24:18  2381
  1 11.4M    1  131k    0     0  66545      0  0:03:01  0:00:02  0:02:59  138k
 12 11.4M   12 1515k    0     0   512k      0  0:00:22  0:00:02  0:00:20  809k
 38 11.4M   38 4557k    0     0  1151k      0  0:00:10  0:00:03  0:00:07 1587k
 80 11.4M   80 9489k    0     0  1895k      0  0:00:06  0:00:05  0:00:01 2421k
100 11.4M  100 11.4M    0     0  2192k      0  0:00:05  0:00:05 --:--:-- 2750k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

 73  3420   73  2582    0     0   2207      0  0:00:01  0:00:01 --:--:--  2207
100  3420  100  3420    0     0   2505      0  0:00:01  0:00:01 --:--:--  4297
patching file php-5.2.6/ext/standard/mail.c
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0 25259    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 25259  100 25259    0     0  28455      0 --:--:-- --:--:-- --:--:-- 58741
Forcing buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.59 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
           Running cvsclean for you.
           To avoid this, install autoconf-2.13.
rebuilding configure
aclocal.m4:2141: PHP_PROG_LEX is expanded from...
rebuilding main/php_config.h.in
autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader: 
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
autoheader: WARNING: `acconfig.h':
autoheader: 
autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader: 		[Define if a function `main' is needed.])
autoheader: 
autoheader: WARNING: More sophisticated templates can also be produced, see the
autoheader: WARNING: documentation.
aclocal.m4:2141: PHP_PROG_LEX is expanded from...
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
shtool:echo:Warning: unable to determine terminal sequence for bold mode
shtool:echo:Warning: unable to determine terminal sequence for bold mode
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
How can reolve this issue?
 

mistwang

LiteSpeed Staff
#2
Looks like a permission problem with your "gcc" "ld" executable.

check the permission of those files.

do

chmod 755 /usr/bin/gcc
chmod 755 /usr/bin/ld

after finish compilation, change it back.

If you are using cPanel, you can use the WHM plugin to compile PHP.
 

masood_y

Well-Known Member
#5
you missed PHP mysql module
How can resolve this issue?

I used following configured parameters:

--with-mysqli --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv
 

masood_y

Well-Known Member
#7
Here is build log --with-mysql

Code:
checking for an ANSI C-conforming const... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for working memcmp... yes
checking for mcrypt support... no
checking for mhash support... no
checking whether to include mime_magic support... no
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/tmp/mysql.sock
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
I am unable to compile php too!
 

mistwang

LiteSpeed Staff
#9
You need to install mysql client library and specify the path to that library

--with-mysql=<path_to_mysql_client_lib_dir>

Use the configuration parameter in your apache PHP info page as a reference.
 

masood_y

Well-Known Member
#10
Im try to compile with:

--with-mysql=/usr/lib/ --with-zlib --with-gd --with-ttf --with-curl=/opt/curl/ --enable-shmop --enable-exif --enable-ftp --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv


But i have following error too:

checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/tmp/mysql.sock
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
 

mistwang

LiteSpeed Staff
#11
You should install libmysqlclient-devel RPM.

Are you using cPanel?
If yes, please try "build matching PHP" from the LSWS WHM plugin.
 

masood_y

Well-Known Member
#12
How can resolve this error now:

/usr/local/lsws/phpbuild/php-5.2.8/main/reentrancy.c: In function 'php_readdir_r':
/usr/local/lsws/phpbuild/php-5.2.8/main/reentrancy.c:139: error: too few arguments to function 'readdir_r'
make: *** [main/reentrancy.lo] Error 1
 

mistwang

LiteSpeed Staff
#13
you can try the build script from command line, go to

/usr/local/lsws/phpbuild/

The execute "./phpbuild.xxxxxxxxxxx.sh" manually, see if it get passed, if it is OK, then it is more likely a problem with PHP memory limit. You need to manually copy over
phpbuild/php-5.2.8/sapi/litespeed/php to lsws/fcgi-bin/lsphp-5.2.8

Please let me know it works or not.
 

masood_y

Well-Known Member
#14
i see following in /usr/local/lsws/phpbuild/
root@giga [/usr/local/lsws/phpbuild]# ls
./ phpbuild.1230098311.8.progress
../ phpbuild.1230098311.8.sh*
php-5.2.8/ phpbuild.1230098598.2.log
php-5.2.8-mail-header.patch phpbuild.1230098598.2oc.sh*
php-5.2.8.tar.gz phpbuild.1230098598.2.progress
phpbuild.1230098311.8.log phpbuild.1230098598.2.sh*
phpbuild.1230098311.8oc.sh* savedconfig.5.txt


What is the mean of ech and wich must be run?
 
#16
I'm getting this error

Code:
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:363: undefined reference to `executor_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:363: undefined reference to `executor_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:365: undefined reference to `executor_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:357: undefined reference to `sapi_globals'
sapi/litespeed/lsapi_main.o: In function `cli_main':
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:515: undefined reference to `executor_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:516: undefined reference to `sapi_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:519: undefined reference to `compiler_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:520: undefined reference to `executor_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:590: undefined reference to `sapi_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:588: undefined reference to `sapi_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:589: undefined reference to `sapi_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:619: undefined reference to `executor_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:600: undefined reference to `sapi_globals'
sapi/litespeed/lsapi_main.o: In function `processReq':
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:399: undefined reference to `executor_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:410: undefined reference to `executor_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:401: undefined reference to `sapi_globals'
sapi/litespeed/lsapi_main.o: In function `init_request_info':
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:328: undefined reference to `sapi_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:329: undefined reference to `sapi_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:330: undefined reference to `sapi_globals'
/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:331: undefined reference to `sapi_globals'
sapi/litespeed/lsapi_main.o:/home/cpeasyapache/ls.src/php-5.2.8/sapi/litespeed/lsapi_main.c:336: more undefined references to `sapi_globals' follow
collect2: ld returned 1 exit status
make: *** [sapi/litespeed/php] Error 1
**ERROR** Could not compile PHP
 
Top