libxml bundling

php.internals

Edin Kadribasic

23 years ago
Sterling, You have just added 3.5 MB of source into the PHP code tree despite your assurances that libxml was only "slightly" bigger than expat which takes up "only" 432 KB. This is IMHO completely unnecessary as libxml comes preinstalled as a shared library on most modern Unix systems and because it adds bloat to PHP distribution. In my opinion this bloat should be removed. Edin

Sascha Schumann

23 years ago
> In my opinion this bloat should be removed.
Seconded. - Sascha

Derick Rethans

23 years ago
On Wed, 7 May 2003, Sascha Schumann wrote:
> > In my opinion this bloat should be removed. > > Seconded.
Thirded Derick
-- "my other box is your windows PC" ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------

James Cox

23 years ago
> You have just added 3.5 MB of source into the PHP code tree despite your > assurances that libxml was only "slightly" bigger than expat which takes > up "only" 432 KB. > > This is IMHO completely unnecessary as libxml comes preinstalled as a > shared library on most modern Unix systems and because it adds bloat to > PHP distribution. > > In my opinion this bloat should be removed.
No kidding. Sterling, what is wrong with linking to libxml that's more than likely going to be present, or if it's not found simply downloading and compiling libxml from a designated site? -- james

Jani Taskinen

23 years ago
On Wed, 7 May 2003, Edin Kadribasic wrote:
>Sterling, > >You have just added 3.5 MB of source into the PHP code tree despite your >assurances that libxml was only "slightly" bigger than expat which takes >up "only" 432 KB. > >This is IMHO completely unnecessary as libxml comes preinstalled as a >shared library on most modern Unix systems and because it adds bloat to >PHP distribution. > >In my opinion this bloat should be removed.
Me three. --Jani

Dan Kalowsky

23 years ago
Consider this a me fourthed message. This still is one of my biggest developer annoyances... bundling of extra software. On Wed, 7 May 2003, Edin Kadribasic wrote:
> Sterling, > > You have just added 3.5 MB of source into the PHP code tree despite your > assurances that libxml was only "slightly" bigger than expat which takes > up "only" 432 KB. > > This is IMHO completely unnecessary as libxml comes preinstalled as a > shared library on most modern Unix systems and because it adds bloat to > PHP distribution. > > In my opinion this bloat should be removed. > > Edin > > > >
>---------------------------------------------------------------<
Dan Kalowsky "I'll walk a thousand miles just http://www.deadmime.org/~dank to slip this skin." dank-nom@aps-deadmime.org - "Streets of Philadelphia", kalowsky@php.net Bruce Springsteen

Ed

23 years ago
Dear folks, Forgive me for barging in, but I'm using a snippet of code that might be of interest. It is a "test and set" function to be used for locking resources across threads. I was looking at the TSRM implementation (including the Mutexes) and it did do quite what i needed -- things are not atomic. So here are a couple of primitives in VC++ (Windows) and gcc (Linux) for the i386 platform. The Linux piece was "stolen" from /usr/include/asm/bitops.h -- originally written by Linus Torvalds. I "ported" it to VC++. With these 2 inline primitives people developing extensions should be able to implement thread shared resources with safety -- provided one does not make mistakes ;-) They seem to work -- no guarantees though :-) There is an example of usage below, but one can come up a number of variations for the "wrappers" based on the "inlines". Thanks for the great tool! All the best, Ed Hoo ed000001@hotmail.com *** MY_FILE.H *** /* ------------------------------------------------------- *\ * Primitives for a simple mutex implementation * ------------------------------------------------------- */ #define ADDR (*(volatile long *) addr) #ifdef WIN32 static __forceinline int test_and_set(int nr, volatile void *addr) { __asm { mov eax, nr mov ebx, addr lock bts [ebx], eax sbb eax, eax } /* Return with result in EAX */ } static __forceinline int test_and_clear(int nr, volatile void *addr) { __asm { mov eax, nr mov ebx, addr lock btr [ebx], eax sbb eax, eax } /* Return with result in EAX */ } #else static __inline__ int test_and_set(int nr, volatile void *addr) { int oldbit; __asm__ __volatile__( "lock ; " "btsl %2,%1\n\tsbbl %0,%0" :"=r" (oldbit),"=m" (ADDR) :"Ir" (nr) : "memory"); return oldbit; } static __inline__ int test_and_clear(int nr, volatile void *addr) { int oldbit; __asm__ __volatile__( "lock ; " "btrl %2,%1\n\tsbbl %0,%0" :"=r" (oldbit),"=m" (ADDR) :"Ir" (nr) : "memory"); return oldbit; } #endif *** MY_FILE.C *** /* ------------------------------------------------------- *\ * mutex_lock(int resource_id) * * Waits until resource is avaliable, locks it and then returns * ------------------------------------------------------- */ void mutex_lock(int n_resource_id) { if ( n_resource_id < 0 || n_resource_id > 31 ) return; while ( test_and_set(n_resource_id, &ng_mutex) ) Sleep(1); } /* ------------------------------------------------------- *\ * mutex_unlock(int resource_id) * * Unlocks a resource, we assumed it's been called by the resource "locker" * ------------------------------------------------------- */ void mutex_unlock(int n_resource_id) { if ( n_resource_id < 0 || n_resource_id > 31 ) return; test_and_clear(n_resource_id, &ng_mutex); } /* ------------------------------------------------------- *\ * Mutexes -- up to 32 "mutexes" in ng_mutex [0..31] * ------------------------------------------------------- */ static unsigned int ng_mutex = 0; #define MUTEX_FIELD_HASH 0 /* ------------------------------------------------------- *\ * Variables needing thread safety * ------------------------------------------------------- */ static t_field_hash* pg_field_hash = NULL; static int pg_field_hash_references = 0; /* ------------------------------------------------------- *\ * PHP_MINIT_FUNCTION * ------------------------------------------------------- */ PHP_MINIT_FUNCTION(dvdaf) { mutex_lock(MUTEX_FIELD_HASH); { if ( ! pg_field_hash ) { pg_field_hash = malloc(gp_field_count * sizeof(t_field_hash)); pg_field_hash_references = 1; // calculate hash } else { pg_field_hash_references++; } } mutex_unlock(MUTEX_FIELD_HASH); return SUCCESS; } /* ------------------------------------------------------- *\ * PHP_MSHUTDOWN_FUNCTION * ------------------------------------------------------- */ PHP_MSHUTDOWN_FUNCTION(dvdaf) { mutex_lock(MUTEX_FIELD_HASH); { if ( --pg_field_hash_references <= 0 ) { free(pg_field_hash); pg_field_hash = NULL; pg_field_hash_references = 0; } } mutex_unlock(MUTEX_FIELD_HASH); return SUCCESS; }

