Red Hat Bugzilla – Bug 118740
Applications built using compat-gcc do not run on RH7.3
Last modified: 2007-11-30 17:10:38 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Description of problem:
According to the description of compat-gcc:
This package includes a compiler that can be to generate binaries
that will run on older Red Hat Linux systems (namely Red Hat Linux
7.3). This package includes the C compiler and required compiler
libraries for those systems.
Despite this, application compiled using compat-gcc will not run on
RH7.3 in general. Nor are RH7.3-compatible libraries included in the
compat-gcc RPM. The "compatible" compiler still links against
glibc-2.3, which is not present on RH7.3.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a file, no_rh7.c, containing the following text:
int t = tolower ('T');
printf ("%chis works!\n", t);
2. Compile the file as follows: gcc296 -O3 -o no_rh7 no_rh7.c
3. Execute this command to see that the binary is linked against
glibc-2.3: nm no_rh7 | grep GLIBC_2.3
4. Try to run this binary on RH7.3 to see it fail.
Actual Results: Executable will not run on RH7.3, because it is
linked against glibc-2.3.
Expected Results: Executable should run on RH7.3 (should not be
linked against glibc-2.3).
Replace step 2 with:
gcc296 -I /usr/lib/i386-redhat-linux7/include \
-B /usr/lib/i386-redhat-linux7/lib/ -O3 -o no_rh7 no_rh7.c
That works for me. (If this doesn't work for you, make sure you have
the compat-glibc package installed.)
I have been running Fedora Core 2 since submitting this bug report,
but still observe the same behavior as reported.
Sorry, but as far as I can tell there is no such package as
"compat-glibc" available for Fedora Core 2. Executing "apt-cache
search compat", I see only the following related packages:
Perhaps you could clarify what you mean by the "compat-glibc" pacakge.
I was under the impression that compat-gcc included a
Ok, that's a whole different issue -- there's a compat-glibc package
for RHEL 3, but not for Fedora Core 2.
Here's the URL for the compat-glibc package from Tao Linux (a RHEL
clone). You can try it and see if it works on FC2:
As far as I understand: compat-gcc does not include any kind of libc.
The development headers, etc. for the old glibc are in the
compat-glibc package. Backward compatibility for old binaries is
included in the current glibc (that is, there are no separate packages
for that functionality).
Does that clear things up?
compat-glibc is not going to be provided in FC, I don't see the demand
for it. If you want to build apps for an older system, just use
that older system.
If so, what is the idea of keeping other compat-* packages in FC?
Sometimes people need to be able to build older software on newer
distributions using older compilers. That's the usefulness of
compat-gcc IMO. I don't know enough about the other compat-* packages