Bug 89526 - Multithreaded C++ program compiled on RHL 9 does not run on RHAS 2.1
Multithreaded C++ program compiled on RHL 9 does not run on RHAS 2.1
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-23 15:59 EDT by Peter Klotz
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-24 04:39:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Klotz 2003-04-23 15:59:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312

Description of problem:
Program compiled with gcc 2.96-118 under Red Hat Linux 9 does not run under Red
Hat Advanced Server 2.1 nor Red Hat Linux 7.2 although all dynamic libraries can
be found.

ldd complains about installed libpthread.so.0, missing GLIBC_2.3.2.

Must the RHL 7.2 system be upgraded to glibc 2.3.2? Is it wise to do so?
There is no glibc 2.3.2 update for RHAS 2.1, so what should be done there?
Would linking libpthread statically on RHL 9 be a safe option?
Is there a chance to run gcc 3.2.2 compiled binaries on RHAS 2.1/RHL 7.2?

Version-Release number of selected component (if applicable):
gcc 2.96-118

How reproducible:
Always

Steps to Reproduce:
1.Write a C++ program that uses threads on RHL 9
2.Compile it with g++296
3.Copy the program to a RHAS 2.1 or RHL 7.2 machine
4.Try to run it or use ldd to see it fail 
    

Actual Results:  [user@host user]$ ldd prg
./prg: /lib/libpthread.so.0: version `GLIBC_2.3.2' not found (required by ./prg)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4001f000)
        libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x40036000)
        libm.so.6 => /lib/libm.so.6 (0x40079000)
        libc.so.6 => /lib/libc.so.6 (0x4009b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


Additional info:
Comment 1 Jakub Jelinek 2003-04-24 04:39:24 EDT
The distribution is just backwards compatible, not forwards compatible.
If you want a program which will run on 7.2/AS2.1 too, you need to compile it
there or at least against its libraries.
Comment 2 Peter Klotz 2003-04-24 05:25:14 EDT
Is compiling with gcc 3.2.2 and statically linking a safe strategy?

The binaries should work on almost all RHL systems.

We have several customers using RHL 7.x, RHAS 2.1 and soon RHL 9. They are 
neither able nor willingly to switch their systems.

Note You need to log in before you can comment on or make changes to this bug.