Moriyoshi Koizumi

23 years ago
Dan Kalowsky <dank@deadmime.org> wrote:
> Consider this a me fourthed message. > > This still is one of my biggest developer annoyances... bundling of extra > software.
Then how about getting rid of expat and libxml altogether from the php5 branch? bunding a modified version of libgd makes sense to me though. Moriyoshi

Zeev Suraski

23 years ago
At 01:17 07/05/2003, Edin Kadribasic wrote:
>Sterling, > >You have just added 3.5 MB of source into the PHP code tree despite your >assurances that libxml was only "slightly" bigger than expat which takes >up "only" 432 KB. > >This is IMHO completely unnecessary as libxml comes preinstalled as a >shared library on most modern Unix systems and because it adds bloat to >PHP distribution.
Our target audience is not just modern Unix systems. And with all due respect to modern Unix systems, the versioning hell they're going to is pretty similar to the way Windows looked like circa 1992, which means that if we're relying on existing libraries, we're begging for trouble. I see the seconding and thirding and fourthing of this message, but I still fail to understand why people consider the nuance of increasing the package size, something that's completely insignificant for almost all of our users, as a too high a price for keeping PHP on top of the recent technologies. Good XML handling is as basic as good forms handling in this day and age. Zeev

Per Lundberg

23 years ago
On Thu, 2003-05-08 at 10:34, Zeev Suraski wrote:
> I see the seconding and thirding and fourthing of this message, but I still > fail to understand why people consider the nuance of increasing the package > size, something that's completely insignificant for almost all of our > users, as a too high a price for keeping PHP on top of the recent > technologies. Good XML handling is as basic as good forms handling in this > day and age.
+1 Bandwidth is really cheap these days, as well as hard drives. Who cares about a couple of megs extra? :-)
-- Best regards, Per Lundberg / Capio ApS Phone: +46-18-4186040 Fax: +46-18-4186049 Web: http://www.nobolt.com

Sascha Schumann

23 years ago
On Thu, 8 May 2003, Per Lundberg wrote:
> On Thu, 2003-05-08 at 10:34, Zeev Suraski wrote: > > I see the seconding and thirding and fourthing of this message, but I still > > fail to understand why people consider the nuance of increasing the package > > size, something that's completely insignificant for almost all of our > > users, as a too high a price for keeping PHP on top of the recent > > technologies. Good XML handling is as basic as good forms handling in this > > day and age. > > +1 > > Bandwidth is really cheap these days, as well as hard drives. Who cares > about a couple of megs extra? :-)
It's not all about storage; it is about maintability. libxml2 is released so frequently that it makes no sense to bundle it. Furthermore, libxml2 is basically installed on every system released in the last 1-2 years which renders the bundled lib redundant. That is different to expat which has never achieved the libxml2 market penetration level. - Sascha

Per Lundberg

23 years ago
On Thu, 2003-05-08 at 13:27, Sascha Schumann wrote:
> It's not all about storage; it is about maintability. > libxml2 is released so frequently that it makes no sense to > bundle it.
When talking about 3rd party software, it is not neccessary to always have the latest version; it is much more important to have a version that is stable.
> Furthermore, libxml2 is basically installed on every system > released in the last 1-2 years which renders the > bundled lib redundant.
Read Zeev's email. PHP is not only for Unix/Linux systems. I know that libxml2 is very popular (especially because it is the GNOME XML library) but it is not at all as widespread as BSD sockets (for example).
-- Best regards, Per Lundberg / Capio ApS Phone: +46-18-4186040 Fax: +46-18-4186049 Web: http://www.nobolt.com

