0

Trying to run javacpp-presets (see https://github.com/bytedeco/javacpp-presets) (my code: https://github.com/jjYBdx4IL/misc/blob/master/src/test/java/jjybdx4il/javacv/examples/FFmpegTest.java - maven project) and getting the following error on Ubuntu 12.04.05 LTS amd64:

java.lang.UnsatisfiedLinkError: /tmp/javacpp341118125695795/libjniavutil.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by /tmp/javacpp341118125695795/libavutil.so.52)

Obviously the shared lib coming with the javacpp-presets.ffmpeg maven central jar was built against GLIBC 2.17.

Question: does a shared lib linked against GLIBC 2.5 (for example) always run on systems with newer glibc versions? Is my guess correct that one should always try to build stuff on the oldest system that should be supported?

user1050755
  • 11,218
  • 4
  • 45
  • 56
  • I would say yes, it's just more trouble to get stuff working on older buggy platforms :) For example, to prevent FFmpeg from crashing on CentOS 5.x (GCC 4.1/GLIBC 2.5), we had to disable compiler optimization... – Samuel Audet Oct 31 '14 at 14:16

1 Answers1

0

Question: does a shared lib linked against GLIBC 2.5 (for example) always run on systems with newer glibc versions?

Yes.

Is my guess correct that one should always try to build stuff on the oldest system that should be supported?

Yes. Some additional strategies for developing "run everywhere" libraries could be found here.

Community
  • 1
  • 1
Employed Russian
  • 199,314
  • 34
  • 295
  • 362