Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to compile 32-bit program under RHEL3 X86_64?

Status
Not open for further replies.

Jerry Yau

Member level 4
Joined
Oct 22, 2001
Messages
79
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
514
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
 

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
 

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
 

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"
 

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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top