Sascha Schumann

23 years ago
> Read Zeev's email. PHP is not only for Unix/Linux systems. I know that > libxml2 is very popular (especially because it is the GNOME XML library) > but it is not at all as widespread as BSD sockets (for example).
On non-Unix systems, you usually deploy binary installations, so bundling is a non-issue there. - Sascha

Edin Kadribasic

23 years ago
On Thu, 8 May 2003, Per Lundberg wrote:
> Read Zeev's email. PHP is not only for Unix/Linux systems. I know that > libxml2 is very popular (especially because it is the GNOME XML library) > but it is not at all as widespread as BSD sockets (for example).
The only non-unix system we support is Windows. And there we already bundle libxml2 binary. Right now it is statically compiled into domxml extension but I'm going to de-couple them and bundle libxml.dll separately as new extesnsions start to use it. Edin

Adam Dickmeiss

23 years ago
On Thu, May 08, 2003 at 05:22:03PM +0200, Per Lundberg wrote:
> On Thu, 2003-05-08 at 13:27, Sascha Schumann wrote: > > It's not all about storage; it is about maintability. > > libxml2 is released so frequently that it makes no sense to > > bundle it. > > When talking about 3rd party software, it is not neccessary to always > have the latest version; it is much more important to have a version > that is stable. > > > Furthermore, libxml2 is basically installed on every system > > released in the last 1-2 years which renders the > > bundled lib redundant. > > Read Zeev's email. PHP is not only for Unix/Linux systems. I know that > libxml2 is very popular (especially because it is the GNOME XML library) > but it is not at all as widespread as BSD sockets (for example).
I would like to to know what "systems" we're talking about here. Can you mention a known widespread system that doesn't have libxml2 (I'm sure you can). Do you know of maintainers on those systems that are unable to compile libxml2? (I assume they _are_ able to configure PHP). Don't get me wrong here. I Like libxml2 and it's great if PHP mandates it. I use libxml2 in YAZ. Maybe _that's_ why the whole idea of bundling is so weird for me. It will mean I don't _know_ what libxml2 YAZ is using. -- Adam
> -- > Best regards, > > Per Lundberg / Capio ApS > Phone: +46-18-4186040 > Fax: +46-18-4186049 > Web: http://www.nobolt.com
-- Adam Dickmeiss mailto:adam@indexdata.dk http://www.indexdata.dk Index Data T: +45 33410100 Mob.: 212 212 66

Zeev Suraski

23 years ago
At 18:28 08/05/2003, Sascha Schumann wrote:
> > Read Zeev's email. PHP is not only for Unix/Linux systems. I know that > > libxml2 is very popular (especially because it is the GNOME XML library) > > but it is not at all as widespread as BSD sockets (for example). > > On non-Unix systems, you usually deploy binary installations, > so bundling is a non-issue there.
Just out of curiosity, is libxml present on Solaris? AIX? Tru64? Or do we only count Linux and FreeBSD? Zeev

Sascha Schumann

23 years ago
On Thu, 8 May 2003, Zeev Suraski wrote:
> At 18:28 08/05/2003, Sascha Schumann wrote: > > > Read Zeev's email. PHP is not only for Unix/Linux systems. I know that > > > libxml2 is very popular (especially because it is the GNOME XML library) > > > but it is not at all as widespread as BSD sockets (for example). > > > > On non-Unix systems, you usually deploy binary installations, > > so bundling is a non-issue there. > > Just out of curiosity, is libxml present on Solaris? AIX? Tru64? Or do > we only count Linux and FreeBSD?
Solaris 9 ships with it. Even though "tar xfz" does not work, they have libxml2 installed in their base disto. - Sascha

Zeev Suraski

23 years ago
At 14:27 08/05/2003, Sascha Schumann wrote:
>On Thu, 8 May 2003, Per Lundberg wrote: > > > On Thu, 2003-05-08 at 10:34, Zeev Suraski wrote: > > > I see the seconding and thirding and fourthing of this message, but I > still > > > fail to understand why people consider the nuance of increasing the > package > > > size, something that's completely insignificant for almost all of our > > > users, as a too high a price for keeping PHP on top of the recent > > > technologies. Good XML handling is as basic as good forms handling > in this > > > day and age. > > > > +1 > > > > Bandwidth is really cheap these days, as well as hard drives. Who cares > > about a couple of megs extra? :-) > > It's not all about storage; it is about maintability. > libxml2 is released so frequently that it makes no sense to > bundle it. Furthermore, libxml2 is basically installed on > every system released in the last 1-2 years which renders the > bundled lib redundant.
I think there are two separate issues then: 1. Do we want to bundle libxml. My take on this is that yes, we do - we cannot rely on the target platform to contain such an essential component. It's even more important when we see so many different versions - we'll be doing our users quite a service when we put a version that's known work well with the current version of PHP, and demonstrate the same behavior, bugs, etc. 2. Do we want to put libxml into our source tree. My take on this is that no, we don't - we should bundle libxml at the packaging stage. For developers, it would slightly complicate the initial build process (you'd have to fetch the currently-blessed libxml and put it in the right place), but that shouldn't affect our decision. Zeev

Moriyoshi Koizumi

23 years ago
Zeev Suraski <zeev@zend.com> wrote:
> At 14:27 08/05/2003, Sascha Schumann wrote: > >On Thu, 8 May 2003, Per Lundberg wrote: > > > > > On Thu, 2003-05-08 at 10:34, Zeev Suraski wrote: > > > > I see the seconding and thirding and fourthing of this message, but I > > still > > > > fail to understand why people consider the nuance of increasing the > > package > > > > size, something that's completely insignificant for almost all of our > > > > users, as a too high a price for keeping PHP on top of the recent > > > > technologies. Good XML handling is as basic as good forms handling > > in this > > > > day and age. > > > > > > +1 > > > > > > Bandwidth is really cheap these days, as well as hard drives. Who cares > > > about a couple of megs extra? :-) > > > > It's not all about storage; it is about maintability. > > libxml2 is released so frequently that it makes no sense to > > bundle it. Furthermore, libxml2 is basically installed on > > every system released in the last 1-2 years which renders the > > bundled lib redundant. > > I think there are two separate issues then: > > 1. Do we want to bundle libxml. My take on this is that yes, we do - we > cannot rely on the target platform to contain such an essential > component. It's even more important when we see so many different versions > - we'll be doing our users quite a service when we put a version that's > known work well with the current version of PHP, and demonstrate the same > behavior, bugs, etc.
I have been wondering what determines how essential a component is for PHP, or for its users. Are you talking about the market's expectation out there? For example, while there are actually certain user base where people ask PHP for more i18n'ed features, it was decided that mbstring should not be on board because of the assumed less demand. In this point, I don't want to take on whatsoever could be called a principle on which we make such decision, since it's totally unfair. Hmm, you might want to say this isn't the deal in this issue... Furthermore, from a QA's point of view, how well does it actually help us assure the same behaviour anywhere, whilst there are lots of uncertainties such as compiler's version? If it's really our job, is it more kind of us to distribute pre-compiled binary packages for any platforms instead of bundling those required libraries? As of the current libxml implementation, it's not completely reentrant AFAIK and it will definitely need much harder work to fulfill the compatilibity and stability. IMO if we really prefer to employ it in ext/xml, we'll have to throw away several amount of BC at a certain point. (domxml extension is another issue... I think that's already stable now.) Moriyoshi

Sascha Schumann

23 years ago
> is, IMHO, the wrong way to think about it. Requiring the sysadmin to read > docs, bump into configure errors, install/configure additional libraries, > does not fall in the category of being helpful or easy.
Right, it falls into his job description. I don't think sysadmins would like it, if you would make their jobs obselete.
> The obvious question that comes to mind is "where do we draw the > line?" IMHO, XML is such a basic requirement that this particular case is > a no brainer.
Right, that's why already bundle expat: You don't need any external libraries to handle XML.
> libraries, and it should stay that way, but built-in XML support should be > one of them.
Fully agreed. - Sascha

Zeev Suraski

23 years ago
At 18:16 08/05/2003, Sascha Schumann wrote:
> > is, IMHO, the wrong way to think about it. Requiring the sysadmin to read > > docs, bump into configure errors, install/configure additional libraries, > > does not fall in the category of being helpful or easy. > > Right, it falls into his job description. I don't think > sysadmins would like it, if you would make their jobs > obselete.
Bundling libxml would make sysadmin's jobs obsolete? If that was such a huge idea, Sterling and I would have kept it to ourselves and become millionaires :) With that rationale, why not throw in additional quirks and problems into the PHP setup, so that they have more work to do? Building plain vanilla PHP should be trivial, requiring as little of the abovementioned sysadmin tasks as possible.
> > The obvious question that comes to mind is "where do we draw the > > line?" IMHO, XML is such a basic requirement that this particular case is > > a no brainer. > > Right, that's why already bundle expat: You don't need any > external libraries to handle XML.
The working assumption for this entire discussion is that expat is insufficient for this day and age, and should be replaced with libxml. Zeev

Adam Dickmeiss

23 years ago
On Thu, May 08, 2003 at 11:34:15AM +0300, Zeev Suraski wrote:
> At 01:17 07/05/2003, Edin Kadribasic wrote: > >Sterling, > > > >You have just added 3.5 MB of source into the PHP code tree despite your > >assurances that libxml was only "slightly" bigger than expat which takes > >up "only" 432 KB. > > > >This is IMHO completely unnecessary as libxml comes preinstalled as a > >shared library on most modern Unix systems and because it adds bloat to > >PHP distribution. > > Our target audience is not just modern Unix systems. And with all due > respect to modern Unix systems, the versioning hell they're going to is > pretty similar to the way Windows looked like circa 1992, which means that > if we're relying on existing libraries, we're begging for trouble. > I see the seconding and thirding and fourthing of this message, but I still > fail to understand why people consider the nuance of increasing the package > size, something that's completely insignificant for almost all of our > users, as a too high a price for keeping PHP on top of the recent > technologies. Good XML handling is as basic as good forms handling in this > day and age.
I don't worry about the bundling size, really. What I worry about is having multiple versions of a library on a system. For example, I once got VERY confused because I had a PHP module as well as another Apache module using the "same" library, which wasnt't the same. One of them was using a shared library; one was statically linked.. The system would call "randomly" depening on the order in which Apache forked and used one of the two modules. Very confusing. Very wrong. There is a run time penaly of having two relatively big SO's too. libxml/libxml2 is a fairly big one. Would PHP maintainers, then update their CVS once in a while to reflect the newest updaes? Seems like the wrong thing to me. And wrong on Windows too.. We too ship YAZ as both windows and Unix and is now using libxml2. I would never bundle the source with that. However, what we do bundle is the libxml dll (and iconv) on Windows. Bundling _may_ be good for binary dists. Not for source unless the circumstances are very special (licensing, etc.). libxml has a licence that works with PHP and it's so widely available. The next step is that people will bundle GNU libc. -- Adam
> Zeev > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php
-- Adam Dickmeiss mailto:adam@indexdata.dk http://www.indexdata.dk Index Data T: +45 33410100 Mob.: 212 212 66

Moriyoshi Koizumi

23 years ago
Adam Dickmeiss <adam@indexdata.dk> wrote: <snip>
> dll (and iconv) on Windows. Bundling _may_ be good for binary dists. > Not for source unless the circumstances are very special (licensing, etc.). > libxml has a licence that works with PHP and it's so widely available. > The next step is that people will bundle GNU libc.
Cool. Bundling glibc is such a damn good idea :p Then we'll have to bundle bsd iconv() or another equivalent too, before bundling gcc and binutils. Moriyoshi

George Schlossnagle

23 years ago
On Thursday, May 8, 2003, at 04:34 AM, Zeev Suraski wrote:
> At 01:17 07/05/2003, Edin Kadribasic wrote: >> Sterling, >> >> You have just added 3.5 MB of source into the PHP code tree despite >> your >> assurances that libxml was only "slightly" bigger than expat which >> takes >> up "only" 432 KB. >> >> This is IMHO completely unnecessary as libxml comes preinstalled as a >> shared library on most modern Unix systems and because it adds bloat >> to >> PHP distribution. > > Our target audience is not just modern Unix systems. And with all due > respect to modern Unix systems, the versioning hell they're going to > is pretty similar to the way Windows looked like circa 1992, which > means that if we're relying on existing libraries, we're begging for > trouble. > I see the seconding and thirding and fourthing of this message, but I > still fail to understand why people consider the nuance of increasing > the package size, something that's completely insignificant for almost > all of our users, as a too high a price for keeping PHP on top of the > recent technologies. Good XML handling is as basic as good forms > handling in this day and age.
I agree with Zeev on this. While bundling lack aesthetic appeal (to me), I think it is the only way to address possibly rapidly changing libxml changes, as well as providing support for systems which do not have libxml installed already. George

Dan Kalowsky

23 years ago
On Thursday, May 8, 2003, at 08:02 AM, George Schlossnagle wrote:
> I agree with Zeev on this. While bundling lack aesthetic appeal (to > me), I think it is the only way to address possibly rapidly changing > libxml changes, as well as providing support for systems which do not > have libxml installed already.
Isn't this the point of having your configure script, to ensure that a supported version of an external library is in existence? I don't buy the argument for supporting systems without a needed external library installed. There is plenty of documentation provided already on how to configure your PHP build, and more importantly a configure script to stop someone who hasn't read it from continuing. Is it really the job of PHP to play sysadmin for unix install ABC? Please note though that while being against bundling, this does not mean I am against the idea of fully supporting libxml.
>---------------------------------------------------------------<
Dan Kalowsky "I got my mojo working, but it http://www.deadmime.org/~dank just ain't working on you" dank-nom@aps-deadmime.org - "Mojo", kalowsky@php.net Muddy Waters

George Schlossnagle

23 years ago
On Thursday, May 8, 2003, at 09:50 AM, Dan Kalowsky wrote:
> On Thursday, May 8, 2003, at 08:02 AM, George Schlossnagle wrote: > >> I agree with Zeev on this. While bundling lack aesthetic appeal (to >> me), I think it is the only way to address possibly rapidly changing >> libxml changes, as well as providing support for systems which do not >> have libxml installed already. > > Isn't this the point of having your configure script, to ensure that a > supported version of an external library is in existence?
That is an option as well: simply not building without libxml. To me it seems like the major goal here is to have robust xml support in the default build. I guess that leaves open: a) bundling b) requiring as a dependency I guess I feel good about both of those. I think that letting the default build build without a version of libxml (or libfoo, or whatever is decided upon) defeats the goal of having robust xml support on all builds.

Jani Taskinen

23 years ago
On Fri, 9 May 2003, George Schlossnagle wrote:
>That is an option as well: simply not building without libxml. >To me it seems like the major goal here is to have robust xml support >in the default build. I guess that leaves open: > >a) bundling
I'd go with the "bundle-everything" option then. :)
>b) requiring as a dependency
Sterling already agreed to not bundling any xml libraries and to just start requiring libxml..and forget expat since it's not the way to get robust XML support for PHP. (read: we'll drop expat support altoghether) --Jani

