0

Hi I am trying to build an executable on Ubuntu for RedHat 6.4 - and I am struggling due to the different gcc versions.

The RedHat 6.4 machine uses gcc 4.4.7. The Ubuntu machine uses gcc 4.6.3.

Here is what I have tried:

  • Install g++-4.4 on the Ubuntu machine and compile with older version of gcc: failed because the code base uses features not yet available in g++-4.4

  • Copy the Ubuntu libc.so.6 and libstdc++.so.6 over to the RedHat machine. The program sort of gets started, then segfaults.

  • Link the executable on Ubuntu statically with -Wl,-Bstatic as link options. Failed on a third party library with "warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking".

So I am a bit stuck now... Any advice?

Cookie
  • 12,004
  • 13
  • 54
  • 83

1 Answers1

0

Based on comments above, decided to dump RedHat (didn't have a subscription, so not easily upgradable) on the other machine and switch to Fedora, which has the latest gcc. Not a solution that scales, but what can you do.

Cookie
  • 12,004
  • 13
  • 54
  • 83
  • 1
    Oh! Not Red Hat, but RHEL, a *big* difference right there. In that case, you can move to [CentOS](http://centos.org), binary compatible with RHEL (and today under the Red Hat umbrella). Fedora is nice, but has short life (a bit more than a year). – vonbrand Mar 12 '14 at 02:18