Bug 1053152 - Can a package to allow gcc -m32 be provided for RHEL7
Summary: Can a package to allow gcc -m32 be provided for RHEL7
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-14 18:39 UTC by Robert Stonehouse
Modified: 2014-01-15 08:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-15 08:56:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Robert Stonehouse 2014-01-14 18:39:17 UTC
Description of problem:

If you find a project that uses "-m32" as a compiler argument, then you will get a linker error on RHEL7
The following came from compiling the internal Solarflare full source code tree on RHEL7
=================================
$ gcc -m32 test.c 
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
=================================

The error is that /usr/lib/gcc/i686-redhat-linux/4.8.2/libgcc_s.so is not available.
On previous RHEL versions I would have installed the gcc.i686 package to fix this problem for an x86_64 system wanting to generate i686 binaries, but gcc.i686 is no longer available for RHEL7 AFAIK.

It will therefore be much harder to alter the build system so that all places that "gcc -m32" are made conditional, rather than just installing a package in order to address the problem.

It is not a problem for RHEL7 as such but it may make it much harder to get other external projects to compile.


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

How reproducible:
100%

Steps to Reproduce:
1. Compile trivial C code with gcc -m32 code.c

Actual results:
Linker error as above

Expected results:


Additional info:

Comment 1 Jakub Jelinek 2014-01-14 18:41:52 UTC
For building 32-bit programs on x86_64, you need to
yum install glibc-devel.686 libgcc.i686
and if it is C++, also libstdc++-devel.i686
and obviously any other devel libraries you plan to use that isn't installed for i686.

Comment 3 Robert Stonehouse 2014-01-15 08:56:03 UTC
(In reply to Jakub Jelinek from comment #1)
> For building 32-bit programs on x86_64, you need to
> yum install glibc-devel.686 libgcc.i686
> and if it is C++, also libstdc++-devel.i686
> and obviously any other devel libraries you plan to use that isn't installed
> for i686.

I had obviously picked those up before as a dependency by installing gcc.i686
I can confirm that glibc-devel.686 libgcc.i686 were available for RHEL7 on x86_64.

Many thanks for the info.


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