Zeev Suraski

23 years ago
At 16:50 08/05/2003, Dan Kalowsky wrote:
>On Thursday, May 8, 2003, at 08:02 AM, George Schlossnagle wrote: > >>I agree with Zeev on this. While bundling lack aesthetic appeal (to me), >>I think it is the only way to address possibly rapidly changing libxml >>changes, as well as providing support for systems which do not have >>libxml installed already. > >Isn't this the point of having your configure script, to ensure that a >supported version of an external library is in existence? > >I don't buy the argument for supporting systems without a needed external >library installed. There is plenty of documentation provided already on >how to configure your PHP build, and more importantly a configure script >to stop someone who hasn't read it from continuing. >Is it really the job of PHP to play sysadmin for unix install ABC?
It's our job to make the installation of PHP as easy and not-time-consuming as it could possibly be. The whole "whose responsibility is this" approach is, IMHO, the wrong way to think about it. Requiring the sysadmin to read docs, bump into configure errors, install/configure additional libraries, does not fall in the category of being helpful or easy. Bundling it, does. PHP is not out there to win computer science awards of excellence, it's there to work and solve problems. The obvious question that comes to mind is "where do we draw the line?" IMHO, XML is such a basic requirement that this particular case is a no brainer. I would be pretty aggressive when it comes to allowing additional bundles - it's no coincidence that we're bundling very few libraries, and it should stay that way, but built-in XML support should be one of them.
>Please note though that while being against bundling, this does not mean I >am against the idea of fully supporting libxml.
I was taking that for granted :) Zeev

