LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem with Libraries when Compiling for older version of Linux (http://www.linuxquestions.org/questions/linux-software-2/problem-with-libraries-when-compiling-for-older-version-of-linux-4175455161/)

plafratt 03-22-2013 03:03 PM

Problem with Libraries when Compiling for older version of Linux
 
I have two machines: one with Ubuntu 12.04 and another with Ubuntu 10.04. I want to compile on the 12.04 machine for the 10.04 machine, but I am running into the problem that the code compiled on 12.04 is looking for glibc 2.15, but 10.04 has glibc 2.11.1.

Is there any straightforward way to compile for Ubuntu 10.04 on 12.04?

("Straightforward" meaning a way that doesn't require that I be a compiler guru.)

Thanks,
plafratt

ukiuki 03-23-2013 08:02 AM

What exactly are trying you compile? And why not upgrade that 10.04 to something newer? Is that 10.04 a server or desktop? Desktop support end at April 2013, almost there.

Regards

Valery Reznic 03-23-2013 10:48 AM

Quote:

Originally Posted by plafratt (Post 4916712)
I have two machines: one with Ubuntu 12.04 and another with Ubuntu 10.04. I want to compile on the 12.04 machine for the 10.04 machine, but I am running into the problem that the code compiled on 12.04 is looking for glibc 2.15, but 10.04 has glibc 2.11.1.

Is there any straightforward way to compile for Ubuntu 10.04 on 12.04?

("Straightforward" meaning a way that doesn't require that I be a compiler guru.)

Thanks,
plafratt

The simplest way is to compile for Ubuntu 10.04 on Ubuntu 10.04. Or earlier.
If you for some reason can't/won't compile here you can try to compile on 12.04 in usual way
and then use statifier (http://statifier.sf.net) to convert your dynamically linked executable into portable one.
Another options is Ermine (http://magicErmine.com) Statifier is free, but don't like systems with memory randomization.
Ermine is commercial, but able handle it.

plafratt 03-25-2013 11:02 AM

Thank you for the responses.

@ukiuki: I am trying to build a simple Qt application. Upgrading the OS isn't an option. I could explain why, but it isn't really worth the time. (Basically, it is problem with my IT department that is out of my hands.)

@Valery: Thanks, I will consider Statifier.

Someone mentioned to me the option of compiling the QT application statically. Does anyone know if this will allow me to avoid the problem I'm having with the old version of GLIBC on the old Linux machine?

Thanks,
Patrick


All times are GMT -5. The time now is 11:35 AM.