Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95578 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69722 invoked from network); 2 Sep 2016 15:28:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2016 15:28:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.171 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.213.171 mail-yb0-f171.google.com Received: from [209.85.213.171] ([209.85.213.171:36297] helo=mail-yb0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/AB-19490-5BA99C75 for ; Fri, 02 Sep 2016 11:28:55 -0400 Received: by mail-yb0-f171.google.com with SMTP id 125so40649584ybe.3 for ; Fri, 02 Sep 2016 08:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=v8k7SyGnE+w2q8QT/lAuIGMLpbcHP0/59Ghnx62SHvc=; b=0dxgn47K0gQeZCRDSLXpxyS4fTn5LEiUybdxS7T7TTM/nsFi9jUhu67SuUAhp21e72 rDC76BrgJhb7Hm+oxH0Ya5pGS30eIdWV9u2Ek+XQdGiDrYALZHUQnwywd/af16iT3BmT UFposEbyaEfEvFA2fITUuVMrkT3EhICFTK89J+mndlHZq6JBBNSWtp7YI1cY2Qww8agH tZ5BK84G2IlO3ag+zOvDxnJG4KvzsYAK6zqjLsLVLVygn11XMKUSKw5DfHdwwW1B/S4C LRIMnFJmai1Lf/HZlH+giSjHYQqulIwM97GD3GI8EPPHyQSKf6z6kZnBuDUaRdgldL0W jxoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=v8k7SyGnE+w2q8QT/lAuIGMLpbcHP0/59Ghnx62SHvc=; b=hitMjYKTzwB5sRBYkx0giHmv3Z8Y31ERgKXI3cLuoZewZL87/yrSPEvMaSiiJZwJwZ kbQt8KT1W98F3vYvqLe+wjH/MCTGweyh/ig9O0Cl4/jAZw0cn5+AzqpG/uaSXZghLsh+ M26mvynNEyXpaeT4Mdhkj34H9/riRjSnCnlcH88gnj9Zn199oSCy00xJdmOZGS1KX6Th 3DryS5h4B1G8ck2ZRkVaW5mPgL3Jr9Z6fwgc0JhZQbSGVU29z1JIhzlc9v5gB0nBVCTv dq79UiA8ICsKUb5vouvY4bupF7ALiyYEaNIjzG1Bwv2QJmINvdSLfRICf2DYVQnBgdY5 qvoQ== X-Gm-Message-State: AE9vXwO46qpplNZj4un0SU0A+9E0ZTbMry5D5KtPGpJt7kwREMrYUuE/90pDMN2LJFJmJ86SLC1Y2A2ldEahaA== X-Received: by 10.37.3.214 with SMTP id 205mr18064648ybd.46.1472830127680; Fri, 02 Sep 2016 08:28:47 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.13.193.66 with HTTP; Fri, 2 Sep 2016 08:28:47 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 Sep 2016 09:28:47 -0600 X-Google-Sender-Auth: o1zPyN2JEVaFui-3T0AmUjBv5RQ Message-ID: To: Jordan Gigov Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Non-conflicting PHP 5 and 7 builds From: levim@php.net (Levi Morrison) On Fri, Sep 2, 2016 at 6:28 AM, Jordan Gigov wrote: > Most developers who hope to move a site to PHP 7 will still have to > maintain PHP 5 sites for a long time, requiring the presence of both. > However, building either one, even with the `--program-suffix` > configuration option still overwrites some files, like phpize and all the > headers in ${prefix}/includes/. > > It took me a week to solve this problem for myself and everyone else in our > company, but I have proper working patches for it now. > They have not been submitted as pull requests yet, because I first want to > hear what you think of them. > > Here are the links: > > https://github.com/coladict/php-src/tree/php5-migration > https://github.com/coladict/php-src/tree/php7-migration > > These change the install destinations like so: > ${prefix}/bin/php => ${prefix}/bin/php[5 or 7] > ${prefix}/bin/phpize => ${prefix}/bin/php[5 or 7]ize > ${prefix}/bin/php-config => ${prefix}/bin/php[5 or 7]-config > ${prefix}/bin/php-cgi => ${prefix}/bin/php[5 or 7]-cgi > ${prefix}/bin/phpdbg => ${prefix}/bin/php[5 or 7]dbg > ${prefix}/bin/phar => ${prefix}/bin/phar[5 or 7] > ${prefix}/bin/phar.phar => ${prefix}/bin/phar[5 or 7].phar > > I have also added a "install-alternatives" make target that creates soft > links to the legacy locations. > In systems that have "update-alternatives" like Debian, Ubuntu or Fedora it > uses it to generate the links, otherwise it falls-back to "ln -s". > > In addition these both contain fixes for gd, gmp and ldap extensions that > fail to build under Ubuntu 16.04. > > Tested under Docker containers of ubuntu:xenial, fedora and dock0/arch > (Archlinux). > Additional configure options used when testing: > --with-pic --enable-cli --enable-phpdbg --disable-fpm --with-apxs2=no > --build=x86_64-linux-gnu --with-layout=GNU > > I don't know why automatic detection always yields x86_64-unknown-linux-gnu > for build under Ubuntu, but that's not particular to PHP. > > Shared extensions that are also built and loaded without error during the > testing: > mbstring gd mysqlnd mysqli pdo_mysql curl gettext pgsql pdo_pgsql xmlrpc bz2 > xsl enchant interbase pdo_firebird mcrypt pspell gmp ldap readline recode > tidy > > > Making separately building mysqlnd work as shared should really come with > it's own instructions. I had to use this complicated stuff > ./configure --build=x86_64-linux-gnu --with-pic --enable-mysqlnd \ > CFLAGS="-I/usr/include/openssl -I$(dirname $(dirname $(pwd))) > -DCOMPILE_DL_MYSQLND -DMYSQLND_SSL_SUPPORTED -DMYSQLND_COMPRESSION_WANTED > -DMYSQLND_COMPRESSION_ENABLED -DMYSQLND_HAVE_SSL" \ > PHP_OPENSSL="/usr/local /usr" --with-libdir=lib/x86_64-linux-gnu > > Under Fedora that libdir option changes to --with-libdir=lib64 The issue is that you are writing to the same prefix. Just write them to different prefixes and reference them separately. This is not a unique-to-php situation. At work we maintain many different simultaneous versions of Python, for example. With that said it looks like the program suffixes are broken. If --program-suffix=7 is set then I'd expect php7, phpize7 (or php7ize, don't really care), etc.