0

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 ?

0

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). – Stephen Kitt Jun 13 '16 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 ? – user1453767 Jun 23 '16 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. – Thomas Dickey Jun 23 '16 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.