Linking error on mips64el...

Stéphane Glondu <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <[email protected]>
Dear MIPS experts,

ocaml 4.08.8-7 currently FTBFS on mips64el. The previous version,
4.08.8-6 did build fine and the only difference is metadata.

I investigated on porterbox eller.debian.org, and realized the following
doesn't work in a mips64el sid chroot:

$ cat add.c
int add(int a, int b) {
        return a + b;
}
$ cat sub.c
int sub(int a, int b) {
        return a - b;
}
$ gcc -c add.c
$ gcc -c sub.c
$ ld -r -o toto.o add.o sub.o
ld: add.o: ABI is incompatible with that of the selected emulation
ld: failed to merge target specific data of file add.o
ld: sub.o: ABI is incompatible with that of the selected emulation
ld: failed to merge target specific data of file sub.o
ld: attempt to do relocatable link with elf64-tradlittlemips input and
elf32-ntradlittlemips output
ld: add.o: file class ELFCLASS64 incompatible with ELFCLASS32
ld: final link failed: file in wrong format

...whereas it works on amd64.

Does anyone have an idea on what is going on?


Cheers,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.