开发者社区> 问答> 正文

Yocto为静态库构建失败,并显示错误“找不到匹配项”

我试图在为静态库编写的图像中包含Yocto食谱。

在我自己的图层中创建了recipes-test / static文件夹。 在此文件夹中创建了“ static_0.1.bb”文件 在“ recipes-test / static”文件夹中创建的“ files”文件夹 复制了以下文件。 你好ç

char * hello (void)
{
  r
e```  
turn "Hello";
}
世界

```js
char *world(void)
{
  return "World";
}
helloworld.h

#ifndef HELLOWORLD_H
#define HELLOWORLD_H
char * hello (void);
char * world (void);
#endif

创建的配方具有以下内容:

Description =“简单的helloworld示例静态库” LICENSE =“ MIT” LIC_FILES_CHKSUM =“ file:// $ {COMMON_LICENSE_DIR} / MIT; md5 = 0835ade698e0bcf8506ecda2f7b4f302” 
SRC_URI =“ file://hello.c \ file://world.c \ file://helloworld.h“

S = "${WORKDIR}"

do_compile() {
        ${CC} -c hello.c world.c
        ${AR} -cvq libhelloworld.a hello.o world.o
}

do_install() {
        install -d ${D}${includedir}
        install -d ${D}${libdir}
        install -m 0755 helloworld.h ${D}${includedir}
        install -m 0755 libhelloworld.a ${D}${libdir}
}

当我说时bitbake static,在tmp / work文件夹中创建了静态库

当我将它包含在conf / local.conf文件中并带有以下行时:IMAGE_INSTALL_append =“ static”

生成在根文件创建阶段失败,出现以下错误:

not found other for: 
not found modules for: 
not found deltainfo for: 
not found updateinfo for: 
oe-repo: using metadata from Tue 02 Jul 2019 03:54:50 AM UTC.
No module defaults found
No match for argument: static
Error: Unable to find a match

您能帮我解决错误吗

展开
收起
祖安文状元 2020-01-06 16:30:02 995 0
1 条回答
写回答
取消 提交回答
  • 我试图在为静态库编写的图像中包含Yocto食谱。

    在我自己的图层中创建了recipes-test / static文件夹。 在此文件夹中创建了“ static_0.1.bb”文件 在“ recipes-test / static”文件夹中创建的“ files”文件夹 复制了以下文件。 你好ç

    char * hello (void) { return "Hello"; } 世界

    char *world(void) { return "World"; } helloworld.h

    #ifndef HELLOWORLD_H #define HELLOWORLD_H char * hello (void); char * world (void); #endif 创建的配方具有以下内容: Description =“简单的helloworld示例静态库” LICENSE =“ MIT” LIC_FILES_CHKSUM =“ file:// $ {COMMON_LICENSE_DIR} / MIT; md5 = 0835ade698e0bcf8506ecda2f7b4f302” SRC_URI =“ file://hello.c \ file://world.c \ file://helloworld.h“

    S = "${WORKDIR}"

    do_compile() { ${CC} -c hello.c world.c ${AR} -cvq libhelloworld.a hello.o world.o }

    do_install() { install -d ${D}${includedir} install -d ${D}${libdir} install -m 0755 helloworld.h ${D}${includedir} install -m 0755 libhelloworld.a ${D}${libdir} } 当我说时bitbake static,在tmp / work文件夹中创建了静态库

    当我将它包含在conf / local.conf文件中并带有以下行时:IMAGE_INSTALL_append =“ static”

    生成在根文件创建阶段失败,出现以下错误:

    not found other for: not found modules for: not found deltainfo for: not found updateinfo for: oe-repo: using metadata from Tue 02 Jul 2019 03:54:50 AM UTC. No module defaults found No match for argument: static Error: Unable to find a match 您能帮我解决错误吗

    2020-01-06 16:30:09
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
APP加固新方向 --混淆和瘦身 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载