Required Make version

  105272
April 14, 2019 16:07 peterkokot@gmail.com (Peter Kokot)
Hello,

people familiar with the PHP *nix build system today can be probably
counted on the fingers of two hands, so I'm hoping to get some answer
also here.

Does anyone maybe still have any insights on which Make version does
PHP require or silently specify as a minimum? GNU make? POSIX make?
Maybe some GNU make minimum version? 3.81? etc...

Currently, there are two steps where different make can be used:

1.) ./buildconf
(here GNU make is required because of using the conditional macro
assignment operator ?= in build/build2.mk file)

2.) make step after ./configure
(here POSIX make can go through more or less ok).

This is seen, for example, on the Solaris systems where doing this:

    ./buildconf

causes:

    make: Fatal error in reader: build/build.mk, line 22: Badly formed
macro assignment

so, this needs to be done:

    MAKE=gmake ./buildconf

however, this works then ok:

    ./configure
    make

Is this confirmed and ok with everyone that GNU make is the minimum
required derivative for PHP to be used? Or should software such as PHP
be an example and use POSIX compatible make?

Reason for asking this: https://github.com/php/php-src/pull/4025 and
similar improvements...

Thank you.

-- 
Peter Kokot
  105292
April 16, 2019 15:39 bishop@php.net (Bishop Bettini)
On Sun, Apr 14, 2019 at 12:07 PM Peter Kokot <peterkokot@gmail.com> wrote:

> Hello, > > people familiar with the PHP *nix build system today can be probably > counted on the fingers of two hands, so I'm hoping to get some answer > also here. > > Does anyone maybe still have any insights on which Make version does > PHP require or silently specify as a minimum? GNU make? POSIX make? > Maybe some GNU make minimum version? 3.81? etc... > > Currently, there are two steps where different make can be used: > > 1.) ./buildconf > (here GNU make is required because of using the conditional macro > assignment operator ?= in build/build2.mk file) > > 2.) make step after ./configure > (here POSIX make can go through more or less ok). > > This is seen, for example, on the Solaris systems where doing this: > > ./buildconf > > causes: > > make: Fatal error in reader: build/build.mk, line 22: Badly formed > macro assignment > > so, this needs to be done: > > MAKE=gmake ./buildconf > > however, this works then ok: > > ./configure > make > > Is this confirmed and ok with everyone that GNU make is the minimum > required derivative for PHP to be used? Or should software such as PHP > be an example and use POSIX compatible make? > > Reason for asking this: https://github.com/php/php-src/pull/4025 and > similar improvements... >
Relying upon a single build feature set simplifies development, and GNU make is ubiquitous. I am in favor of standardizing on GNU make. The fact that few people know the autotools mechanism we're using, and that GNU make probably isn't the most performant build system for us [1], suggests an interesting project: integrating an alternative build systems. Like X.org attempted [2] with Meson [3]. It might not yield any fruit, but that'd validate the system we're using. bishop [1]: http://www.conifersystems.com/whitepapers/gnu-make/ [2]: https://www.phoronix.com/scan.php?page=news_item&px=Xorg-Server-Meson-Fitting [3]: https://mesonbuild.com/
  105293
April 16, 2019 15:46 levim@php.net (Levi Morrison)
If we change anything about our build system, I think it ought to be
switching to CMake instead. This supports multiple backends, including
generating project files for IDEs, and is designed to be portable,
instead of targeting only GNU systems. This means we can use a single
build system instead of one for Windows and one for everyone else. At
one point, there was a Google Summer of Code project that began this
work, but it never got merged and I couldn't find any discussion about
why.

I'd be happy to work help with the CMake port, as I know it a decent
bit, but I don't have enough time to champion the whole thing.