Adam Dickmeiss

23 years ago
On Thu, May 08, 2003 at 05:29:29PM +0300, Zeev Suraski wrote:
> At 16:50 08/05/2003, Dan Kalowsky wrote: > >On Thursday, May 8, 2003, at 08:02 AM, George Schlossnagle wrote: > > > >>I agree with Zeev on this. While bundling lack aesthetic appeal (to me), > >>I think it is the only way to address possibly rapidly changing libxml > >>changes, as well as providing support for systems which do not have > >>libxml installed already. > > > >Isn't this the point of having your configure script, to ensure that a > >supported version of an external library is in existence? > > > >I don't buy the argument for supporting systems without a needed external > >library installed. There is plenty of documentation provided already on > >how to configure your PHP build, and more importantly a configure script > >to stop someone who hasn't read it from continuing. > >Is it really the job of PHP to play sysadmin for unix install ABC? > > It's our job to make the installation of PHP as easy and not-time-consuming > as it could possibly be. The whole "whose responsibility is this" approach > is, IMHO, the wrong way to think about it. Requiring the sysadmin to read > docs, bump into configure errors, install/configure additional libraries, > does not fall in the category of being helpful or easy. Bundling it, > does. PHP is not out there to win computer science awards of excellence, > it's there to work and solve problems.
Sounds good. But you don't make it easier for them by bundling something they already have..
> The obvious question that comes to mind is "where do we draw the > line?" IMHO, XML is such a basic requirement that this particular case is > a no brainer. I would be pretty aggressive when it comes to allowing > additional bundles - it's no coincidence that we're bundling very few > libraries, and it should stay that way, but built-in XML support should be > one of them.
XML is such a basic requirement that it is available everywhere these days. libxml is used by the gnome people (a lot). Do they bundle libxml2 with that. No. Of course not. libxml2 is a supported - moving target. But it's not moving in a bad way. libxml2 maintainers have a stable API, IMHO. The updates are: bug fixes _and_ enhancements which does not break compatibility. We don't make people a favor by shipping an always out-of-date libxml(2). Note that for Windows, etc. I'm not against bundling a binary with it. Those having unixes out there that does Not have libxml, they know how to compile it. Those that cannot compile PHP on Windows and link with the proper libxml2 should not even try to compile PHP (not qualified to do so). They better get the Windows binary which of course includes libxml2 and all other DLL's needed. -- Adam
> >Please note though that while being against bundling, this does not mean I > >am against the idea of fully supporting libxml. > > I was taking that for granted :) > > Zeev > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php
-- Adam Dickmeiss mailto:adam@indexdata.dk http://www.indexdata.dk Index Data T: +45 33410100 Mob.: 212 212 66

