Page 1 of 1

Recompiling PHP that was installed from RPM package?

Posted: Mon Nov 02, 2009 11:24 pm
by Kreshna
I need to recompile an existing PHP installation, but the PHP was installed from RPM package.

Is it possible to recompile such RPM-installed PHP? And if that's the case, what things should I anticipate? What potential problems I'm going to face?

I'm quite familiar in compiling from scratch, but I have never re-compiled anything before. I'm also unfamiliar with RPM. Should I use the usual ./make and /make install command, or should I use RPM instead? Can RPM recompile things?

Re: Recompiling PHP that was installed from RPM package?

Posted: Thu Nov 05, 2009 6:45 pm
by Weirdan
There are two kinds of RPM packages - installable binary packages (.rpm) that do not contain the source code but only compiled binaries/libraries/etc and source rpm packages (.src.rpm) that are used to build binary packages. You need the latter to be able to recompile anything. Refer to this page for a little more in-depth introduction: http://www.rpm.org/max-rpm/s1-rpm-misce ... srpms.html

Re: Recompiling PHP that was installed from RPM package?

Posted: Thu Nov 12, 2009 9:46 pm
by Kreshna
Weirdan wrote:and source rpm packages (.src.rpm) that are used to build binary packages. You need the latter to be able to recompile anything. Refer to this page for a little more in-depth introduction: http://www.rpm.org/max-rpm/s1-rpm-misce ... srpms.html
Thanks, Weirdan. By the way, I skimmed through the pages, but there's still one thing I haven't found yet:

Does the existing PHP installation need to be installed from source RPM to be able to recompiled? What if the existing PHP was installed from compiled binary RPM? Can I just download the source RPM elsewhere (of the same version, of course), and then compile it over the existing PHP installation?