1

I have the following problem:

Using Qt Creator, I have made a Qt application which requires Glibc_2.14 to run. I now need to run this application on a machine which only provides Glibc_2.11.3. I do not have root rights on the machine, so I cannot update the library.

If I try to run the application, I naturally get the following error message: /lib/libc.so.6: version 'GLIBC_2.14' not found (required by ./obsluha)

I was thinking of linking the Qt application with Glibc statically, but how do I do this in Qt creator? Note that I only need to link statically with Glibc, and not Qt itself.

Another possible way would be to simply copy my working copy of libc.so.6 onto the machine and somehow force the application to use that version (I know this is not a very good idea). This copied into my home directory, and my home directory exported into the LD_LIBRARY_PATH of course creates collisions with the other libc version.

Any feedback would be welcome, whether it is a solution of one of the two methods I proposed, or a different method altogether.

user129186
  • 1,156
  • 2
  • 14
  • 30

1 Answers1

0

I was thinking of linking the Qt application with Glibc statically

Don't do it: contrary to popular belief, fully-static binaries are less portable when using GLIBC, not more. When you link the binary fully-statically, you will likely receive a warning at link time: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking. It is also exceedingly likely that your binary will crash when you ignore that warning.

but how do I do this in Qt creator?

Sorry, I don't know the answer to this. But it's moot.

Note that I only need to link statically with Glibc, and not Qt itself.

It is impossible link GLIBC statically, while linking other libraries dynamically. Use of dynamic libraries implies that you are using dynamic loader, and that implies that you are dynamically linking against GLIBC.

So what can you do? Some of the possible solutions are listed here.

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