Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have one pre-compiled shared library, which require GLIBC-2.9 But I want to use it against GLIBC-2.8.

I am very much sure, source code have not used any function which was introduces in 2.9

Since the library is closed-source, I can not download source code and compiled it against the desired environment.

Is there any method to use pre-compiled library in another environment ?

share|improve this question
1  
Keep in mind that compiling code with some library means using this library ABI. And function names are not the only thing that's part of the ABI. If, for example, some datatype struct was changed between versions, you code won't work. So it's not enough to be sure that the code have not used any function introduced in new version. –  Krzysztof Adamski Oct 15 '12 at 10:34

1 Answer 1

You could bundle that 3rd party library with a copy of glibc-2.9 or newer. Nnote that you'll probably have to include more than libc.so.6, like libpthread and any other libc component that the library or your application may require and the dynamic linker itself, and call the application like LD_LIBRARY_PATH=/path/to/where/those/are /path/to/newer/ld.so your-application.

Alternatively, you could use a chroot where that newer libc is installed (and everything needed by your application)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.