Bug 139476

Summary: Compiling on x86-64 fails with "is incompatible with i386:x86-64"-Error
Product: [Fedora] Fedora Reporter: Stephan Kuhagen <stk>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-18 10:35:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephan Kuhagen 2004-11-16 07:15:07 UTC
Description of problem:
On FC3/x86-64 I can not compile anything (c, c++). I have installed
all compilers as well as the compatibility-libs/devel-packages, which
I think means, that I now have a biarch-compiler-environment. The
default should be 64bit-compiling since this is the primary architecture.

How reproducible:
Fails always.

Steps to Reproduce:
1. This small programm:
----
int main() {
  printf("hallo welt\n");
  return 0;
}
----
fails with
----
/usr/bin/ld: warning: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../crt1.o' is
incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../crti.o' is
incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../crtn.o' is
incompatible with i386:x86-64 output
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../crt1.o(.text+0xc): In
function `_start':
: undefined reference to `__libc_csu_fini'
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../crt1.o(.text+0x11): In
function `_start':
: undefined reference to `__libc_csu_init'
collect2: ld returned 1 exit status
----

Every other programm I tried fails the same way.

Comment 1 Jakub Jelinek 2004-11-16 10:17:17 UTC
I'd say you forgot to install glibc-devel.x86_64
Run
rpm -q --qf '%{name}-%{version}-%{release}.%{arch}\n' gcc glibc glibc-headers glibc-devel cpp gcc-c++
and you'll see.