Ilia A.

23 years ago
I do not believe we should bundle libxml with PHP for a number of reasons. First of all libxml2 is a frequently updated package, much more so then PHP, so in most cases it can go through 4-5 bug fixing revisions prior to a single PHP release and sometimes more (if 4.3.0 release cycle is to be considered). This means that the user who is using the bundled library will not have the benefit of the fixes implemented by libxml developers until the next PHP release, which could be months off. It would also mean someone would have the unwelcome task of syncronizing bundled libxml with latest stable libxml every month and sometimes more often then that. As common and as useful libxml is, most php applications do not need. Compiling it by default makes a whole lot more impact on the PHP memory usage in web enviroment. However, if I force it to use my native libxml2 the difference is quite the opposite and I in fact gain from using an external library rather then bundled expat. libxml is also a very common library, nearly all OSS distributions already come with a libxml2/libxslt installed and are usually rather promt about offering new rpms, debs, etc... This means that installing the library if you do not have it already, would be of very little effort to even a novice admin. For Win32 users we distribute pre-built packages, so in that case we could/should bundle compiled libxml. Ilia

Adam Dickmeiss

23 years ago
On Thu, May 08, 2003 at 05:29:29PM +0300, Zeev Suraski wrote:
> At 16:50 08/05/2003, Dan Kalowsky wrote: > >On Thursday, May 8, 2003, at 08:02 AM, George Schlossnagle wrote: > > > >>I agree with Zeev on this. While bundling lack aesthetic appeal (to me), > >>I think it is the only way to address possibly rapidly changing libxml > >>changes, as well as providing support for systems which do not have > >>libxml installed already. > > > >Isn't this the point of having your configure script, to ensure that a > >supported version of an external library is in existence? > > > >I don't buy the argument for supporting systems without a needed external > >library installed. There is plenty of documentation provided already on > >how to configure your PHP build, and more importantly a configure script > >to stop someone who hasn't read it from continuing. > >Is it really the job of PHP to play sysadmin for unix install ABC? > > It's our job to make the installation of PHP as easy and not-time-consuming > as it could possibly be. The whole "whose responsibility is this" approach > is, IMHO, the wrong way to think about it. Requiring the sysadmin to read > docs, bump into configure errors, install/configure additional libraries, > does not fall in the category of being helpful or easy. Bundling it, > does. PHP is not out there to win computer science awards of excellence, > it's there to work and solve problems.
I would like to know what it is with this software bundling that is so helpful. I see 4 groups of PHP users (not to mention end users). 1. Those that get PHP binaries from PHP.net, such as the Win32 stuff. 2. Those that get PHP via 3rd party distributions, such as RedHat, etc. 3. Those that compile PHP by hand, but do not develop the software. 4. Those that develop PHP. I'm in all 4 groups depending on the role. Group 1&2 is not affected. Group 3/4 may _have_ do this extra work, before compiling PHP. get libxml2 ./configure make make install Is that so difficult? IMHO, compiling libxml2 is much easier than compiling PHP itself, due to fewer configure options.. So if you can compile PHP you surely can compile libxml2 .. I've only _had_ to compile libxml2 on some old Solaris box the last year or so (all other systems had a package). So that was the only time I had to do it. Not a big deal at all. The real drawback is that with bundling you may very well have multiple libxml2's running inside apache or other web server. YAZ is an example of such a component. Whether YAZ calls the bundled libxml2 or the shared object is difficult to tell. It is asking for trouble. And there will be other components in the future using libxml2 too. PHP people might say now, that we jsut add a PHP configure option to use the bundled of the already installed libxml2... But that's just extra unnecessary complexity , right? We want configure && make on PHP to be determinstic and simple.. -- Adam
> The obvious question that comes to mind is "where do we draw the > line?" IMHO, XML is such a basic requirement that this particular case is > a no brainer. I would be pretty aggressive when it comes to allowing > additional bundles - it's no coincidence that we're bundling very few > libraries, and it should stay that way, but built-in XML support should be > one of them. > > >Please note though that while being against bundling, this does not mean I > >am against the idea of fully supporting libxml. > > I was taking that for granted :) > > Zeev > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php
-- Adam Dickmeiss mailto:adam@indexdata.dk http://www.indexdata.dk Index Data T: +45 33410100 Mob.: 212 212 66

