Search code examples
clinuxgccx86-64glibc

How to compile my own glibc C standard library from source and use it?


I am trying to compile my own glibc. I have a directory glibc, which contain the glibc source code I downloaded from the internet. From that directory I typed mkdir ../build-glibc. Now from the build-glibc directory I typed ../glibc/configure, which performed the configuration. Now I'm not sure how to call make. I can't call it from glibc directory since it doesn't have the configuration set, neither I can call it from build-glibc, since makefile is not in that directory. How do I solve this problem?


Solution

  • The Makefile is going to exist in your build-glibc directory if the configure script finishes successfully.

    If everything seems to have gone smoothly during configure and still no Makefile, then you probably missed an idiosyncrasy:

    While doing a configure for glibc, it is expected that you normally provide an alternative --prefix, because installing to the default location (/usr/local) can potentially cripple the system. If you don't provide one, then you need to switch on --disable-sanity-checks.

    If this is not the case either, look for a config.log file, and read its contents.