0

I have a program that is being shipped out for multiple Linux platforms and requires all of the references to be compiled within the executable itself.

I've gather that they would need to be compiled, the *.a library placed in a folder within the project, the "-I//location//" added in for the include headers, and the "-L//location//" added in for the libraries themselves.

But, for the question itself...

How to you compile glibc (32-bit and 64-bit)?

Through open-source research, I've found this link and I have cloned the repo but I cannot find any documentation on how to actually compile it.

git clone git://sourceware.org/git/glibc.git

Well, to be more specific, I haven't found any information on which parameters to use.

  • 2
    I think you want to build a statically linked executable of your program, not go around building libc. – muru Oct 26 '21 at 14:04
  • Please explain. Right now, I have a modified version of OpenSSL (libcrypto.a & libssl.a) in my project and thus I have it statically linked. I am getting the error that "statically linked applications require at runtime the shared libraries from the glibc version used for linking" My translation: my static OpenSSL cannot dynamically use glibc; it must also be compiled and dynamically linked. Or is my translation flawed? – Stryker2k2 Oct 26 '21 at 14:58
  • 1
    Does the error refer to a specific dynamic function call (`getaddrinfo` or `gethostbyname` for example)? It looks like this may be relevant: [Compile a static binary which code there a function gethostbyname](https://stackoverflow.com/a/15165424/4440445) – steeldriver Oct 26 '21 at 15:45

0 Answers0