Jump to content

Recommended Posts

I've been building PHP for years, and although I've always been able to get it running under a variety of OS's and enviroments, it always is painful to initially configure it.  This is not a problem with PHP per se, but rather, with the gnu configure script and the way PHP uses it. I'd like to describe my issue in case any of you have already solved it and can suggest a course of action.

 

Modern Linux systems have package managers such as YUM, APT, and others. These do a good job of keeping the various libraries and header files in sync, but they never seem to give me a PHP version that I can use. There always is at least one missing feature or library.  Therefore, I always end up building my own version of PHP from the source code.

 

In doing so, I start out with the gnu configure script, and my normal procedure goes like this:

 

1. run ./configure [OPTIONS]

 

2. it runs several minutes and then fails due to a missing dependency

 

3. install the dependency (usually some sort of *-dev package)

 

4. go back to step 1

 

If I'm installing PHP on a fresh system for the first time, I often have to repeat this sequence a dozen or more times until all the dependencies are satisfied and the configure program finally completes.

 

So this brings up my question: do any of you know of a way to run configure so that it doesn't terminate after the first unmet dependency, but rather, so it goes to the end of its tests and then tells me all of the dependencies that were unfulfilled?  If I could run configure in this way, I could then go to my package manager and install all of the appropriate *-dev packages in one swell foop, thereby cutting 2 or more hours off of the time necessary to get PHP built on my system.

 

Thanks in advance for any tips or pointers you can give me concerning this issue.

 

 

 

After a freash install i would do this

sudo dpkg --configure -a
sudo apt-get clean all
sudo apt-get update

 

maybe even

sudo apt-get upgrade

 

however.. if your using packages that are not include in the normal install why not get all of them then before you install ?

 

as a side note this is the wrong section

These do a good job of keeping the various libraries and header files in sync, but they never seem to give me a PHP version that I can use. There always is at least one missing feature or library.

 

You will find most distros build php in such a modular way that you can simply install static shared libraries of any required extensions through there package management system.

OOPS ... I wanted this to go into the "PHP Help" section.  How can I move this thread?

 

Actually, on Debian-based systems I do exactly what you have suggested. But there are still a bunch of *-dev packages that don't get installed.  And in any case, sometimes I am on Fedora or Centos systems and use YUM, and sometimes I am on Gentoo or even MacOSX systems.

 

I'm just wondering if there's a way to run configure in the way I suggested. I'm now guessing that the answer is "no" ...

 

 

You will find most distros build php in such a modular way that you can simply install static shared libraries of any required extensions through there package management system.

Yes, I know that. But I sometimes hit cases where there isn't already an up-to-date extension for something that I want or need. There are also other version-related issues.  For one example out of many, I just recently came across some software that requires PHP 5.2.3 or later, and I need to install this in a debian environment. However, the latest version of PHP that debian supports is 5.2.0, even in its "unstable" repository.

 

I install PHP on a myriad of different systems and configurations, and this kind of thing comes up sometimes, and when it does, I always end up having to go back to building from source. This is what prompted my question here about gnu configure.

 

OOPS ... I wanted this to go into the "PHP Help" section.  How can I move this thread?

 

You can't move it, It was moved here becuase he belongs here and not in PHP Help,

Oh ... I was wondering how I could have gotten it into the "wrong" forum. I see that this the right forum, after all. I'm sorry for my confusion about this.

 

However, the latest version of PHP that debian supports is 5.2.0, even in its "unstable" repository.

 

The unstable Debian repo contains 5.2.6 (I run several servers on unstable), etch (stable) is 5.2.0.

 

Anyways, looking at make's docs I don't see any option to do what you want. A package is always going to fail if its dependencies aren't met.

The unstable Debian repo contains 5.2.6 (I run several servers on unstable), etch (stable) is 5.2.0.

 

Anyways, looking at make's docs I don't see any option to do what you want. A package is always going to fail if its dependencies aren't met.

Of course we want configure to exit with an error if dependencies aren't met. However, it would be helpful and quite useful if it could optionally list all the unmet dependencies before exiting, instead of just the first one it finds.  I'll find a forum or mailing list for the developers of gnu configure, and I'll ask them about this.

 

And yes, I made a mistake in my /etc/apt/sources.list, and after correcting it, I see now that I can get 5.2.6 from unstable.

 

The unstable Debian repo contains 5.2.6 (I run several servers on unstable), etch (stable) is 5.2.0.

 

Anyways, looking at make's docs I don't see any option to do what you want. A package is always going to fail if its dependencies aren't met.

Of course we want configure to exit with an error if dependencies aren't met. However, it would be helpful and quite useful if it could optionally list all the unmet dependencies before exiting, instead of just the first one it finds.  I'll find a forum or mailing list for the developers of gnu configure, and I'll ask them about this.

 

And yes, I made a mistake in my /etc/apt/sources.list, and after correcting it, I see now that I can get 5.2.6 from unstable ... and actually, from testing, as well.

PS: On the system in question, I can't do any PHP upgrades from unstable, and for that matter, not even from testing. This is because one of the dependencies for both of these upgrades is that the kernel also be upgraded from the one that's currently in use, and this is impossible on the system in question. It's running under a VPN and the kernel can never be changed by a customer.

 

This just gives another illustration of why it's sometimes unavoidable to have to build PHP from source, and why I'd like configure to work more conveniently.

 

Thanks again to everyone.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.