PhpSwitcher - Couldn't compile PHP 5.2.17 on Ubuntu 16.04

  • hello,


    we installed a new vserver for testing imscp 1.4.3 and latest phpswitcher plugin 3.0.4:
    the compilation of php 5.2 failed with following error:


    > perl php_compiler.pl 5.2
    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 (found: 3.0.4).
    configure: WARNING: flex versions supported for regeneration of the Zend/PHP parsers: 2.5.4 (found: 2.6.0)
    configure: error: freetype.h not found.
    make: *** [configure-5.2-stamp] Error 1


    i googled a bit, and didnt find a solution to this problem. Is there one?


    just to be complete i tried, but it didnt help.
    apt-get install libfreetype6-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libfreetype6-dev is already the newest version (2.6.1-0.1ubuntu2.2).


    Thanks for your help!

  • @securityfocus


    That is surely a multi-arch issue. I'll have a look soon.

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

  • @securityfocus


    I cannot reproduce the problem.


    Configure result for PHP 5.2 on Ubuntu 16.04 Xenia Xerus (up-to-date)

    Shell-Script
    1. root@xenial:/usr/local/src/imscp# perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl -t configure 5.2...Generating filesconfigure: creating ./config.statuscreating main/internal_functions.ccreating main/internal_functions_cli.c+--------------------------------------------------------------------+| License: || This software is subject to the PHP License, available in this || distribution in the file LICENSE. By continuing this installation || process, you are bound by the terms of this license agreement. || If you do not agree with the terms of this license, you must abort || the installation process at this point. |+--------------------------------------------------------------------+Thank you for using PHP.config.status: creating php5.specconfig.status: creating main/build-defs.hconfig.status: creating scripts/phpizeconfig.status: creating scripts/man1/phpize.1config.status: creating scripts/php-configconfig.status: creating scripts/man1/php-config.1config.status: creating sapi/cli/php.1config.status: creating main/php_config.hconfig.status: executing libtool commandsconfig.status: executing default commandscd 5.2-build && \cp ../Zend/zend_ini_scanner.c ../Zend/zend_language_scanner.c \../Zend/zend_ini_parser.h ../Zend/zend_language_parser.h \../Zend/zend_ini_parser.c ../Zend/zend_language_parser.c \Zend/touch configure-5.2-stamp[DONE] `configure' MAKE(1) target successfully executed for php-5.2.17

    Regarding the freetype.h header file

    Shell-Script
    1. root@xenial:/usr/local/src/imscp# find /usr/include -name freetype.h/usr/include/freetype2/freetype/freetype.h
    Shell-Script
    1. root@xenial:/usr/local/src/imscp# dpkg -S /usr/include/freetype2/freetype/freetype.hlibfreetype6-dev:amd64: /usr/include/freetype2/freetype/freetype.h

    My test environment


    Shell-Script
    1. root@xenial:/usr/local/src/imscp# lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 16.04.2 LTSRelease: 16.04Codename: xenial


    Shell-Script
    1. root@xenial:/usr/local/src/imscp# dpkg-architectureDEB_BUILD_ARCH=amd64DEB_BUILD_ARCH_BITS=64DEB_BUILD_ARCH_CPU=amd64DEB_BUILD_ARCH_ENDIAN=littleDEB_BUILD_ARCH_OS=linuxDEB_BUILD_GNU_CPU=x86_64DEB_BUILD_GNU_SYSTEM=linux-gnuDEB_BUILD_GNU_TYPE=x86_64-linux-gnuDEB_BUILD_MULTIARCH=x86_64-linux-gnuDEB_HOST_ARCH=amd64DEB_HOST_ARCH_BITS=64DEB_HOST_ARCH_CPU=amd64DEB_HOST_ARCH_ENDIAN=littleDEB_HOST_ARCH_OS=linuxDEB_HOST_GNU_CPU=x86_64DEB_HOST_GNU_SYSTEM=linux-gnuDEB_HOST_GNU_TYPE=x86_64-linux-gnuDEB_HOST_MULTIARCH=x86_64-linux-gnuDEB_TARGET_ARCH=amd64DEB_TARGET_ARCH_BITS=64DEB_TARGET_ARCH_CPU=amd64DEB_TARGET_ARCH_ENDIAN=littleDEB_TARGET_ARCH_OS=linuxDEB_TARGET_GNU_CPU=x86_64DEB_TARGET_GNU_SYSTEM=linux-gnuDEB_TARGET_GNU_TYPE=x86_64-linux-gnuDEB_TARGET_MULTIARCH=x86_64-linux-gnu


    Shell-Script
    1. root@xenial:/usr/local/src/imscp# dpkg --print-foreign-architectures
    2. i386

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