Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to build an apache httpd server that will be able to run under multiple linux os (RH, SUSE, e.t.c.)

The main problem is that httpd is using shared libraries:

ldd httpd/bin/httpd =>  (0x00007fff955fe000) => /lib64/ (0x00007fec3df54000) => /lib64/ (0x00007fec3dd4c000) => /lib64/ (0x00007fec3db14000) => /lib64/ (0x00007fec3d8f7000) => /lib64/ (0x00007fec3d564000)
    /lib64/ (0x00007fec3e183000) => /lib64/ (0x00007fec3d301000) => /lib64/ (0x00007fec3d0fd000)

On 1 of the servers this is causing httpd to fail because of old glibc package:

ldd httpd 
./httpd: /lib64/ version `GLIBC_2.10' not found (required by ./httpd)
./httpd: /lib64/ version `GLIBC_2.9' not found (required by ./httpd) => /usr/lib64/ (0x00002b1e6b55d000) => /lib64/ (0x00002b1e6b680000) => /lib64/ (0x00002b1e6b789000) => /lib64/ (0x00002b1e6b8c3000) => /lib64/ (0x00002b1e6b9dc000)
    /lib64/ (0x00002b1e6b441000)

Updating glibc on the system is not an option unfortunately.

Is there a correct way of compiling apache httpd with static libraries?

share|improve this question

closed as off-topic by Iain, womble, Ward, dawud, kasperd Aug 21 '15 at 10:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – Iain, womble, Ward, dawud, kasperd
If this question can be reworded to fit the rules in the help center, please edit the question.

It's not very likely that you need to do this. What are you really trying to accomplish? – Michael Hampton Mar 27 '13 at 15:29
I'm trying to create a package that will be persistent across multiple servers with different OS. – user166655 Mar 27 '13 at 15:50
That's clear enough. What's not clear is why. On its face, this is "doing it wrong". – Michael Hampton Mar 27 '13 at 15:52

I need to build an apache httpd server that will be able to run under multiple linux os (RH, SUSE, e.t.c.)

No you don't. You have a problem that you're trying to solve by static linking. Static linking is a horrible solution from the previous century and should not be done anymore. Please try to find a different way of solving your actual problem.

share|improve this answer
So basically you are saying that I don't have another option, but to update every OS on every server? And if I don't have the possibility to do that? – user166655 Mar 27 '13 at 15:54
@user166655, keeping servers (Internet-facing ones at that) without careful management (which, inter alia, includes rigurous updating) is just irresponsible. And if there are several, it isn't that you can't install e.g. CentOS for free. Uniform operating system across the board means less headaches (including what you are trying to do). – vonbrand Mar 27 '13 at 15:58
If you don't have the possibility to do that, you'll need to explain why, as that's highly suspicious. But yes, stick to distro-provided packages as much as possible and always update for security patches. – Dennis Kaarsemaker Mar 27 '13 at 16:22
This package I'm creating will be used only locally on servers that are not open to internet. Package installation and os upgrade is highly complicated and will take quite a long time, that is why I was looking for a quick and better solution. – user166655 Mar 27 '13 at 16:41
What's highly complicated about 'yum update'? Or even just 'yum update httpd'? It's far more complicated to keep your server secure with a statically compiled apache. Security doesn't end at the internet facing part of your network. Somebody could penetrate that and proceed from there, or an internal person could decide to do something malicious. – Dennis Kaarsemaker Mar 27 '13 at 16:47

Building a static version of httpd requires usage of a legacy configure flag "--disable-shared" with "./configure".

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.