Build Matching PHP Issue

Discussion in 'Apache Migration/Compatibility' started by Tony, Jan 19, 2010.

  1. Tony

    Tony Member

    On our test server everything is fine with the cPanel built PHP 5.2.12 no errors what so ever. Once we run build matching PHP we end up with this:

    Code:
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by php)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libexslt.so.0)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libexslt.so.0)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    php: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    

    Any idea's?
  2. mistwang

    mistwang LiteSpeed Staff

    Maybe you should use libmxl2 installation under /opt/ directory to match /opt/xslt/ installation?
  3. Tony

    Tony Member

    Well this is using the build matching php it should build the matching cPanel configure options using it's source should it not? cPanel's PHP has no such errors just the litespeed one.

    I'm going to go rebuild both and check the outputs and see what exactly is going wrong.
  4. Tony

    Tony Member

    Well I cannot find the difference only thing I see is the make clean being done on the ls.src one.
  5. mistwang

    mistwang LiteSpeed Staff

    cPanel easyapache should build PHP with configuration option '--with-libxml-dir=/opt/xml2/', the matching PHP built form LSWS plugin should have it as well.
    If it does, need to find out why it does not load libxml2 from /opt/xml2.
  6. Tony

    Tony Member

    Both have it. Attached the build output

    Attached Files:

  7. mistwang

    mistwang LiteSpeed Staff

    I think it is just that lsphp does load the library in /opt/xml2/lib/, but load the one in /usr/lib64 .
    You can check output of
    ldd lsphp5
    and
    ldd /usr/local/bin/php

    Try setting LD_LIBRARY_PATH or LD_RUN_PATH environment see if it helps or not, but rpath should be build into the lsphp binary.

    Which version of PHP and cPanel are you using?
    Last edited: Dec 5, 2010
  8. Tony

    Tony Member

    PHP 5.2.12 & cPanel 11.25

    lsphp5:
    Code:
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by ./lsphp5)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libexslt.so.0)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libexslt.so.0)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
    ./lsphp5: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
            libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000339ac00000)
            libexslt.so.0 => /opt/xslt/lib/libexslt.so.0 (0x00002b8f96686000)
            libm.so.6 => /lib64/libm.so.6 (0x0000003399000000)
            libexpat.so.0 => /lib64/libexpat.so.0 (0x00000033a0c00000)
            libtidy-0.99.so.0 => /usr/lib64/libtidy-0.99.so.0 (0x00002b8f96899000)
            libaspell.so.15 => /usr/lib64/libaspell.so.15 (0x0000003440c00000)
            libpspell.so.15 => /usr/lib64/libpspell.so.15 (0x0000003441800000)
            libmhash.so.2 => /usr/lib64/libmhash.so.2 (0x00002b8f96af5000)
            libmcrypt.so.4 => /usr/lib64/libmcrypt.so.4 (0x00002b8f96d21000)
            libltdl.so.3 => /usr/lib64/libltdl.so.3 (0x0000003441000000)
            libssl.so.6 => /lib64/libssl.so.6 (0x00000033a3000000)
            libcrypto.so.6 => /lib64/libcrypto.so.6 (0x000000339e400000)
            libpam.so.0 => /lib64/libpam.so.0 (0x0000003979600000)
            libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00000033a1400000)
            libX11.so.6 => /usr/lib64/libX11.so.6 (0x000000339c000000)
            libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x0000003440800000)
            libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x00000033a4c00000)
            libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00000033a3400000)
            libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x000000339a800000)
            librt.so.1 => /lib64/librt.so.1 (0x0000003399400000)
            libresolv.so.2 => /lib64/libresolv.so.2 (0x00000033a0000000)
            libnsl.so.1 => /lib64/libnsl.so.1 (0x000000339d000000)
            libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00000033a1c00000)
            libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00000033a1000000)
            libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00000033a2400000)
            libcom_err.so.2 => /lib64/libcom_err.so.2 (0x000000339fc00000)
            libcurl.so.4 => /opt/curlssl/lib/libcurl.so.4 (0x00002b8f96f58000)
            libidn.so.11 => /usr/lib64/libidn.so.11 (0x0000003441400000)
            libxslt.so.1 => /opt/xslt/lib/libxslt.so.1 (0x00002b8f9719f000)
            libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00000033a1800000)
            libdl.so.2 => /lib64/libdl.so.2 (0x0000003398800000)
            libc.so.6 => /lib64/libc.so.6 (0x0000003398400000)
            libz.so.1 => /usr/lib64/libz.so.1 (0x0000003399c00000)
            libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x000000339ec00000)
            libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000000339c400000)
            libaudit.so.0 => /lib64/libaudit.so.0 (0x0000003979200000)
            libXau.so.6 => /usr/lib64/libXau.so.6 (0x000000339cc00000)
            libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x000000339c800000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003398c00000)
            /lib64/ld-linux-x86-64.so.2 (0x0000003398000000)
            libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00000033a2000000)
            libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x000000339e800000)
            libselinux.so.1 => /lib64/libselinux.so.1 (0x000000339a000000)
            libsepol.so.1 => /lib64/libsepol.so.1 (0x0000003399800000)
    

    /usr/local/bin/php:

    Code:
     libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x000000339ec00000)
            libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000339ac00000)
            libexslt.so.0 => /opt/xslt/lib/libexslt.so.0 (0x00002b94e99b6000)
            libm.so.6 => /lib64/libm.so.6 (0x0000003399000000)
            libexpat.so.0 => /lib64/libexpat.so.0 (0x00000033a0c00000)
            libtidy-0.99.so.0 => /opt/tidy/lib/libtidy-0.99.so.0 (0x00002b94e9bc9000)
            libaspell.so.15 => /usr/lib64/libaspell.so.15 (0x0000003440c00000)
            libpspell.so.15 => /usr/lib64/libpspell.so.15 (0x0000003441800000)
            libmhash.so.2 => /opt/mhash/lib/libmhash.so.2 (0x00002b94e9e25000)
            libmcrypt.so.4 => /opt/libmcrypt/lib/libmcrypt.so.4 (0x00002b94ea051000)
            libltdl.so.3 => /usr/lib64/libltdl.so.3 (0x0000003441000000)
            libssl.so.6 => /lib64/libssl.so.6 (0x00000033a3000000)
            libcrypto.so.6 => /lib64/libcrypto.so.6 (0x000000339e400000)
            libpam.so.0 => /lib64/libpam.so.0 (0x0000003979600000)
            libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00000033a1400000)
            libX11.so.6 => /usr/lib64/libX11.so.6 (0x000000339c000000)
            libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x0000003440800000)
            libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x00000033a4c00000)
            libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00000033a3400000)
            libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x000000339a800000)
            librt.so.1 => /lib64/librt.so.1 (0x0000003399400000)
            libresolv.so.2 => /lib64/libresolv.so.2 (0x00000033a0000000)
            libnsl.so.1 => /lib64/libnsl.so.1 (0x000000339d000000)
            libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00000033a1c00000)
            libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00000033a1000000)
            libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00000033a2400000)
            libcom_err.so.2 => /lib64/libcom_err.so.2 (0x000000339fc00000)
            libcurl.so.4 => /opt/curlssl/lib/libcurl.so.4 (0x00002b94ea288000)
            libidn.so.11 => /usr/lib64/libidn.so.11 (0x0000003441400000)
            libxslt.so.1 => /opt/xslt/lib/libxslt.so.1 (0x00002b94ea4ce000)
            libxml2.so.2 => /opt/xml2/lib/libxml2.so.2 (0x00002b94ea708000)
            libdl.so.2 => /lib64/libdl.so.2 (0x0000003398800000)
            libc.so.6 => /lib64/libc.so.6 (0x0000003398400000)
            libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000000339c400000)
            /lib64/ld-linux-x86-64.so.2 (0x0000003398000000)
            libz.so.1 => /usr/lib64/libz.so.1 (0x0000003399c00000)
            libaudit.so.0 => /lib64/libaudit.so.0 (0x0000003979200000)
            libXau.so.6 => /usr/lib64/libXau.so.6 (0x000000339cc00000)
            libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x000000339c800000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003398c00000)
            libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00000033a2000000)
            libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x000000339e800000)
            libselinux.so.1 => /lib64/libselinux.so.1 (0x000000339a000000)
            libsepol.so.1 => /lib64/libsepol.so.1 (0x0000003399800000)
    
  9. mistwang

    mistwang LiteSpeed Staff

    It puzzled me as well.
    The lsphp5 binary are linked with " -R /opt/xml2/lib", so it suppose to look for libxml2.so.2 under /opt/xml2/lib directory. But somehow it find /usr/lib64/libxml2.so.2 first.

    Something wrong with the linker?

    Can you try "strace ./lsphp5 -i" , it should show how libxml2.so was located.
    compare it to "strace /usr/local/bin/php -i".
  10. UWH-David

    UWH-David New Member

    What was the fix for this? I am running into this as well and have all kinds of different build parameters and throwing:

    LD_LIBRARY_DIR=/opt/xml2/lib64 to the external lsphp5 environment to no avail.
  11. sunjith

    sunjith New Member

    Code:
    rm -f /usr/lib64/libxml2.so.2
    Fixed it.
  12. sunjith

    sunjith New Member

    Do this as well to avoid other problems:
    Code:
    ln -s /opt/xml2/lib/libxml2.so.2 /usr/lib64/libxml2.so.2
  13. xing

    xing LiteSpeed Staff

    Changing the symlink works but with a gotcha. Sometimes a yum update/upgrade will force the system to rebuild the library links and when that happens, it will revert the symlink back to the original libxml2 library that came with the distro.

    Overwrite the /usr/lib64/libxml2.so.2.6.26 file with the /usr/local/lib/libxml2.so.2.7.7 file. This will work for as long as the libxml rpm package is not updated.
  14. mistwang

    mistwang LiteSpeed Staff

    Digging a little bit deeper on this, came cross http://www.eyrie.org/~eagle/notes/rpath.html

    I think something wrong with RPATH built into the binary, it can be checked with
    Code:
    readelf -d lsphp5 | grep RPATH
    If somehow /usr/lib(64) got into RPATH before /opt/xml/lib, it could cause wrong library loaded. there is a tool called "patchelf" which can update RPATH built into ELF binary.
    http://nixos.org/patchelf.html

    The root cause might be the GNU build tool chain, autoconf, libtool, etc.

Share This Page