Complie Error

Discussion in 'General' started by masood_y, Oct 1, 2008.

  1. masood_y

    masood_y New Member

    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?
  2. mistwang

    mistwang LiteSpeed Staff

    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.
  3. masood_y

    masood_y New Member

    Compile complete, but some of hosted site have following error:
    Such as: http://www.forum.persianwhois.com/

    Fatal error: Call to undefined function mysql_connect() in /home/d***s/public_html/includes/class_core.php on line 311
  4. mistwang

    mistwang LiteSpeed Staff

    you missed PHP mysql module
  5. masood_y

    masood_y New Member

    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
  6. ts77

    ts77 New Member

    --with-mysql
  7. masood_y

    masood_y New Member

    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!
  8. masood_y

    masood_y New Member

    Anybody is here?!!
  9. mistwang

    mistwang LiteSpeed Staff

    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.
  10. masood_y

    masood_y New Member

    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!
  11. mistwang

    mistwang LiteSpeed Staff

    You should install libmysqlclient-devel RPM.

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

    masood_y New Member

    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
  13. mistwang

    mistwang LiteSpeed Staff

    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.
  14. masood_y

    masood_y New Member

    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?
  15. mistwang

    mistwang LiteSpeed Staff

    ./phpbuild.1230098598.2.sh

    then

    cd php-5.2.8
    make install

    ./phpbuild.1230098598.2oc.sh
  16. Tickhi

    Tickhi New Member

    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
    
  17. mistwang

    mistwang LiteSpeed Staff

    try
    then

    "Build matching PHP binary".

Share This Page