This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Pre-ITP: apache/mod_php


Reini Urban wrote:

> no, this was my own custom php4 build and if I remember correctly on
> suse also. on windows (MSVC) for sure.
> just /usr/local/lib/libphp4.so of course.
> we'd need our intermediate /usr/lib/libphp4.dll.a and .la also.

If suse somehow performed magic with their build patches then we should
look at what they've done, but I would be very surprised.  Native win32
builds are done completely differently with Visual Studio project files
so I wouldn't even bother mentioning them in the same sentence, they are
basically a whole other world.

> but you are right: my latest php builds on unix also give me just static
> cli and cgi's (7.5 MB stripped)

Debian's stripped binaries are only 2.7MB as I mentioned, and Debian
supports just about every extension under the sun.  That's just all the
more reason to build as many of the extensions shared as possible.

> having the static cgi and cli exe is also ok, if you don't mind the huge
> redundant size for all.

Not talking about building static.  The binary still links to the shared
system libs for all the things for which there exist system libs.  The
only thing that's duplicated between CLI and DSO are the PHP extensions
that you don't build shared.  

> # ldd /usr/local/bin/php
>          libcrypt.so.1 => /lib/libcrypt.so.1 (0x4001b000)
>          libexpat.so.0 => /usr/local/lib/libexpat.so.0 (0x40048000)
>          libmm.so.13 => /usr/local/lib/libmm.so.13 (0x4006c000)
>          libpq.so.3 => /usr/local/pgsql/lib/libpq.so.3 (0x40071000)
>          libmhash.so.2 => /usr/lib/libmhash.so.2 (0x40139000)
>          libmcrypt.so.4 => /usr/local/lib/libmcrypt.so.4 (0x4015c000)
>          libdl.so.2 => /lib/libdl.so.2 (0x40163000)
>          libltdl.so.3 => /usr/lib/libltdl.so.3 (0x40167000)
>          libpng.so.2 => /usr/lib/libpng.so.2 (0x4016e000)
>          libz.so.1 => /lib/libz.so.1 (0x401a0000)
>          libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x401af000)
>          libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so
> (0x401ce000)
>          libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40278000)
>          libresolv.so.2 => /lib/libresolv.so.2 (0x4027f000)
>          libm.so.6 => /lib/libm.so.6 (0x40292000)
>          libnsl.so.1 => /lib/libnsl.so.1 (0x402b4000)
>          libcurl.so.3 => /usr/local/lib/libcurl.so.3 (0x402ca000)
>          libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x403a7000)
>          libpthread.so.0 => /lib/libpthread.so.0 (0x404b5000)
>          libc.so.6 => /lib/libc.so.6 (0x404cb000)
>          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

That's quite a mouthful.  Here is Debian's:

$ ldd /usr/bin/php4 
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4001f000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4004c000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x40061000)
        libpcre.so.3 => /usr/lib/libpcre.so.3 (0x40081000)
        libdb-4.2.so => /usr/lib/libdb-4.2.so (0x40092000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x40168000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40178000)
        libssl.so.0.9.7 => /usr/lib/i586/libssl.so.0.9.7 (0x40189000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x401b6000)
        libm.so.6 => /lib/libm.so.6 (0x401c8000)
        libdl.so.2 => /lib/libdl.so.2 (0x401eb000)
        libc.so.6 => /lib/libc.so.6 (0x401ee000)
        libcrypto.so.0.9.7 => /usr/lib/i586/libcrypto.so.0.9.7
(0x40321000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Everything else is shared - there are a ton of php4-foo packages.

> for apache2 and lighttpd we must make our own php libs then, with the
> same configure quirks. that's what I wanted to avoid with the general
> cygphp4.dll

It would be nice, I agree.  But it would take some serious hacking to
the buildscripts.  And as I said the more I get to know them the less I
want to.  :-)

> aha, but the extensions must be somewhere. they are opened via dlopen.
> So I miss the "recommends: extensions"

Yes, there are many extensions - but these are not listed as
"recommended", they're just other packages.

> ok. as long as it works and noone is worried about the size.
> you are the maintainer.

It's not that bad - cygphp4.dll is 1.3M stripped, and that's with the
"kitchen sink" config.  Linking to external mysqlclient and pcre and/or
getting the remaining bundled libs shared would shrink that further. 
There's another 1.2M of loadable extensions but those should be shared
between the CLI / DSO versions.

> thanks.
> you might consider this patch also. it fixes the dba quirks with
> berkeley. (move LIBS after conftest.c)

Thanks.  Still trying to work out all the minor details so I don't have
any packages yet, but they're coming along.

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]