All of lore.kernel.org
 help / color / mirror / Atom feed
* [poky][Question]cross build error.
@ 2013-09-09  6:58 ` Bian Naimeng
  0 siblings, 0 replies; 2+ messages in thread
From: Bian Naimeng @ 2013-09-09  6:58 UTC (permalink / raw)
  To: poky; +Cc: openembedded-core

Hi all,

If link library of distribution which built by Yocto-1.4.x,
the following error will be caught.

 # /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc \
   -o helloworld helloworld.c -L /opt/mydistro/usr/lib -l xxx
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld: 
     skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld: 
     cannot find /lib/libc.so.6
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld: 
     skipping incompatible /usr/lib/libc_nonshared.a when searching for /usr/lib/libc_nonshared.a
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld:
     cannot find /usr/lib/libc_nonshared.a
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld:
     cannot find /lib/ld-linux-x86-64.so.2
   collect2: error: ld returned 1 exit status

It can be avoid by changing the sysroot to "/opt/mydistro".

 # /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc \
   -o helloworld helloworld.c -L /usr/lib -l xxx --sysroot /opt/mydistro

The default sysroot is "/opt/poky-lsb/1.4.1/sysroots/x86_64-poky-linux",
but why cross gcc finds libc.so.6 from /opt/mydistro/
 # cat /opt/poky-lsb/1.4.1/environment-setup-x86_64-poky-linux  | grep sysroot
   ... ...
   CC="x86_64-poky-linux-gcc  -m64 --sysroot=/opt/poky-lsb/1.4.1/sysroots/x86_64-poky-linux"
   ... ...

Any suggestion?

Thanks
 Bian



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Question]cross build error.
@ 2013-09-09  6:58 ` Bian Naimeng
  0 siblings, 0 replies; 2+ messages in thread
From: Bian Naimeng @ 2013-09-09  6:58 UTC (permalink / raw)
  To: poky; +Cc: openembedded-core

Hi all,

If link library of distribution which built by Yocto-1.4.x,
the following error will be caught.

 # /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc \
   -o helloworld helloworld.c -L /opt/mydistro/usr/lib -l xxx
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld: 
     skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld: 
     cannot find /lib/libc.so.6
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld: 
     skipping incompatible /usr/lib/libc_nonshared.a when searching for /usr/lib/libc_nonshared.a
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld:
     cannot find /usr/lib/libc_nonshared.a
   /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.7.2/ld:
     cannot find /lib/ld-linux-x86-64.so.2
   collect2: error: ld returned 1 exit status

It can be avoid by changing the sysroot to "/opt/mydistro".

 # /opt/poky-lsb/1.4.1/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc \
   -o helloworld helloworld.c -L /usr/lib -l xxx --sysroot /opt/mydistro

The default sysroot is "/opt/poky-lsb/1.4.1/sysroots/x86_64-poky-linux",
but why cross gcc finds libc.so.6 from /opt/mydistro/
 # cat /opt/poky-lsb/1.4.1/environment-setup-x86_64-poky-linux  | grep sysroot
   ... ...
   CC="x86_64-poky-linux-gcc  -m64 --sysroot=/opt/poky-lsb/1.4.1/sysroots/x86_64-poky-linux"
   ... ...

Any suggestion?

Thanks
 Bian



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-09  6:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09  6:58 [poky][Question]cross build error Bian Naimeng
2013-09-09  6:58 ` [Question]cross " Bian Naimeng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.