On Tue, Apr 16, 2019 at 9:40 AM Bishop Bettini <bishop@php.net> wrote:
> > On Sun, Apr 14, 2019 at 12:07 PM Peter Kokot <peterkokot@gmail.com> wrote: > > > Hello, > > > > people familiar with the PHP *nix build system today can be probably > > counted on the fingers of two hands, so I'm hoping to get some answer > > also here. > > > > Does anyone maybe still have any insights on which Make version does > > PHP require or silently specify as a minimum? GNU make? POSIX make? > > Maybe some GNU make minimum version? 3.81? etc... > > > > Currently, there are two steps where different make can be used: > > > > 1.) ./buildconf > > (here GNU make is required because of using the conditional macro > > assignment operator ?= in build/build2.mk file) > > > > 2.) make step after ./configure > > (here POSIX make can go through more or less ok). > > > > This is seen, for example, on the Solaris systems where doing this: > > > > ./buildconf > > > > causes: > > > > make: Fatal error in reader: build/build.mk, line 22: Badly formed > > macro assignment > > > > so, this needs to be done: > > > > MAKE=gmake ./buildconf > > > > however, this works then ok: > > > > ./configure > > make > > > > Is this confirmed and ok with everyone that GNU make is the minimum > > required derivative for PHP to be used? Or should software such as PHP > > be an example and use POSIX compatible make? > > > > Reason for asking this: https://github.com/php/php-src/pull/4025 and > > similar improvements... > > > > Relying upon a single build feature set simplifies development, and GNU > make is ubiquitous. I am in favor of standardizing on GNU make. > > The fact that few people know the autotools mechanism we're using, and that > GNU make probably isn't the most performant build system for us [1], > suggests an interesting project: integrating an alternative build systems. > Like X.org attempted [2] with Meson [3]. It might not yield any fruit, but > that'd validate the system we're using. > > bishop > > [1]: http://www.conifersystems.com/whitepapers/gnu-make/ > [2]: > https://www.phoronix.com/scan.php?page=news_item&px=Xorg-Server-Meson-Fitting > [3]: https://mesonbuild.com/
  105298
April 16, 2019 23:08 johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=)
On Di, 2019-04-16 at 09:46 -0600, Levi Morrison wrote:
>  > I'd be happy to work help with the CMake port, as I know it a decent > bit, but I don't have enough time to champion the whole thing. >
That has been done ages ago: http://svn.php.net/viewvc/php/cmake/ Back then it didn't have any uptake because it was uncommon and people don't like to change. (and maybe some technical reasons where some hidden sauce in PHP's build system allows some magic) A key factor for PHP's build system (imo) back the was that PHP's incremental build was *a lot* faster (typical development cycle: touch a single file and type "make") than CMake (while CMake+make is more correct since it also checks touched headers) nowadays we have SSDs, which makes this a bit less of an issue, and CMake supports ninja, which eventually might be faster. johannes
  105449
April 25, 2019 21:58 peterkokot@gmail.com (Peter Kokot)
Hello,

On Wed, 17 Apr 2019 at 01:08, Johannes Schlüter <johannes@schlueters.de> wrote:
> > On Di, 2019-04-16 at 09:46 -0600, Levi Morrison wrote: > > > > I'd be happy to work help with the CMake port, as I know it a decent > > bit, but I don't have enough time to champion the whole thing. > > > > That has been done ages ago: > http://svn.php.net/viewvc/php/cmake/ > > Back then it didn't have any uptake because it was uncommon and people > don't like to change. (and maybe some technical reasons where some > hidden sauce in PHP's build system allows some magic) > > A key factor for PHP's build system (imo) back the was that PHP's > incremental build was *a lot* faster (typical development cycle: touch > a single file and type "make") than CMake (while CMake+make is more > correct since it also checks touched headers) nowadays we have SSDs, > which makes this a bit less of an issue, and CMake supports ninja, > which eventually might be faster. > > johannes
Thanks everyone for their time to write answers here. Basically, the make supports more implementations besides only GNU. This has been resolved in a very simplistic way. About the CMake I'll check it out for sure more... The *nix build system has been now so much cleaned that adding CMake buildsystem beside the autotools and windows one could be done nicely I think. A bit more cleaning should be done of that implementation in the SVN example. Like adding less files in the project root directory and every single src folder out there, removing outdated things, adding new things and fine tunings etc... But yes, quite modern looking thing with at least active development behind compared to Autoconf stuff and non standard windows build system without much docs... Only concern here is PHP's openness to change and accept the change. I've noticed that so many things here can't be changed actually that it is becoming a deal breaker to fix things and mover this forward. To invest one's free time in improving something that in the end internals people will change according to what they think should be done here is a bit tricky and I'll leave it be for now. People who have made cmake implementation on the link above, probably realize and understand this more than we in this discussion. And besides, the cmake build system could even be done as a separate project out of php for starters if anyone might be interested in doing that. -- Peter Kokot