FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-26-2008, 02:57 PM
Sonal Santan
 
Default Compiling 32-bit applications on 64-bit Hardy

Hello,

I am trying to a compile a simple 32 bit hello world C application on my
x86_64 Hardy. gcc provides a switch -m32 to generate code for x86 using
a x86_64 gcc. However, compilation or rather linking fails with the
following message:

/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/libgcc.a when searching for -lgcc
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status

If I take out the -m32 switch, I get a regular 64 bit binary without any
issues.

Package lib32gcc1 is installed on my machine. However, it does not
provide the missing 32 bit version of libgcc.a. Is gcc -m32 option
supported on Hardy? I know this works on RHEL 5.2.

Sonal







--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-29-2008, 01:25 PM
"Jim Rosser"
 
Default Compiling 32-bit applications on 64-bit Hardy

Have you installed gcc-multilib

On Tue, Jul 29, 2008 at 6:57 AM, Marcin 'Qrczak' Kowalczyk <qrczak@knm.org.pl> wrote:

2008/7/26 Sonal Santan <sonal.santan@gmail.com>:




> I am trying to a compile a simple 32 bit hello world C application on my

> x86_64 Hardy. gcc provides a switch -m32 to generate code for x86 using

> a x86_64 gcc. However, compilation or rather linking fails with the

> following message:



sudo apt-get install gcc-multilib



--

Marcin Kowalczyk

qrczak@knm.org.pl

http://qrnik.knm.org.pl/~qrczak/



--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
Jim Rosser
Winchester Designs


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 07:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org