Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Sep 2002
    Posts
    9

    Default Error recompiling Cpanel's PHP

    When I run makecpphp to solve Fantastico's "Wrong datatype" warnings problem, I get the following error during the "configure" command and Cpanel's PHP doesn't get recompiled:

    Code:
    If configure fails try --with-freetype-dir=<DIR>
    configure: error: GD build test failed. Please check the config.log for details.
    !! './configure --disable-pdo --enable-ftp --enable-libxml --enable-mbstring --enable-sockets --enable-static --prefix=/var/cpanel/3rdparty/ --with-config-file-path=/usr/local/cpanel/3rdparty/etc/ --with-curl=/opt/curlssl/ --with-gd --with-gettext --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-openssl=/usr --with-openssl-dir=/usr --with-pgsql=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-zlib --with-zlib-dir=/usr' failed with exit code '256' !!
    !! Verbose logfile is at '/usr/local/cpanel/logs/easy/apache/build.1228506877' !!
    
    Done rebuilding cPanel's internal PHP.
    Failed to build working PHP
    When I check config.log, it says:

    Code:
    configure:42434: gcc -o conftest  -I/usr/kerberos/include   -lstdc++ -Wl,-rpath,/opt/xml2/lib -L/opt/xml2/lib -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib -Wl,-rpath,/opt/curlssl//lib -L/opt/curlssl//lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib conftest.c  -L   -lX11 -lXpm -lpng -lz -ljpeg -lssl -lcrypto -lcurl -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lssl -lcrypto -lldap -lz -lxml2 -lz -lm 1>&5
    /usr/X11R6/lib/libXpm.so: undefined reference to `XDefaultScreen'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XCreateImage'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XDefaultVisual'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XFreeGC'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XUngrabServer'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XGetImage'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XFreeColors'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XParseColor'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XGrabServer'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XQueryColors'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XAllocColor'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XGetGeometry'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XDefaultColormap'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XDefaultDepth'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XPutImage'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XCreatePixmap'
    /usr/X11R6/lib/libXpm.so: undefined reference to `XCreateGC'
    collect2: ld returned 1 exit status
    configure: failed program was:
    #line 42423 "configure"
    #include "confdefs.h"
    
        char foobar () {}
        char foobar();
        int main() {
          foobar();
          return 0;
        }
    How do I solve this? Thanks!

    -Dario

  2. #2
    Member rhenderson's Avatar
    Join Date
    Apr 2005
    Location
    Oklahoma
    Posts
    742

    Default

    I had that error one time, I can not remember what it said specifically, but I think you can get the error values that need to be corrected and use WHM >> Main >> Service Configuration >> PHP Configuration Editor to change those values without having to rebuild the internal PHP used by cPanel.
    Regards,
    Randy
    Affordable Web Hosting
    _________________________

  3. #3
    Member
    Join Date
    Apr 2003
    Posts
    168
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Just a shot in the dark here:

    configure: error: GD build test failed.
    Have you done a /scripts/installgd - then another /scripts/makecpphp
    Dylan Botha

  4. #4
    Member
    Join Date
    Sep 2002
    Posts
    9

    Default

    Thanks, guys! I tried the installgd script as per your suggestion, but it seems the --with-gd uses PHP bundled GD library instead of the system's. So I needed to change it to --with-gd=/usr. I found it at

    /var/cpanel/perl/easy/Cpanel/Easy/PHP5/GD.pm

    So I modified the file, did a chattr +i on it and ran makecpphp again, and PHP compiled just fine!

    -Dario

Similar Threads & Tags
Similar threads

  1. PHP recompiling Problems!
    By mark1hos in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-17-2005, 12:48 AM
  2. Recompiling PHP
    By JamesUS in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-17-2003, 12:38 PM
  3. Recompiling PHP
    By phantasmp in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-26-2003, 11:37 AM
  4. Recompiling PHP to support CURL...
    By mitul in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-14-2003, 12:40 PM
  5. recompiling PHP
    By ceejayoz in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 07-12-2002, 07:26 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube