My system has an old glibc version. I compiled the new version [2.23] into /FaF/glibc.

Due to the fact the new glibc version is not compatible with SLES 11 SP2 & SP3 I have to use the linker switch [--rpath=/FaF/glibc/lib] in order the new version is used in my programs. This works perfectly!

I cannot set the path to the new glibc version in the ld.so.confg file because then all system programs try to load the new glibc version and the system crashes horrible.

My question: Is there a way to compile Apache with the new glibc version using the --rpath switch?

  • 1
    Maybe linking it statically? I myself migrated all my inherited SLES to Debian. May 27, 2016 at 18:19
  • Is this just a "newer is always magically better" thing or do you actually have some reason for installing a newer glibc and compiling apache against it? What benefit do you expect to gain from doing this? If you can't clearly articulate (to yourself) any benefit(s) then it's not worth doing. Use a bleeding-edge distro (like debian testing or unstable) rather than a static/stable one, if that's what you want.
    – cas
    May 28, 2016 at 2:54
  • @cas "newer is always magically better" - My system has up to 8! years old libraries. For me it is now better and the more convenient way to update the dependencies. Especially when you consider I needed to upgrade Apache to 2.4 and I started to use PHP 7.x. After 2 days & nights I could solve the problem... May 29, 2016 at 14:50
  • @RuiFRibeiro I was not able to link it statically. There is also the rule not to link statically if you can avoid it. May 29, 2016 at 15:00
  • yes, i can see your point. spending 2 days and nights compiling stuff is a much better solution and use of time than spending a few minutes typing apt-get install or yum install.
    – cas
    May 30, 2016 at 0:42

1 Answer 1


In the end the answer was in the Apache build documentation - Environment variables.

In my case the very serious issue is the fact my system [SLES 11 SP2] crashes with the glibc version 2.23.

This means I cannot set the path to the new glibc libraries in the ld.so.conf file.

The only one solution for me is to set $LDFLAGS while running configure and make with the following values in order the system can load Apache and all of the new libraries in the correct order and also to set the loader explicitly:

export LDFLAGS="-L/FaF/lib64 -L/FaF/glibc/lib -L/FaF/openssl-curl/lib 
       -Wl,--rpath=/FaF/glibc/lib -Wl,--rpath=/FaF/lib64
       -Wl,--rpath=/FaF/lib -Wl,--rpath=/FaF/openssl-curl/lib
       -Wl,--rpath=/usr/local/lib64/ -Wl,--rpath=/usr/lib64
       -Wl,--rpath=/lib64/ -Wl,--dynamic-linker=/FaF/glibc/lib/ld-linux-x86-64.so.2"

All programs using the new glibc version are collected in /FaF.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .