0

I have a program (JavaFX 2, namely), and one of its binaries (libglass.so) requires libgio-2.0.so.0. The problem is, the system, on which I need to run the app, is quite old and mostly out of my control (thus I can't update it).

I tired copying libgio from my machine there, but only to find that libgio requires GLIBC_2.9 - and target machine only has libc-2.5.

Is there a way to work around this behavior?

Rogach
  • 6,303

1 Answers1

1

The obvious solution is to build glibc 2.9, copy that over as well (do not overwrite the existing one!), then run javafx with LD_LIBRARY_PATH="/old/glibc/libraries:$LD_LIBRARY_PATH" prepended. Alternatively put that path at the end of /etc/ld.so.conf and rerun ldconfig.

lynxlynxlynx
  • 3,373
  • Hm. That machine already has glibc 2.5, so why should I rebuild it? – Rogach Jul 02 '12 at 09:42
  • I tried copying over libc 2.12 (and ld-linux), but got only as far as segfault. – Rogach Jul 02 '12 at 09:42
  • oops, I meant 2.9, fixing. It needs to be the same glibc the package was built against to be completely safe. – lynxlynxlynx Jul 02 '12 at 09:50
  • There is this question - http://unix.stackexchange.com/questions/2717/running-a-statically-linked-binary-with-a-different-glibc?rq=1, and it is stated there that just recompiling glibc wouldn't help :( – Rogach Jul 02 '12 at 09:51
  • but libglass and libgio are not statically linked or their names wouldn't end in ".so". – lynxlynxlynx Jul 02 '12 at 10:00
  • Yes, but as it was stated in that post, libc looks for loaders in standard locations. Wouldn't 2.9 segfault when trying to use 2.5 loader? – Rogach Jul 02 '12 at 10:02
  • Forgive my questions, I'm just very new to all that static/dynamic libraries stuff :) – Rogach Jul 02 '12 at 10:04
  • I'm not sure. There may be extra environment variables dictating it, the way it was built or it may really be hardcoded. The bulletproof solution is to run everything in a separate chroot, but since javafx is a gui application it would not be simple to use. :( – lynxlynxlynx Jul 02 '12 at 10:10