Compile with older libc (version `GLIBC_2.14' not found)

前端 未结 2 1487
后悔当初
后悔当初 2020-12-01 12:04

I have to compile a program on a current ubuntu (12.04). This program should then run on a cluster using CentOS with an older Kernel (2.6.18). I cannot compile on the cluste

相关标签:
2条回答
  • 2020-12-01 12:26

    See this answer.

    Is this even the correct approach here

    No: you can't use mismatched versions of glibc as your link command does. You used crt0.o and ld-linux.so from new (system-installed) libc, but libc.so.6 from an old (copied from cluster) libc. That is just not going to work.

    0 讨论(0)
  • 2020-12-01 12:36

    -rpath sets the DT_RPATH tag but doesn't tell the linker to look there for libs, you want -L for that.

    0 讨论(0)
提交回复
热议问题