From: Bian Naimeng <biannm@cn.fujitsu.com>
To: poky@yoctoproject.org
Cc: openembedded-core@lists.openembedded.org
Subject: [poky][Question]cross build error.
Date: Mon, 09 Sep 2013 14:58:24 +0800 [thread overview]
Message-ID: <522D7190.2010106@cn.fujitsu.com> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Bian Naimeng <biannm@cn.fujitsu.com>
To: poky@yoctoproject.org
Cc: openembedded-core@lists.openembedded.org
Subject: [Question]cross build error.
Date: Mon, 09 Sep 2013 14:58:24 +0800 [thread overview]
Message-ID: <522D7190.2010106@cn.fujitsu.com> (raw)
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
next reply other threads:[~2013-09-09 6:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 6:58 Bian Naimeng [this message]
2013-09-09 6:58 ` [Question]cross build error Bian Naimeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=522D7190.2010106@cn.fujitsu.com \
--to=biannm@cn.fujitsu.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=poky@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.