You are not logged in.

#1 2011-12-19 16:11:26

Ocye
Member
Registered: 2011-12-07
Posts: 29

Crosscompiling for i386 does not uses /lib32

I try to crosscompile for 32bit but linking does not uses the right path. Multilibs are installed. Actually, I use Freepascal and the original question can be found here: http://www.lazarus.freepascal.org/index.php/topic,15557

#include <stdio.h>
  int main(void)
  {
    printf("Hello, World\n");
    return 0;
  }

cc -m32 hello.c (no error)

file a.out wrote:

a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0x35f957192f312df883c0bd943ce96992e9d286cf, not stripped

/usr/bin/ld -b elf32-i386 -m elf_i386 -o Hello ./a.out wrote:

/usr/bin/ld: error in ./a.out(.eh_frame); no .eh_frame_hdr table will be created.

./Hello: error while loading shared libraries: : cannot open shared object file: No such file or directory

file ./Hello wrote:

./Hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0x35f957192f312df883c0bd943ce96992e9d286cf, not stripped

ldd ./Hello wrote:

./Hello: error while loading shared libraries: ./Hello: unsupported version 33619 of Verneed record

Offline

#2 2012-01-31 16:25:27

akira86
Member
Registered: 2009-01-16
Posts: 119

Re: Crosscompiling for i386 does not uses /lib32

I am facing the same problem ... and didn't find a solution yet.
I don't know if it's a bug...

ld doesn't search in the /usr/lib32 directory.

Last edited by akira86 (2012-01-31 16:26:32)

Offline

Board footer

Powered by FluxBB