PHP Source files

Rick Stevens rstevens at vitalstream.com
Wed Nov 17 17:31:16 UTC 2004


Roger Harrell wrote:
> Argghh.
> Ok, so I got the rpm build and development packages installed (answered 
> my last question). Now when I do a rpmbuild for the php package I get a 
> gargantuan list of dependancies.
>         bzip2-devel is needed by php-4.2.2-17.2
>         curl-devel >= 7.9 is needed by php-4.2.2-17.2
>         db4-devel is needed by php-4.2.2-17.2
>         expat-devel is needed by php-4.2.2-17.2
>         freetype-devel is needed by php-4.2.2-17.2
>         gd-devel >= 1.8.4 is needed by php-4.2.2-17.2
>         gdbm-devel is needed by php-4.2.2-17.2
>         gmp-devel is needed by php-4.2.2-17.2
>         pspell-devel is needed by php-4.2.2-17.2
>         httpd-devel >= 2.0.40-6 is needed by php-4.2.2-17.2
>         libjpeg-devel is needed by php-4.2.2-17.2
>         libpng-devel is needed by php-4.2.2-17.2
>         pam-devel is needed by php-4.2.2-17.2
>         libstdc++-devel is needed by php-4.2.2-17.2
>         libxml2-devel is needed by php-4.2.2-17.2
>         ncurses-devel is needed by php-4.2.2-17.2
>         openssl-devel is needed by php-4.2.2-17.2
>         krb5-devel is needed by php-4.2.2-17.2
>         imap-devel is needed by php-4.2.2-17.2
>         cyrus-sasl-devel is needed by php-4.2.2-17.2
>         openldap-devel is needed by php-4.2.2-17.2
>         mysql-devel is needed by php-4.2.2-17.2
>         postgresql-devel is needed by php-4.2.2-17.2
>         unixODBC-devel is needed by php-4.2.2-17.2
>         net-snmp-devel is needed by php-4.2.2-17.2
> 
> I was directed to get the .src.rpm. Install that, then change the .spec 
> file to configure PHP and build an rpm using that spec file, then 
> install the rpm. Ok, that would be fine, except for the dependancies 
> above. The .src.rpm comes with php-4.2.2.tar.gz. Isn't this the install 
> source with the RH patches and such? Can I not unpack that and install 
> normally, or will it cause problems since I installed PHP 4.2.2 with the 
> RPM initially?

The primary problem you have is that the PHP development RPM contains
virtually all of the things PHP can do (essentially, the "./configure"
part of the build has everything turned on), hence the need for all of
the "-devel" RPMs.

The "-devel" RPMs generally contain the headers and some libraries that
third-party software need to be able to build.  You can reduce your
needs by modifying the spec file so that the stuff you don't need isn't
part of the "./configure" portion of the rpmbuild.  For example, if
you're not going to use LDAP, make sure the spec file doesn't have
"--enable-ldap" specified for the configure step.  Of course, this makes
your PHP build less than fully capable, but that's a call you have to
make.  The other option you have is to fetch the various PHP-related
RPMs and install them.

I'm not clear as to why you're doing a source install unless you need to
tweak PHP in some manner.  For most folk, the normal binary RPMs are
adequate.  Red Hat/Fedora/whoever are kind enough to build binary RPMs
containing various various capabilities of PHP in bite-sized chunks so
you don't have to install the whole lot.  The same is true of the Perl
RPMs and several others.

As for me, I build PHP from php.net's source tarball myself, and only
enable the stuff I need.  RPMs are usually a version or three behind the
source tarball from the vendors and I generally prefer the "latest and
greatest".  Since I manually control the "./configure" bit, I can build
only what I need (similar to editing the configure portion of the spec
file).  I'm fairly experienced about building stuff and can thrash my
way through the builds.  A lot of people aren't, can't or are afraid to
try, and pre-built RPMs are the way to go for them.  That's why they
were created in the first place.

What's cool about open source?  Lots of choices.
What's painful open source?  Lots of choices!

;-)
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-   Never test for an error condition you don't know how to handle.  -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list