Dan Kalowsky

23 years ago
On Thu, 8 May 2003, Zeev Suraski wrote:
> It's our job to make the installation of PHP as easy and not-time-consuming > as it could possibly be. The whole "whose responsibility is this" approach > is, IMHO, the wrong way to think about it. Requiring the sysadmin to read > docs, bump into configure errors, install/configure additional libraries, > does not fall in the category of being helpful or easy. Bundling it, > does. PHP is not out there to win computer science awards of excellence, > it's there to work and solve problems.
I have to disagree with this. It is not the job of the software (PHP) to make itself easier to install. We're not an installation system, we are a web development language. Thought this is really just another form of the "whose responsible" discussion. The end result of bundling is now PHP will become responsible for keeping upto date snapshots of libxml. If a really scary bug is found in the library, it now becomes PHP's job to ensure that all new downloads use it. Is it really our job to ensure system security? Or are we mearly trying to provide an interface to an established set of functionality found on the system?
> The obvious question that comes to mind is "where do we draw the > line?" IMHO, XML is such a basic requirement that this particular case is > a no brainer. I would be pretty aggressive when it comes to allowing > additional bundles - it's no coincidence that we're bundling very few > libraries, and it should stay that way, but built-in XML support should be > one of them.
I'd be one to argue that no external dependencies should be bundled. But I have been one for a minimalist release for a long time :)
>---------------------------------------------------------------<
Dan Kalowsky "I'll walk a thousand miles just http://www.deadmime.org/~dank to slip this skin." dank-nom@aps-deadmime.org - "Streets of Philadelphia", kalowsky@php.net Bruce Springsteen

