From: jari dot aalto at poboxes dot com Operating system: Win32 - W2ksp4 PHP version: 4CVS-2004-04-19 (stable) PHP Bug Type: Compile Failure Bug description: [patch] ./buildconf doesn't work under Cygwin (Fixes #27140)
Description: ------------ cygwin included libtool in places which cannot be derived using the current logic used in ./buildconf scripts. Attached is a patch to make the ./buildconf succeed. - Added DEBUG to make probing errors easier. - Added tests for Cygwin. - @'s were removed from Makefile to see what's really going. Using @ make it hard to report good errors. I don't think they should be overly used as is the case in current PHP make files. Jari Actual result: -------------- cvs diff: warning: skipping invalid entry in password file at line 233 Index: buildcheck.sh =================================================================== RCS file: /repository/php-src/build/buildcheck.sh,v retrieving revision 1.21.2.6 diff -u -IId: -b -w -u -r1.21.2.6 buildcheck.sh --- buildcheck.sh 28 Sep 2003 13:37:59 -0000 1.21.2.6 +++ buildcheck.sh 19 Apr 2004 11:23:36 -0000 @@ -21,6 +21,10 @@ echo "buildconf: checking installation..." +if test "$DEBUG" ; then + set -x +fi + stamp=$1 # autoconf 2.13 or newer @@ -80,6 +84,11 @@ ltpath=`echo $libtoolize | sed -e 's#/[^/]*/[^/]*$##'` ltfile="$ltpath/share/aclocal/libtool.m4" + +if [ "$CYGWIN" ]; then + ltfile=/usr/autotool/stable/share/aclocal/libtool.m4 +fi + if test -r "$ltfile"; then : else cvs diff: warning: skipping invalid entry in password file at line 233 Index: buildconf =================================================================== RCS file: /repository/php-src/buildconf,v retrieving revision 1.57.4.2 diff -u -IId: -b -w -u -r1.57.4.2 buildconf --- buildconf 25 Jun 2003 13:00:46 -0000 1.57.4.2 +++ buildconf 19 Apr 2004 11:24:41 -0000 @@ -1,6 +1,10 @@ #!/bin/sh # $Id: buildconf,v 1.57.4.2 2003/06/25 13:00:46 sas Exp $ +if test "$DEBUG" ; then + set -x +fi + eval `grep '^EXTRA_VERSION=' configure.in` case "$EXTRA_VERSION" in *-dev) @@ -62,3 +66,8 @@ rm -f generated_lists ${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR\ " + +if test "$DEBUG"; then + # Show how make was called to pinpoint problems + ${MAKE:-make} -n -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$\ ZENDDIR" +fi Index: build2.mk =================================================================== RCS file: /repository/php-src/build/build2.mk,v retrieving revision 1.27.4.1 diff -u -IId: -b -w -u -r1.27.4.1 build2.mk --- build2.mk 27 Jun 2003 00:19:26 -0000 1.27.4.1 +++ build2.mk 19 Apr 2004 11:25:42 -0000 @@ -46,19 +46,25 @@ # correctly otherwise (timestamps are not updated) @echo rebuilding $@ @rm -f $@ - @autoheader 2>&1 | $(SUPPRESS_WARNINGS) + autoheader 2>&1 | $(SUPPRESS_WARNINGS) $(TOUCH_FILES): touch $(TOUCH_FILES) aclocal.m4: configure.in acinclude.m4 - @echo rebuilding $@ - @libtoolize=`./build/shtool path glibtoolize libtoolize`; \ + echo rebuilding $@ + libtoolize=`./build/shtool path glibtoolize libtoolize`; \ $$libtoolize --copy --automake; \ ltpath=`dirname $$libtoolize`; \ - ltfile=`cd $$ltpath/../share/aclocal; pwd`/libtool.m4; \ + if [ "$(CYGWIN)" ]; then \ + cdpath=/usr/share; \ + else \ + cdpath=`cd $$ltpath/../share/aclocal; pwd`; \ + fi; \ + ltfile=$$cdpath/libtool.m4; \ + echo $$cdpath; \ cat acinclude.m4 $$ltfile > $@ configure: aclocal.m4 configure.in $(config_m4_files) @echo rebuilding $@ - @autoconf 2>&1 | $(SUPPRESS_WARNINGS) + autoconf 2>&1 | $(SUPPRESS_WARNINGS) -- Edit bug report at http://bugs.php.net/?id=28056&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28056&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28056&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28056&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28056&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28056&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28056&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28056&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28056&r=support Expected behavior: http://bugs.php.net/fix.php?id=28056&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28056&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28056&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28056&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28056&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28056&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28056&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28056&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28056&r=float