Bug 89526 - Multithreaded C++ program compiled on RHL 9 does not run on RHAS 2.1
Summary: Multithreaded C++ program compiled on RHL 9 does not run on RHAS 2.1
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-23 19:59 UTC by Peter Klotz
Modified: 2007-04-18 16:53 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2003-04-24 08:39:24 UTC


Attachments (Terms of Use)

Description Peter Klotz 2003-04-23 19:59:03 UTC
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 08:39:24 UTC
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 09:25:14 UTC
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.