Bug#542906: current version of autoconf makes php5 FTBFS

2009-08-22 Thread Andreas Barth
Package: autoconf,php5
Severity: serious

Hi,

php5 started to FTBFS with the versions of autoconf in testing and
unstable. It builds correctly with the version of autoconf in stable.

Please see
https://buildd.debian.org/fetch.cgi?pkg=php5ver=5.2.10.dfsg.1-2%2Bb1arch=i386stamp=1250588329file=log
for the full buildlog.


As I don't know if this is improper usage on side of php, or if
autoconf broke expected functionality here, I'm reporting against both
packages.


Cheers,
Andi

- End forwarded message -



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Re: Bug#542906: current version of autoconf makes php5 FTBFS

2009-08-22 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 tags 542906 patch
Bug #542906 [autoconf,php5] current version of autoconf makes php5 FTBFS
Added tag(s) patch.
 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#542906: current version of autoconf makes php5 FTBFS

2009-08-22 Thread Russ Allbery
tags 542906 patch
thanks

Andreas Barth a...@not.so.argh.org writes:

 php5 started to FTBFS with the versions of autoconf in testing and
 unstable. It builds correctly with the version of autoconf in stable.

 Please see
 https://buildd.debian.org/fetch.cgi?pkg=php5ver=5.2.10.dfsg.1-2%2Bb1arch=i386stamp=1250588329file=log
 for the full buildlog.

 As I don't know if this is improper usage on side of php, or if autoconf
 broke expected functionality here, I'm reporting against both packages.

Definitely PHP's fault.  It's using divert in its Autoconf scripts and
clobbering all over the diversions used by Autoconf, resulting in a
configure script with huge hunks missing.  divert is a low-level M4
feature, and it's not safe (and has never really been safe) to play with
them behind Autoconf's back.

See the Autoconf manual:

|To make diversion management easier, M4sugar uses the concept of
| named diversions.  Rather than using diversion numbers directly, it is
| nicer to associate a name with each diversion; the diversion number
| associated with a particular diversion name is an implementation
| detail, so you should only use diversion names.

[...]

|For now, the named diversions of Autoconf and Autoheader, and the
| remaining diversions of Autotest, are not documented.  In other words,
| intentionally outputting text into an undocumented diversion is subject
| to breakage in a future release of Autoconf.

Furthermore, the diversions don't seem to be doing anything for PHP
anyway.  The following patch, which just comments out all the diversions
and moves an include below AC_INIT (this may not be needed, but it's good
form), seems to fix the problem.

--- php5-5.2.10.dfsg.1.orig/configure.in
+++ php5-5.2.10.dfsg.1/configure.in
@@ -1,7 +1,7 @@
 ## $Id: configure.in,v 1.579.2.52.2.139 2009/06/17 12:22:41 iliaa Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
-divert(1)
+dnl divert(1)
 
 dnl ## Diversion 1 is the autoconf + automake setup phase. We also
 dnl ## set the PHP version, deal with platform-specific compile
@@ -23,16 +23,16 @@
 dnl ## All of these are normally in the extension directories.
 dnl ## Diversion 5 is the last one.  Here we generate files and clean up.
 
-dnl include Zend specific macro definitions first
-dnl -
-sinclude(Zend/acinclude.m4)
-
 dnl Basic autoconf + automake initialization, generation of config.nice.
 dnl -
 
 AC_PREREQ(2.13)
 AC_INIT(README.CVS-RULES)
 
+dnl include Zend specific macro definitions first
+dnl -
+sinclude(Zend/acinclude.m4)
+
 PHP_CONFIG_NICE(config.nice)
 
 PHP_CANONICAL_HOST_TARGET
@@ -264,7 +264,7 @@
 
 sinclude(main/suhosin_patch.m4)
 
-divert(2)
+dnl divert(2)
 
 dnl ## Diversion 2 is where we set PHP-specific options and come up
 dnl ## with reasonable default values for them. We check for pthreads here
@@ -303,7 +303,7 @@
   PTHREADS_FLAGS
 fi
 
-divert(3)
+dnl divert(3)
 
 dnl ## In diversion 3 we check for compile-time options to the PHP
 dnl ## core and how to deal with different system dependencies.
@@ -662,7 +662,7 @@
   PHP_CRYPT_R_STYLE
 fi
 
-divert(4)
+dnl divert(4)
 
 dnl ## In diversion 4 we check user-configurable general settings.
 
@@ -903,7 +903,7 @@
   AC_MSG_RESULT([using system default])
 fi
 
-divert(5)
+dnl divert(5)
 
 dnl ## In diversion 5 we check which extensions should be compiled.
 dnl ## All of these are normally in the extension directories.
--- php5-5.2.10.dfsg.1.orig/ext/standard/config.m4
+++ php5-5.2.10.dfsg.1/ext/standard/config.m4
@@ -1,6 +1,6 @@
 dnl $Id: config.m4,v 1.80.2.3.2.3 2007/07/11 11:56:03 jani Exp $ -*- autoconf 
-*-
 
-divert(3)dnl
+dnl divert(3)dnl
 
 dnl
 dnl Check if flush should be called explicitly after buffered io
@@ -205,7 +205,7 @@
 AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice 
fpclass isinf isnan)
 AC_FUNC_FNMATCH
 
-divert(5)dnl
+dnl divert(5)dnl
 
 dnl
 dnl Check for regex library type
--- php5-5.2.10.dfsg.1.orig/scripts/phpize.m4
+++ php5-5.2.10.dfsg.1/scripts/phpize.m4
@@ -1,6 +1,6 @@
 dnl This file becomes configure.in for self-contained extensions.
 
-divert(1)
+dnl divert(1)
 
 AC_PREREQ(2.13)
 AC_INIT(config.m4)

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#542906: current version of autoconf makes php5 FTBFS

2009-08-22 Thread Raphael Geissert
forcemerge 542088 542906
thanks

Hi,

On Saturday 22 August 2009 14:55:27 Russ Allbery wrote:
 tags 542906 patch
 thanks

 Andreas Barth a...@not.so.argh.org writes:
  php5 started to FTBFS with the versions of autoconf in testing and
  unstable. It builds correctly with the version of autoconf in stable.
 
  Please see
  https://buildd.debian.org/fetch.cgi?pkg=php5ver=5.2.10.dfsg.1-2%2Bb1ar
 ch=i386stamp=1250588329file=log for the full buildlog.
 
  As I don't know if this is improper usage on side of php, or if autoconf
  broke expected functionality here, I'm reporting against both packages.


Thanks, I'm aware of that, I had already noticed it and it was later reported 
as #542088 (and I didn't consider using autoconf2.13 a fix so I didn't use 
it).


 Definitely PHP's fault.  It's using divert in its Autoconf scripts and
 clobbering all over the diversions used by Autoconf, resulting in a
 configure script with huge hunks missing.  divert is a low-level M4
 feature, and it's not safe (and has never really been safe) to play with
 them behind Autoconf's back.

 See the Autoconf manual:
[...]

 Furthermore, the diversions don't seem to be doing anything for PHP
 anyway.  The following patch, which just comments out all the diversions
 and moves an include below AC_INIT (this may not be needed, but it's good
 form), seems to fix the problem.

That was exactly what I was trying to find out. A proposed patch[1] was sent 
to the other report which changed the numbers used on the diversion macros.

[1]http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542088#18

After comparing the generated configure files the only differences I see are 
the order of some tests and some comments from m4sugar (when using the patch 
from [1]). So it does look like the diversion calls are useless.

Thanks both for your patches, I'll finish the upload I previously prepared.

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org