Qt-Based Application binary compatiblity issue due to glibc version - linux

I am developing and building my QT-based application on ubuntu 12.04 LTS which uses glibc 2.15. The binary version of the application runs on some linux distributions but not on others. One of the main problem is compatibility issues caused by different versions of glibc with different linux distributions. For example, it doesn't work on centos which uses glibc 2.12 or wary pup which uses glibc 2.10.
Is there anyway to build QT against a lower version of glibc on ubuntu 12.04 LTS? Or do I have to switch to a lower version of Ubuntu to do all the devleopment?

Yes, the easiest way to support old glibc is to build the applications on a older setup.
I have no problem building a complex Qt application (including the use of QtWebKit) on CentOS 5.8 (with gblic 2.5). The application runs fine on Ubuntu, as old as 8.04 (Hardy Heron).

Related

Will building older versions of the linux kernel on newer versions of Ubuntu work?

Let's say that I need to port an older version of the Linux kernel (3.2 for example) to a custom board. I'll be cross-compiling from a Ubuntu environment.
Will I need to be running a certain version of Ubuntu to successfully build a certain version of the kernel, or will I be fine with any version of Ubuntu?

Can you build Rust for old (Redhat 5 vintage) Linux?

Redhat 5 has the required 2.6.18 kernel but not the latest glibc, g++ and certainly no clang. The binary distribution doesn't run, complaining about glibc version.
Has anyone made an attempt to back port to old Linux? I could imagine cobbling together a frankensystem with an old kernel but new compilers and try to compile against old glibc or statically compile in some of new glibc but it seems like a fraught course.
Just wondering if anyone has tried and can offer guidance?
I'm thinking there must be a distro setup to do such builds. Anaconda, for example, includes lots of new technologies but works fine on Redhat 5. I wonder how they build it?
Update: Once you get some newer compilers working on RHEL5 it's still not possible to build Rust because it depends on a working binary of itself to bootstrap. See: https://github.com/rust-lang/rust/issues/9545#issuecomment-54865031
Anaconda packages are built against CentOS 5 (which is equivalent to Redhat 5). The important thing is to compile against an old enough glibc, as it is strictly forward compatible (as you saw). The version of glibc is typically tied to the version of the distro, so your best bet is to make a VM with CentOS 5 and build on that.
The version of the compiler used is not as important, and in fact in some cases it is necessary to use a newer compiler than the old one that comes with the system to get things to work. I have gcc 4.8 built for CentOS 5 which you can get with conda (conda install -c asmeurer gcc).
I hit this very issue this weekend, because Skylight supports Linux 2.6.18, including CentOS 5.10, and we use Rust in our agent.
Alex Crichton of the Rust core team was kind enough to get this working again by using CentOS 5.10 boxes for the build, which uses glibc 2.5 and Linux 2.6.18.

Reading software version numbers(glibc-2.3.4-2.43)

I am releaseing an application to a client. I created executable in Ubuntu machine and it has higher version of glibc and client has lower version of glibc. So its giving me glibc conflict. So I am trying to create a machine with lower version of glibc(centos 4).
I have cent os 4.0 and centos 4.8 images? So which centos version should I go with?
I need glibc-2.3.4-2.36, But in cent os 4.8 it is mentioning it has glibc-2.3.4-2.43.
Are they two different versions of glibc?
How to read the glibc version numbers(I mean what is 2.36 or 2.43 stands for in glibc version)?
3.What version of glibc does centos 4.0 have?

How to compile a linux app to run on a shared web server

I am trying to get a small C application to run on my web server. The web hosting company is HostGator and we have their least-expensive plan 'Hatchling'
Unfortunately this particular plan does not provide access to a compiler, which means I'll need to build it on a similar machine to that server and transfer the executable there.
My question is how 'close' do I have to get to the Linux distribution on that web server for this to work? I currently have a recent Ubuntu in a VM and would like to use it for this process but maybe some complex differences in how Ubuntu compiler chain is built versus what can work on the web server are too great?
Would I need to install the CentOS release 6.5 they use and compile on that?
What do you recommend I do to attack this problem?
John,
P.S. Hostgator runs 'CentOS release 6.5 (Final)' and /proc/version returns "Linux version 3.2.52 (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) )"
It is worth checking that the architecture is the same e.g. Intel - 32bit or 64bit. In theory 32bit will work on a 64bit architecture as long as supporting libraries have been installed.
Dependancies are the other challenge you will have.
Versions of GCC and Kernel versions do not matter too much.

Is it possible to build packages for multiple versions of Red hat Linux on a single server?

I have a set of programs for analyzing radiation data and I want to build packages for Red Hat Linux versions 4.x - 6.x. Is it possible to build these packages on a single build server running a single version of Red Hat Linux or do I need to build the version 4.x package on a server running version 4.x and the version 5.x package on a server running version 5.x?
If I can build packages for several versions on a single server, must that server be running the newest version or the oldest version of the OS?
You need to build toolchain for different OS environments (toolchain for Redhat 4.x and 5.x) and with in toolchain you can build packages for specific OS. toolchain is like a chroot environments.
You can create multiple Virtual machine using KVM and build many version of packages using single node..
You can use UML (User Mode Linux) which is quite interesting... Check out following Link
http://uml.devloop.org.uk/howto.html
You can build your packages in a chroot jail. You can use mach to do so.
Here's a tutorial on building packages with mach you could refer to, though it may be outdated.

Resources