0

这些日志我在运行“scons TARGET_OS=yocto TARGET_ARCH=i586 TARGET_TRANSPORT=BLE TC_PREFIX=i586-poky-linux-TC_PATH=/opt/poky-edison/1.6/sysroots/x86_64-pokysdk-linux/usr/bin/ i586-poky-linux RELEASE=0"

scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: out/yocto/i586/debug
Linking out/yocto/i586/debug/service/resource-encapsulation/src/common/librcs_common.so
/opt/poky-edison/1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.8.2/ld: cannot find -lgcov
collect2: error: ld returned 1 exit status
scons: *** [out/yocto/i586/debug/service/resource-encapsulation/src/common/librcs_common.so] Error 1
scons: building terminated because of errors.

--> 这似乎是一个链接错误,所以我尝试安装 gcovr 和 lcov。我仍然遇到同样的错误,所以任何人都面临或解决了这个问题,请帮助我解决这个问题。

4

2 回答 2

0

在调试模式 (RELEASE=0) 下与 gcov 链接是新的,可能它进入 yocto 构建的方式存在错误。交叉构建故事中存在漏洞,提交错误将有助于跟踪事情(https://jira.iotivity.org)。您安装的两个 pkg 对此没有影响,它们是工具,抱怨是缺少库 - 您在交叉构建环境(sysroot)中有 libgcov 吗?在我的系统上,我在两个地方看到它:

/usr/lib/gcc/x86_64-redhat-linux/7/libgcov.a
/usr/lib/gcc/arm-none-eabi/7.1.0/libgcov.a  + target-specific variants

后者不用于 iotivity,但显示了在使用时将是交叉工具链的安装。前者来自 pkg gcc-7.1.1-3.fc26.x86_64,后者来自 pkg arm-none-eabi-gcc-cs-7.1.0-2.fc26.x86_64。

于 2017-09-19T16:50:07.427 回答
0

您是在沿 bitbake 构建吗?如果是的话,它应该在 poky 上工作,除非你在需要几个与 gcov 相关的补丁的地方使用 clang。

https://gerrit.iotivity.org/gerrit/#/c/18437/

无论如何用 yocto 标签报告错误,我会看看

于 2017-10-02T13:47:51.733 回答