traits

Failed to compile 32bit program with opencc on 64bit Linux

Discussion created by traits on Jul 12, 2010
Latest reply on Jul 20, 2010 by traits

 

 

Hi all,

I have installed x86 open64 from rpm package on 64bit Ubuntu 10.04. Then, I found it failed to compile 32bit program like this:

traits@ubuntu:~/project/test$ opencc -m32 -o test test.c

/usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching for -lc

/usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when searching for -lc

/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/../lib/crt1.o' is incompatible with i386 output

/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/../lib/crti.o' is incompatible with i386 output

/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/../lib/crtn.o' is incompatible with i386 output

/usr/bin/ld: final link failed: Invalid operation

collect2: ld returned 1 exit status

But, I build 64bit program successfully.
Could someone give some advices?


Open64 version:

traits@ubuntu:~/project/test$ opencc -v

Open64 Compiler Suite: Version 4.2.4

Built on: 2010-06-28 16:07:57 -0700

Thread model: posix

GNU gcc version 4.2.0 (Open64 4.2.4 driver)

Ubuntu 10.04 :

traits@ubuntu:~/project/test$ uname -a
Linux ubuntu 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010 x86_64 GNU/Linux


Outcomes