PhpSwitcher - Php compiler error

  • Hello,
    I've just downloaded PhpSwitcher 2.2.9 and uploaded it to my imscp 1.3.0 installation.
    It's a clean install of a jessie debian (I've also add some packages from jessie-backports and from stretch).
    I've tried to compile 5.4, 5.6 and 7.0 versions with php compiler but all of them failed with an errore regardi LDAP and SASL2 support:



    # perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl -v -f 5.4
    ............
    [DEBUG] iMSCP::Execute::execute: quilt --quiltrc /dev/null push -a --fuzz 0 -q
    [DEBUG] iMSCP::Execute::getExitCode: Command exited with value: 2
    [DONE] Patches successfully applied on php-5.4.45 source
    [INFO] Parallel jobs set to 8
    [INFO] Executing `install' make target for php-5.4.45...
    [DEBUG] iMSCP::Execute::execute: make -f /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/Makefile PREFIX=/opt/phpswitcher/php5.4 TPLSDIR=/var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/templates install
    [ -f ext/ext_skel ] && mv ext/ext_skel ext/ext_skel.in
    ./buildconf --force
    Forcing buildconf
    Removing configure caches
    .........
    checking for ANSI C header files... (cached) yes
    checking for LDAP support... yes, shared
    checking for LDAP Cyrus SASL support... /usr
    checking for 3 arg ldap_set_rebind_proc... yes
    checking for ldap_parse_result... no
    checking for ldap_parse_reference... no
    checking for ldap_start_tls_s... no
    checking for sasl_version in -lsasl2... no
    /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/Makefile:273: recipe for target 'configure-5.4-stamp' failed
    [DEBUG] iMSCP::Execute::getExitCode: Command exited with value: 2
    [FATAL] main::make: An error occurred while executing `install' make target for php-5.4.45: make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
    aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
    configure: WARNING: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 2.6.4 (found: 3.0).
    ../configure: line 5393: test: too many arguments
    configure: error: LDAP SASL check failed. Please check config.log for more information.
    make: *** [configure-5.4-stamp] Error 1



    The same error for all the tree version.
    What can i check to successfully compile php versions?
    thank you

  • (I've also add some packages from jessie-backports and from stretch)

    You're kidding? You're mixing packages from stable and testing repositories and now you 're wondering why you cannot compile PHP? Do you know that Stretch is not frozen and that packages can be broken or even missing?


    • What packages did you installed from testing exactly?
    • Content of your sources.list?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • I know, but I absolutely need it because of the new implementation in LVM (cache).
    of course I pinned stretch packages:
    Package: *
    Pin: release n=stretch
    Pin-Priority: -1


    I installed just the new kernel, the packages for lvm and something else, (like php7).

  • Could you give me an access to the server?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @itcm


    Answered ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @itcm


    I'm working on your server ATM.


    The real problem is:


    Code
    1. configure:57418: checking for ldap_parse_result
    2. configure:57418: x86_64-linux-gnu-gcc -o conftest -I/usr/include -g -O2 -fdebug-prefix-map=/usr/local/src/phpswitcher/php-5.4.45=. -fstack-protector-strong -Wformat -Werror=format-security -O2 -fsigned-char -fn$
    3. /usr/bin/ld: cannot find -lstdc++


    I continue to investigate...

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @itcm


    Your system is a bit broken due to packages installed from stretch (eg, those related to gcc, libstdc++6 ...). Should I force upgrade? to make your system consistent? If yes, be aware that some other packages will be updated to stretch (such as your perl distribution) due to dependencies.


    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @itcm


    Just to let you know that with clean testing (not mixed packages), all is ok:


    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Thank you for your investigation.
    when you said "should i force upgrade" did you mean to upgrade everything to stretch?
    Is not possible to install only stdc++?