Compiling glibc

In a mixed computing environment, it’s sometimes useful to have heterogeneous machines use the same library collection. For example, when running on a cluster (e.g., managed by condor), software should run regardless of the underlying operating system distribution. My environment required glibc (version 2.15); it took a bit of fiddling to get it to work, so hopefully this will save you some time.

configure errors

Solution: install gawk. Problem was due to incorrect parsing of the output rather than lack of support.

make errors

Executive summary: run make -j8 CFLAGS=”-U_FORTIFY_SOURCE -O2 -fno-stack-protector”

Solution: add -U_FORTIFY_SOURCE to CFLAGS. Note that -O2 is also required in CFLAGS.

Solution: this was perhaps the trickiest. Adding -march=* or -DNDEBUG didn’t help, eventually adding -fno-stack-protector to CFLAGS did the trick.

Solution: nothing – the library seemed to work for me, even with this error. The software I run does not use libnss, though.

That’s it

a “make check” looked okay (although it took forever, so was killed half way).

Posted in Tech Blog.

Leave a Reply

Your email address will not be published. Required fields are marked *