The attached patch allows PHP's build system to recognize FreeBSD's
"versioned" autoconf ports without the need for system-level symlinks
or similar aliasing. It uses 'shtool path' to (attempt to) locate the
appropriate autoconf / autoheader executable.
I noticed that Jani did a bit of work earlier this year directed at
simplifying the build system (such that it only uses our bundled
libtool, for example). Given that, I'm not sure if it is still
acceptable to use shtool to locate external executables, so I'm asking
for a patch review here before committing anything.
Thanks!
--
Jon Parise (jon of php.net) :: The PHP Project (http://www.php.net/)
The attached patch allows PHP's build system to recognize FreeBSD's
"versioned" autoconf ports without the need for system-level symlinks
or similar aliasing. It uses 'shtool path' to (attempt to) locate the
appropriate autoconf / autoheader executable.
I added such patch once but Sebastian got some problems with
it so it was reverted. And I don't want to add this patch
either unless there is very good reason to do so.
There are no known problems of running buildconf with
autoconf 2.13, so why shouldn't that be allowed?
(it's actually PREFERRED version :)
And finally: Common users should NEVER EVER run buildconf.
--Jani
5B
sniper@iki.fi / 2005-03-29 11:11:27 +0300:
The attached patch allows PHP's build system to recognize FreeBSD's
"versioned" autoconf ports without the need for system-level symlinks
or similar aliasing. It uses 'shtool path' to (attempt to) locate the
appropriate autoconf / autoheader executable.I added such patch once but Sebastian got some problems with it so it was reverted. And I don't want to add this patch either unless there is very good reason to do so.
It would be interesting to know what the problems were so that
they could be ironed out.
And finally: Common users should NEVER EVER run buildconf.
But why make hacking PHP harder?
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
sniper@iki.fi / 2005-03-29 11:11:27 +0300:
The attached patch allows PHP's build system to recognize FreeBSD's
"versioned" autoconf ports without the need for system-level symlinks
or similar aliasing. It uses 'shtool path' to (attempt to) locate the
appropriate autoconf / autoheader executable.I added such patch once but Sebastian got some problems with it so it was reverted. And I don't want to add this patch either unless there is very good reason to do so.
It would be interesting to know what the problems were so that
they could be ironed out.
He had the problems with gentoo and it's autoconf wrapper crap.
And finally: Common users should NEVER EVER run buildconf.
But why make hacking PHP harder?
And how is it hard atm to run './buildconf' ??
If you have autoconf (any version above 2.13 works) installed,
there are no problems.
--Jani
sniper@iki.fi / 2005-03-29 15:24:07 +0300:
sniper@iki.fi / 2005-03-29 11:11:27 +0300:
The attached patch allows PHP's build system to recognize FreeBSD's
"versioned" autoconf ports without the need for system-level symlinks
or similar aliasing. It uses 'shtool path' to (attempt to) locate the
appropriate autoconf / autoheader executable.I added such patch once but Sebastian got some problems with
it so it was reverted. And I don't want to add this patch
either unless there is very good reason to do so.It would be interesting to know what the problems were so that
they could be ironed out.He had the problems with gentoo and it's autoconf wrapper crap.
And finally: Common users should NEVER EVER run buildconf.
But why make hacking PHP harder?
And how is it hard atm to run './buildconf' ?? If you have autoconf (any version above 2.13 works) installed, there are no problems.
I have autoconf-2.13, 2.53, 2.59, automake-1.4.5, 1.5, 1.9.4,
libtool-1.3.5, 1.5.10. I have no executable named autoconf,
automake, or libtool, instead, there are autoconf213, autoconf253,
etc.
Without symlinking or installing the desired versions somewhere
and munging PATH, running ./buildconf is an uber-easy way to be
informed that I don't have the required tools.
Such schemes are quite common thanks to incompatibilities between
autotools versions, e. g. Subversion's buildconf equivalent accepts
the names from environment, mentioning IIRC Debian installing the
tools as e. g. autoconf-213.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
sniper@iki.fi / 2005-03-29 15:24:07 +0300:
sniper@iki.fi / 2005-03-29 11:11:27 +0300:
The attached patch allows PHP's build system to recognize FreeBSD's
"versioned" autoconf ports without the need for system-level symlinks
or similar aliasing. It uses 'shtool path' to (attempt to) locate the
appropriate autoconf / autoheader executable.I added such patch once but Sebastian got some problems with
it so it was reverted. And I don't want to add this patch
either unless there is very good reason to do so.It would be interesting to know what the problems were so that
they could be ironed out.He had the problems with gentoo and it's autoconf wrapper crap.
And finally: Common users should NEVER EVER run buildconf.
But why make hacking PHP harder?
And how is it hard atm to run './buildconf' ?? If you have autoconf (any version above 2.13 works) installed, there are no problems.
I have autoconf-2.13, 2.53, 2.59, automake-1.4.5, 1.5, 1.9.4,
libtool-1.3.5, 1.5.10. I have no executable named autoconf,
automake, or libtool, instead, there are autoconf213, autoconf253,
etc.
If there are no autoconf/autoheader executables, that's no way
any PHP problem.
Without symlinking or installing the desired versions somewhere
and munging PATH, running ./buildconf is an uber-easy way to be
informed that I don't have the required tools.
Life is hard sometimes.
Such schemes are quite common thanks to incompatibilities between
autotools versions, e. g. Subversion's buildconf equivalent accepts
the names from environment, mentioning IIRC Debian installing the
tools as e. g. autoconf-213.
If someone can provide a patch that works in every single OS
with any possible combination of autoconf* packages installed I'll
be happy to commit such patch. As long as nobody can provide such patch
and PROVE it won't break things for others -> no commit.
--Jani
The way some systems start to treat autoconf (installing
multiple versions in an absolutely braindamaged way) is not
something we should support.
I suggest whoever is bothered by FreeBSD doing stupid things
should go to the ports maintainer and complain to him.
- Sascha
sascha@schumann.cx / 2005-03-29 16:46:37 +0200:
The way some systems start to treat autoconf (installing multiple versions in an absolutely braindamaged way) is not something we should support. I suggest whoever is bothered by FreeBSD doing stupid things should go to the ports maintainer and complain to him.
What's so stupid about it? Can you suggest a way different
versions of autotools could coexist?
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
Yes, use different install prefixes.
/opt/autoconfX.XX
/opt/autoconfY.YY
And add the suitable prefix to your PATH.
But don't change the names of the utilities..
- Sascha
sascha@schumann.cx / 2005-03-29 16:46:37 +0200:
The way some systems start to treat autoconf (installing multiple versions in an absolutely braindamaged way) is not something we should support. I suggest whoever is bothered by FreeBSD doing stupid things should go to the ports maintainer and complain to him.
What's so stupid about it? Can you suggest a way different
versions of autotools could coexist?--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
Such schemes are quite common thanks to incompatibilities between
autotools versions, e. g. Subversion's buildconf equivalent accepts
the names from environment, mentioning IIRC Debian installing the
tools as e. g. autoconf-213.If someone can provide a patch that works in every single OS with any possible combination of autoconf* packages installed I'll be happy to commit such patch. As long as nobody can provide such patch and PROVE it won't break things for others -> no commit.
I've read the comments and generated a second patch. This one solves
my problem in a more acceptable way, by introducing two environmental
variables, PHP_AUTOCONF and PHP_AUTOHEADER, which default to 'autoconf'
and 'autoheader', respectively. The idea is borrowed from Subversion's
buildconf equivalent (which Roman mentions above).
I believe this is a workable, non-intrusive solution that should work
in all environments.
--
Jon Parise (jon of php.net) :: The PHP Project (http://www.php.net/)
Such schemes are quite common thanks to incompatibilities between
autotools versions, e. g. Subversion's buildconf equivalent accepts
the names from environment, mentioning IIRC Debian installing the
tools as e. g. autoconf-213.If someone can provide a patch that works in every single OS with any possible combination of autoconf* packages installed I'll be happy to commit such patch. As long as nobody can provide such patch and PROVE it won't break things for others -> no commit.
I've read the comments and generated a second patch. This one solves
my problem in a more acceptable way, by introducing two environmental
variables, PHP_AUTOCONF and PHP_AUTOHEADER, which default to 'autoconf'
and 'autoheader', respectively. The idea is borrowed from Subversion's
buildconf equivalent (which Roman mentions above).
Apologies if this got lost amongst the effort to prepare the recent
set of releases, but I'm curious whether or not people find my second
patch acceptable, based on the results of the prior discussion. If
not, I'll know to abandon the issue.
Thanks.
--
Jon Parise (jon of php.net) :: The PHP Project (http://www.php.net/)
The patch is fine by me. It's very good idea too since
it's not likely to break anyone's build whatever versions
they have installed. :)
Just commit. (or if you can't, I'll do it later today)
--Jani
Such schemes are quite common thanks to incompatibilities between
autotools versions, e. g. Subversion's buildconf equivalent accepts
the names from environment, mentioning IIRC Debian installing the
tools as e. g. autoconf-213.If someone can provide a patch that works in every single OS with any possible combination of autoconf* packages installed I'll be happy to commit such patch. As long as nobody can provide such patch and PROVE it won't break things for others -> no commit.
I've read the comments and generated a second patch. This one solves
my problem in a more acceptable way, by introducing two environmental
variables, PHP_AUTOCONF and PHP_AUTOHEADER, which default to 'autoconf'
and 'autoheader', respectively. The idea is borrowed from Subversion's
buildconf equivalent (which Roman mentions above).Apologies if this got lost amongst the effort to prepare the recent
set of releases, but I'm curious whether or not people find my second
patch acceptable, based on the results of the prior discussion. If
not, I'll know to abandon the issue.
Index: build/build2.mk
RCS file: /repository/php-src/build/build2.mk,v
retrieving revision 1.35
diff -u -r1.35 build2.mk
--- build/build2.mk 3 Feb 2005 17:42:42 -0000 1.35
+++ build/build2.mk 30 Mar 2005 03:36:08 -0000
@@ -32,6 +32,9 @@targets = $(TOUCH_FILES) configure $(config_h_in)
+PHP_AUTOCONF ?= 'autoconf'
+PHP_AUTOHEADER ?= 'autoheader'
I doubt that is portable make syntax.
joe
Index: build/build2.mk
RCS file: /repository/php-src/build/build2.mk,v
retrieving revision 1.35
diff -u -r1.35 build2.mk
--- build/build2.mk 3 Feb 2005 17:42:42 -0000 1.35
+++ build/build2.mk 30 Mar 2005 03:36:08 -0000
@@ -32,6 +32,9 @@targets = $(TOUCH_FILES) configure $(config_h_in)
+PHP_AUTOCONF ?= 'autoconf'
+PHP_AUTOHEADER ?= 'autoheader'
I doubt that is portable make syntax.
I only have experience with GNU make and BSD make, and it works under
both of those environments. Could you suggest a more portable syntax?
--
Jon Parise (jon of php.net) :: The PHP Project (http://www.php.net/)
Apologies if this got lost amongst the effort to prepare the recent
set of releases, but I'm curious whether or not people find my second
patch acceptable, based on the results of the prior discussion. If
not, I'll know to abandon the issue.
Here is a patch that we plan on using at work (Y!). This patch has two
key additions to Jon's patch. The first I think should be added to
Jon's patch so that shared extensions (phpize) build with his
environment variable change and the second is a change so we don't have
to set environment variables and it will pick up the right files. The
second change may or may not make it in, but I think the first one
should.
The first change is in scripts/phpize.in where it tests and set
PHP_AUTOCONF/PHP_AUTOHEADER variables, then uses them below. This
patch should be added without the:
- if ! which $PHP_AUTOCONF; then
-
PHP_AUTOCONF=`ls -1 /usr/local/bin/autoconf* | sort -r | head
-1`;
-
PHP_AUTOHEADER=`ls -1 /usr/local/bin/autoheader* | sort -r |
head -1`;
- fi
block in it (which would be part of the second change).
The second changes are the ones that do a which command to see if
PHP_AUTOCONF/PHP_AUTOHEADER is really valid and if not try to find the
valid one. I don't know how compatible this is across os's and is the
reason I can see it not making it (but it works for us). This package
also allows us to use any version of the ports/autoconf package without
having to set environment variable.
Let me know what you think.
Thanks,
Brian
Ok, lets try this:
http://www.brianfrance.com/patch.build
Brian
Apologies if this got lost amongst the effort to prepare the recent
set of releases, but I'm curious whether or not people find my second
patch acceptable, based on the results of the prior discussion. If
not, I'll know to abandon the issue.Here is a patch that we plan on using at work (Y!). This patch has two
key additions to Jon's patch. The first I think should be added to
Jon's patch so that shared extensions (phpize) build with his
environment variable change and the second is a change so we don't
have to set environment variables and it will pick up the right files.
The second change may or may not make it in, but I think the first
one should.The first change is in scripts/phpize.in where it tests and set
PHP_AUTOCONF/PHP_AUTOHEADER variables, then uses them below. This
patch should be added without the:
- if ! which $PHP_AUTOCONF; then
PHP_AUTOCONF=`ls -1 /usr/local/bin/autoconf* | sort -r | head
-1`;
PHP_AUTOHEADER=`ls -1 /usr/local/bin/autoheader* | sort -r |
head -1`;
- fi
block in it (which would be part of the second change).
The second changes are the ones that do a which command to see if
PHP_AUTOCONF/PHP_AUTOHEADER is really valid and if not try to find the
valid one. I don't know how compatible this is across os's and is the
reason I can see it not making it (but it works for us). This package
also allows us to use any version of the ports/autoconf package
without having to set environment variable.Let me know what you think.
Thanks,
Brian
I made some changes to phpize now. But not using your
patch since that would not have worked everywhere.
Searching for these tools is _still_ a big no no.
Just make sure they're in PATH.
--Jani
Ok, lets try this:
http://www.brianfrance.com/patch.build
Brian
Apologies if this got lost amongst the effort to prepare the recent
set of releases, but I'm curious whether or not people find my second
patch acceptable, based on the results of the prior discussion. If
not, I'll know to abandon the issue.Here is a patch that we plan on using at work (Y!). This patch has two key
additions to Jon's patch. The first I think should be added to Jon's patch
so that shared extensions (phpize) build with his environment variable
change and the second is a change so we don't have to set environment
variables and it will pick up the right files. The second change may or may
not make it in, but I think the first one should.The first change is in scripts/phpize.in where it tests and set
PHP_AUTOCONF/PHP_AUTOHEADER variables, then uses them below. This patch
should be added without the:
- if ! which $PHP_AUTOCONF; then
PHP_AUTOCONF=`ls -1 /usr/local/bin/autoconf* | sort -r | head -1`;
PHP_AUTOHEADER=`ls -1 /usr/local/bin/autoheader* | sort -r | head
-1`;
- fi
block in it (which would be part of the second change).
The second changes are the ones that do a which command to see if
PHP_AUTOCONF/PHP_AUTOHEADER is really valid and if not try to find the valid
one. I don't know how compatible this is across os's and is the reason I
can see it not making it (but it works for us). This package also allows us
to use any version of the ports/autoconf package without having to set
environment variable.Let me know what you think.
Thanks,
Brian
I made some changes to phpize now. But not using your patch since that would not have worked everywhere.
Cool, changes look good. What about getting Jon's original patch and
this change back ported?
Searching for these tools is _still_ a big no no. Just make sure they're in PATH.
I agree and why we keep our own list of internal patches. It is much
easier to maintain the search patch then handle the same email (can't
find autoconf) from a hundred or so of developers we support.
Brian
I made some changes to phpize now. But not using your patch since that would not have worked everywhere.
Cool, changes look good. What about getting Jon's original patch and this
change back ported?
Done.
--Jani
Looks like there might be some problems with your patch to phpize.in
for lines:
- if ! test -x "$php_shtool path $PHP_AUTOCONF"; then
and
- if ! test -x "$php_shtool path $PHP_AUTOHEADER"; then
shouldn't those double quotes be back-ticks?
Also echo and here documents are not working on my system (FreeBSD).
cat seems to work with here docs.
#> bash --version
GNU bash, version 2.05a.0(1)-release (i386-unknown-freebsd4.3)
Copyright 2001 Free Software Foundation, Inc.
Brian
I made some changes to phpize now. But not using your patch since that would not have worked everywhere.
Cool, changes look good. What about getting Jon's original patch and
this change back ported?Done. --Jani
Looks like there might be some problems with your patch to phpize.in for
lines:
- if ! test -x "$php_shtool path $PHP_AUTOCONF"; then
and
- if ! test -x "$php_shtool path $PHP_AUTOHEADER"; then
shouldn't those double quotes be back-ticks?
Actually both.. fixed now.
Also echo and here documents are not working on my system (FreeBSD). cat
seems to work with here docs.
Fixed that too. (all branches)
--Jani