On Mon, 9 Apr 2007, Marcus Hüwe wrote:
> On 2007-04-09 21:30:32 +0200, Marcus Meissner wrote:
> > On Mon, Apr 09, 2007 at 09:14:14PM +0200, Marcus Hüwe wrote:
> > > Hi,
> > >
> > > why can't i compile a program in 32bit mode on 10.2 on a x86_64
> > > machine/machine?
> > > Here's a simple testcase:
> > >
> > > build:~# cat test.c
> > > int main(void) {
> > > return 0;
> > > }
> > > build:~# gcc -m32 -o test test.c
> > > /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
> > > skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.1.2/libgcc.a
> > > when searching for -lgcc
> > > /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
> > > cannot find -lgcc
> > > collect2: ld returned 1 exit status
> > > build:~#
> > >
> > > So it seems that a libgcc.a for 32bit is missing?
> > >
> > > build:~# find / -iname "*libgcc*"
> > > /lib/libgcc_s.so.1
> > > /usr/src/linux-2.6.18.2-34/arch/mips/lib/libgcc.h
> > > /usr/lib64/gcc/x86_64-suse-linux/4.1.2/libgcc_eh.a
> > > /usr/lib64/gcc/x86_64-suse-linux/4.1.2/libgcc_s.so
> > > /usr/lib64/gcc/x86_64-suse-linux/4.1.2/libgcc.a
> > > /lib64/libgcc_s.so.1
> > > /installed-pkg/libgcc41-32bit
> > > /installed-pkg/libgcc41
> > > build:~#
> > >
> > >
> > > If i try the same on 10.1 it all works fine because on 10.1 i have
> > > libgcc.a for
> > > 32bit mode:
> > > # on 10.1
> > > build:/# rpm -qf /usr/lib64/gcc/x86_64-suse-linux/4.1.0/32/libgcc.a
> > > gcc-4.1.0-25
> > > build:/#
> > >
> > >
> > > Is it a bug in the gcc package or is it my fault?
> >
> > gcc41-32bit should be installed too, then it will work.
> >
> uhh - thanks for the hint!
> It's working now :)
Actually, gcc-32bit is the correct package to install (it will pull in
all required dependencies).
Richard.
--
Richard Guenther <[EMAIL PROTECTED]>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex