Search code examples
c++log4cxx

linux c++ application deployment


I am trying to deploy a c++ application with log4cxx.so and is requiring glibc 2.14, but the machine being deploy has 2.12 glibc. Is is necessary to upgrade this machine to glibc 2.14 in order to run this application? Or there is other more portable way?


Solution

  • Linux binary portability is a pain. Linux uses symbol versioning, so you should be able to find out what symbols are needed with:

    nm binary | grep @@GLIBC_ | sort -t@ -k14
    

    You may be able to inline the functions and remove the dependency on newer glibc.

    You can read more here. Generally the best option for portability is to compile against an older version of glibc or just to provide sources and a MAKEFILE.