Probably a basic question but I did not manage to find a clear answer to it:

Let's say I am compiling a code (with some parts in C) on a build server and run it on a different server. The build server has gcc version X and glibc version Y. What are the constraints on the gcc and glibc versions on the run server, in order for my code to run properly ?

1 Answer 1


Just a few constraints:

  • application is compiled using the same architecture, e.g., x86_64
  • glibc should be at the same revision or later on the run-server
  • "glibc should be at the same revision or later on the run-server" is a useful rule of thumb, but it's not strictly accurate: the required version of glibc depends on the exact symbols used in the binary produced on the build-server. For example, miller only needs glibc 2.14 on amd64 even though it was compiled with 2.22 (yesterday). Jun 13, 2016 at 10:03
  • What do you mean exactly by "revision" ? Are glibc-2.17.55 and glibc-2.17.106 considered as two different revisions ? Jun 23, 2016 at 13:54
  • glibc uses versioned-symbols, and a later revision of glibc will include symbols using both the newest version and older versions. So an application linked with a given revision level of glibc will run with that revision -- or later. Odds are that compiling linking with a newer revision will pick up newer symbol versions. It's been that way since around 2000. Jun 23, 2016 at 19:21
  • strings /lib/libc.so.6 | grep GLIBC and strings /lib/libstdc++.so.6 | grep GLIBC on both build and run servers to find highest supported common version of C and C++ libraries.
    – igor
    Nov 27, 2023 at 21:19

You must log in to answer this question.

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