前言
FILES 使用不当,往往会发生以下错误,查阅 yocto 文档给出了以下解释:
non -dev/-dbg/nativesdk- package contains symlink .so: path ‘
Symlink .so files are for development only, and should therefore go into the -dev package. This situation might occur if you add .so rather than .so. to a non-dev package. Change FILES (and possibly PACKAGES) such that the specified .so file goes into an appropriate -dev package.
non -staticdev package contains static .a library: path ‘
Static .a library files should go into a -staticdev package. Change FILES(and possibly PACKAGES) such that the specified .a file goes into an appropriate -staticdev package.
FILES 的作用是什么?
FILES 其实是与配合 PACKAGES 来使用的,是用来指定那些文件放在什么类型的软件包中。比如在一个 recipe 编译完成后,会进行打包操作(比如 deb 等), yocto 一般情况下可以针对一个 recipe 生成 xxx.deb, xxx-dbg.deb, xxx-dev.deb, xxx-src.deb 或者是用户自己定义的安装包,这时就可能需要把头文件放在 xxx-dev.deb 中,编译的 debug 文件放在 xxx-dbg.deb 包中等等操作,那 FILES 就是用来完成这样的功能的。