Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Yocto 如何强制bitbake查找我的库?_Yocto_Bitbake_Openembedded - Fatal编程技术网

Yocto 如何强制bitbake查找我的库?

Yocto 如何强制bitbake查找我的库?,yocto,bitbake,openembedded,Yocto,Bitbake,Openembedded,我试图在yocto/bitbake中构建一个菜谱,但在构建依赖项方面遇到了问题。其中一些构建依赖项不会部署到目标上——它们只是在构建时静态链接。因此,我的项目需要在构建之前构建某些静态库和项目。这些在配方中被指定为“依赖”,并且它们被正确构建 但是,当我的项目尝试在do_configure中运行cmake部分时,cmake输出会抱怨它找不到已经生成的库。我有没有办法引用配方中的包,以便bitbake可以找到库?或者,有没有更好的方法让cmake知道在哪里可以找到它需要的文件 recipetool

我试图在yocto/bitbake中构建一个菜谱,但在构建依赖项方面遇到了问题。其中一些构建依赖项不会部署到目标上——它们只是在构建时静态链接。因此,我的项目需要在构建之前构建某些静态库和项目。这些在配方中被指定为“依赖”,并且它们被正确构建

但是,当我的项目尝试在do_configure中运行cmake部分时,cmake输出会抱怨它找不到已经生成的库。我有没有办法引用配方中的包,以便bitbake可以找到库?或者,有没有更好的方法让cmake知道在哪里可以找到它需要的文件

recipetool创建的配方 输出:

Log data follows:
| DEBUG: Executing python function externalsrc_configure_prefunc
| DEBUG: Python function externalsrc_configure_prefunc finished
| DEBUG: Executing shell function do_configure
| Protobuf autogeneration STARTED
| Protobuf autogeneration FINISHED
| -- Found Protobuf: Protobuf_LIBRARY-NOTFOUND;-lpthread (found version "2.6.1")
| -- Found Protobuf: Protobuf_LIBRARY-NOTFOUND;-lpthread;-lpthread (found version "2.6.1")
| CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
| Please set them or make sure they are set and tested correctly in the CMake files:
| GENL_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| JSON_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| NL_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| Protobuf_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| TINS_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| 
| -- Configuring incomplete, errors occurred!
| See also "[yocto dir]/build/workspace/sources/[my project]/CMakeFiles/CMakeOutput.log".
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at [yocto dir]/build/tmp/work/[target]/[my project]/[version]+git-r0/temp/log.do_configure.24245)

在do_configure中手动调用cmake不是一种好做法。见:

使用CMake时,配方需要继承CMake类,并且配方不必包含do_配置任务。您可以通过设置EXTRA_OECMAKE来进行一些调整,以传递特定于配方的任何所需配置选项

OE将路径和工具链文件等重要参数添加到cmake调用中的原因,请参阅


请尝试删除
do\u configure
并将自定义参数添加到
EXTRA\u OECMAKE

是否可以检查包配置文件是否适合sysroot中缺少的lib
Log data follows:
| DEBUG: Executing python function externalsrc_configure_prefunc
| DEBUG: Python function externalsrc_configure_prefunc finished
| DEBUG: Executing shell function do_configure
| Protobuf autogeneration STARTED
| Protobuf autogeneration FINISHED
| -- Found Protobuf: Protobuf_LIBRARY-NOTFOUND;-lpthread (found version "2.6.1")
| -- Found Protobuf: Protobuf_LIBRARY-NOTFOUND;-lpthread;-lpthread (found version "2.6.1")
| CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
| Please set them or make sure they are set and tested correctly in the CMake files:
| GENL_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| JSON_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| NL_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| Protobuf_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| TINS_LIBRARY
|     linked by target "[project 1]" in directory [yocto dir]/build/workspace/sources/[my project]
|     linked by target "[project 2]" in directory [yocto dir]/build/workspace/sources/[my project]
| 
| -- Configuring incomplete, errors occurred!
| See also "[yocto dir]/build/workspace/sources/[my project]/CMakeFiles/CMakeOutput.log".
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at [yocto dir]/build/tmp/work/[target]/[my project]/[version]+git-r0/temp/log.do_configure.24245)