Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36221 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45888 invoked from network); 20 Mar 2008 13:43:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2008 13:43:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=gwynne@wanderingknights.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=gwynne@wanderingknights.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain wanderingknights.org from 208.97.132.5 cause and error) X-PHP-List-Original-Sender: gwynne@wanderingknights.org X-Host-Fingerprint: 208.97.132.5 mailbigip.dreamhost.com Linux 2.4/2.6 Received: from [208.97.132.5] ([208.97.132.5:58174] helo=postalmail-a6.g.dreamhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/7D-09437-3E962E74 for ; Thu, 20 Mar 2008 08:43:00 -0500 Received: from [192.168.2.192] (c-24-128-82-179.hsd1.ma.comcast.net [24.128.82.179]) by postalmail-a6.g.dreamhost.com (Postfix) with ESMTP id ADDF088E8C; Thu, 20 Mar 2008 06:42:55 -0700 (PDT) Cc: "PHP Developers Mailing List" Message-ID: <91E97F0C-8012-4E3F-B5ED-D24E4D5C2F52@wanderingknights.org> To: RQuadling@GoogleMail.com In-Reply-To: <10845a340803200328q666d8f72n3402789d90716fb1@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Thu, 20 Mar 2008 09:42:52 -0400 References: <10845a340803200328q666d8f72n3402789d90716fb1@mail.gmail.com> X-Mailer: Apple Mail (2.919.2) Subject: Re: [PHP-DEV] Could PHP be used to build PHP? From: gwynne@wanderingknights.org (Gwynne Raskind) I'd be in favor of this idea because it sounds cool, but it has some crippling drawbacks: - There isn't really a "homogenous" way to build PHP without OS- specific checks. There's just too much that even the most minimal build needs to know about its host system. - "configure.php" wouldn't be any easier to maintain than "configure.in". Reinventing the wheel is a truly massive undertaking when it comes to supporting the sheer number of operating system variations that autoconf and CMake have spent years working out. - There really isn't any advantage to it. By the time you've implemented even the most minimal bootstrap, you've already forced yourself to use something like autoconf or CMake anyway. Look at GCC's build system; it's a three-stage bootstrap with extensive error- checking and endless, endless configuration options. That's what we'd end up with, and it's just not worth it. -- Gwynne, Daughter of the Code "This whole world is an asylum for the incurable." On Mar 20, 2008, at 6:28 AM, Richard Quadling wrote: > With regard to the CMake SoC proposal ... > > I may be a little naive here but surely it would be better to use PHP > to build PHP? > > I know that outside of PHP, a LOT of tools which I have no knowledge > of (I'm a windows user. I use point and click interfaces to build apps > when I used Delphi - no need for command line, but it was present). > > I know that most *nix devs use cli to do the build. > > But, if the whole build process was PHP orientated, it would be a case > of keeping it in-house. No need to learn m4/cscript/etc. when we are > using PHP to build PHP. > > The problem with this (as I see it) is the first build on those > systems where a binary isn't available (look - I'm on windows. I > download and go). > > So, a PHP Bootstrap would seem like a sensible tool to have. > > Something would produce take a truly basic PHP interpreter. No > extensions (db, graphics, etc). As I see it it would need file I/O, > cli param handling. I think it would be nice to be able to get user > input via the console, so you could have something a little more > visual (not like the PEAR cli interface, but in that nature - > question/answer). Add in the ability to remember the last build > config, so no need to re-do all the q/a and off you go (ha ha. If only > it was that simple - but shouldn't it be?) > > Ok. I know I've missed loads of what the build process does. I suspect > that PHP code necessary to build PHP would be quite extensive and I > suspect the first argument against this is wheel re-invention. I would > counter that with this is re-invention, but refactoring. The > improvement comes from not relying on anything other than the local C > compiler and userland PHP knowledge. Even I could build PHP now > without understanding a ton of different tools. > > I'm no expert here. > > So I know this isn't a full proposal or anything, but of those that > know this better than I... > > 1 - Could this be done? > > 2 - Would it be worth it (100% standalone pre-compiler process with no > third party tools). > > 3 - Would you use it if it was available - would something like this > be too different to other build systems you use? > > > > Richard. > > > -- > ----- > Richard Quadling > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 > "Standing on the shoulders of some very clever giants!"