简体   繁体   English

linux c ++应用程序部署

[英]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. 我正在尝试使用log4cxx.so部署c ++应用程序,并且需要glibc 2.14,但是正在部署的计算机具有2.12 glibc。 Is is necessary to upgrade this machine to glibc 2.14 in order to run this application? 为了运行此应用程序,是否有必要将此计算机升级到glibc 2.14? Or there is other more portable way? 还是有其他更便携的方式?

Linux binary portability is a pain. Linux二进制可移植性很痛苦。 Linux uses symbol versioning, so you should be able to find out what symbols are needed with: Linux使用符号版本控制,因此您应该能够通过以下方式找出所需的符号:

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

You may be able to inline the functions and remove the dependency on newer glibc . 您也许可以内联函数并删除对较新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 . 通常,可移植性的最佳选择是针对旧版本的glibc进行编译,或者仅提供源代码和MAKEFILE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM