[php-maint] Bug#612743: Bug#612743: php5: PHP is compiled with LFS support, but this can not be detected by extensions
ondrej at debian.org
Thu Feb 10 12:17:56 UTC 2011
forcemerge 402181 612743
there is no guarantee at all to keep same ABI between different
distributions. That doesn't only apply to LFS, but also to different
shared libraries used, etc.
The only safe way is to compile the extension using the development
files provided by the distribution.
Also the /usr/bin/php5-config script on Debian has an option --phpapi
which prints the version. Also you can provide .deb packages with
correct dependencies. It's just not reasonable to expect that
non-static binary will work across different systems.
On Thu, Feb 10, 2011 at 12:29, Derick Rethans <debian at derickrethans.nl> wrote:
> Package: php5
> Severity: normal
> Tags: lfs
> I'm the author of several PHP extensions, and a user asked me to compile a
> binary for him.
> I've compiled the extension using a stock PHP install, and noticed that
> though the extension loaded fine on Debian and Ubuntu, it did not actually
> work. The exact same source code compiled on the Debian and Ubuntu systems
> worked fine.
> I've tracked this down to issues with reading files through PHP's
> streams layer. What I strongly suspect here is that Debian's LFS patch changes
> the size of the php_stream structure in a subtle way. However, from a compiled
> binary I have no way of detecting whether the LFS patch was actually applied.
> This makes it close to impossible to reject my extension from being loaded
> and/or tell them to use a LFS-compiled version that I obviously can also
> If you, as Debian PHP Maintainer, find it necessary to break PHP's default
> ABI/API compatibility; could you at least reflect this in the API number so
> that your pre-compiled PHP refuses to load an extension compiled with the
> standard/a different ABI? You already add +lfs to the extension dir's default,
> so it should be easy enough. For example, something like:
> --- Zend/zend_build.h.orig 2011-02-10 11:26:12.000000000 +0000
> +++ Zend/zend_build.h 2011-02-10 11:27:03.000000000 +0000
> @@ -41,6 +41,10 @@
> /* for private applications */
> +#if _FILE_OFFSET_BITS = 64
> +#define ZEND_BUILD_EXTRA ",LFS"
> #define ZEND_BUILD_EXTRA
> -- System Information:
> Debian Release: squeeze/sid
> APT prefers maverick-updates
> APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 'maverick')
> Architecture: i386 (i686)
> Kernel: Linux 2.6.35-25-virtual (SMP w/1 CPU core)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> pkg-php-maint mailing list
> pkg-php-maint at lists.alioth.debian.org
Ondřej Surý <ondrej at sury.org>
More information about the pkg-php-maint