Andrei Zmievski

23 years ago
On Thu, 08 May 2003, Dan Kalowsky wrote:
> I have to disagree with this. It is not the job of the software (PHP) to > make itself easier to install. We're not an installation system, we are a > web development language. Thought this is really just another form of the > "whose responsible" discussion. The end result of bundling is now PHP will > become responsible for keeping upto date snapshots of libxml. If a really > scary bug is found in the library, it now becomes PHP's job to ensure that > all new downloads use it. Is it really our job to ensure system security? > Or are we mearly trying to provide an interface to an established set of > functionality found on the system?
Couldn't agree more. -Andrei http://www.gravitonic.com/ "Perl - the only language that looks the same before and after RSA encryption." -Keith Bostic

Zeev Suraski

23 years ago
At 00:08 09/05/2003, Andrei Zmievski wrote:
>On Thu, 08 May 2003, Dan Kalowsky wrote: > > I have to disagree with this. It is not the job of the software (PHP) to > > make itself easier to install. We're not an installation system, we are a > > web development language. Thought this is really just another form of the > > "whose responsible" discussion. The end result of bundling is now PHP > will > > become responsible for keeping upto date snapshots of libxml. If a really > > scary bug is found in the library, it now becomes PHP's job to ensure that > > all new downloads use it. Is it really our job to ensure system security? > > Or are we mearly trying to provide an interface to an established set of > > functionality found on the system? > >Couldn't agree more.
Couldn't agree less. Zeev

Rasmus Lerdorf

23 years ago
On Thu, 8 May 2003, Dan Kalowsky wrote:
> I'd be one to argue that no external dependencies should be bundled. But > I have been one for a minimalist release for a long time :)
Who does this help? If we didn't bundle any of the regex libraries, for example, then you couldn't really rely on regular expression support in PHP just like people today don't rely on something like imap support and end up implementing imap functions directly in PHP. Would you really want to see someone write a regex library directly in PHP space? That would be completely insane. We absolutely have to identify key technologies that have to be in every PHP install to give everyone a base set of features they can code against. And these key technologies have to work exactly the same on every system. Having said that, I agree that I don't really like seeing a 3.2M beast of a library directly in our CVS tree. We should be able to come up with a mechanism for our key libraries so that it is easy to update and test them and easy to pull them into a build when it comes time to roll a release. -Rasmus

Christian Stocker

23 years ago
Hi My 2 cents on the whole story: libxml2 is a very stable library with almost no API changes (actually Daniel Veillard is very against changing API) and very often releases with feature enhancements, bug fixes and speed improvements. The stable API really does help. We can keep the needed version of libxml2 quite low, except if we introduce newly integrated features (Which will happen with the new domxml extension..). Therefore we don't rely much on a special libxml2 version, just newer than the minimal requierement and that's no problem for configure to check (and I really don't know of any showstopper bugs of libxml2 since I started with domxml) In my opinion, putting libxml2 into CVS was a very bad idea (maintenance et al.), but I see some reasons for bundling it. So why not just add it to the .tgz files during a release or even after buidling the snaps. Snaps-unstable would take the latest (or almost latest) libxml2 stuff, snaps-stable and RC releases use a "freezed"-version. CVS Users should anyway know what they're doing. And whoever wants the latest libxml2 library already installed on his system, should still be able to use that. chregu

Anil Madhavapeddy

23 years ago
On Thu, May 08, 2003 at 05:29:29PM +0300, Zeev Suraski wrote:
> > It's our job to make the installation of PHP as easy and not-time-consuming > as it could possibly be. The whole "whose responsibility is this" approach > is, IMHO, the wrong way to think about it. Requiring the sysadmin to read > docs, bump into configure errors, install/configure additional libraries, > does not fall in the category of being helpful or easy. Bundling it, > does. PHP is not out there to win computer science awards of excellence, > it's there to work and solve problems.
A lot of this pain is mitigated by modern packaging systems; arguably its their job to make this process easier, and PHP shouldn't try to second-guess it but make its configuration process as flexible as possible to fit into rpm/ports/deb/openpkg/whatever. On OpenBSD anyway, the relevant dependencies get pulled in by the packages on a per-module basis automatically. Anil