Rules | Recent posts | topic RSS | Search | Register  | Log in

How to compile 32-bit program under RHEL3 X86_64?

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Linux Software
Author Message
Jerry Yau



Joined: 22 Oct 2001
Posts: 78


Post25 Jul 2008 12:20   How to compile 32-bit program under RHEL3 X86_64?

Sir,
I compile a 32-bit under RHEL3 X86_64. I always get a error message :

ld: Relocatable linking with relocations from format elf64-x86-64 (/redhat30/STDLIB__.o) to format elf32-i386 (csrc/libvhdl_object.o) is not supported

Do someone know how to resolve this program?
Thanks
Jerry Yau
Back to top
fiquran



Joined: 10 Mar 2005
Posts: 97
Helped: 14


Post28 Jul 2008 6:34   How to compile 32-bit program under RHEL3 X86_64?

Hi,

It looks like you're trying to link 64bit and 32bit code together, which is completely impossible. You need the correct (32-bit) dev-package for the mentioned /redhat30/STDLIB__.o
Back to top
Jerry Yau



Joined: 22 Oct 2001
Posts: 78


Post29 Jul 2008 3:06   How to compile 32-bit program under RHEL3 X86_64?

I see. But I don't know how to install 32-bit dev-package on a x86_64 machine. There are no 32-bit dev-package on x86_64 install CD. And If I install 32-bit dev-package stored on 32-bit os install CD on my x86_64 machine, some files will be over write. This is not acceptable.
Could you tell me how to install 32-bit dev-package in my x86_64 machine without destroy my currently machine.
Thanks
Back to top
fiquran



Joined: 10 Mar 2005
Posts: 97
Helped: 14


Post29 Jul 2008 6:47   How to compile 32-bit program under RHEL3 X86_64?

as I said, the linker is trying to build 32 bit libraries from 64 bit (compiler-provided) objects. you should stop that. What can be done?

First thing is make sure that your LDFLAGS are set to correct 64 bit format. If your LDFLAGS are set to 32 bit, please change it in configure file or makefile like

--verbose --format elf64-x86-64

(I have added --verbose to get more information about the ld problem, you may not use it if the above works)

Also try to set GNU target (I am not sure if this works, but worths a try)

export GNUTARGET='elf64-x86-64'

If the above does not work, also try the below definitions in makefile:

CFLAGS="-m64"
LDFLAGS="-m64"
Back to top
Jerry Yau



Joined: 22 Oct 2001
Posts: 78


Post24 Aug 2008 3:51   Re: How to compile 32-bit program under RHEL3 X86_64?

Thanks for your replay. Sorry, maybe I didn't clearly describe my problem. I am trying to make a 32-bit program in 64-bit OS which only has 64-bit develop environment. So ld always try to link 64-bit library with my 32-bit program. According to your suggestion, could I set :
export GNUTARGET='elf32-i386'
export CFLAGS="-m32"
export LDFLAGS="-m32"

I am not familiar with software program so I will ask some stupid questions.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Linux Software
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap