如何交叉编译Perl模块 [英] How to cross compile Perl modules

查看:271
本文介绍了如何交叉编译Perl模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Unix Bench安装到iMX6 Yocto中。
我成功交叉编译了Unix Bench源代码。
运行它时,出现如下错误:

I am trying to install Unix Bench into iMX6 Yocto. I successfully cross-compiled Unix Bench source code. When I run it, get error like this:

root@imx6qsabresd:/home/UnixBench# ./Run
Can't locate POSIX.pm in @INC

看起来像Perl的模块是失踪。
那么如何将这些从属模块安装到Yocto中呢?

It looks like Perl the module is missing. So How to install these dependent modules into Yocto?

use POSIX qw(strftime);
use Time::HiRes;
use IO::Handle;
use FindBin;

BTW,有没有运行Perl的Unix Bench版本吗?

BTW, is there any Unix Bench version run without Perl?

推荐答案

OpenEmbedded构建系统将默认的Perl软件包积极地拆分为微型模块,以最小化目标系统的大小(当您不需要所有核心Perl模块时,您就不需要了)安装所有软件包),因此要安装 perl软件包与在Debian或其他标准发行版中安装 perl软件包并不相同。您可以通过 opkg文件perl 命令查看使用 perl安装的软件(当然,如果您使用的是ipk软件包)。

The OpenEmbedded build system aggressively splits default Perl package into tiny modules minimizing size of the target system (when you don't need all core Perl modules you just don't install all of them), so to install 'perl' package there is not the same as to install 'perl' package in Debian or some other standard distro. You can see what is installed with 'perl' via opkg files perl command (if you're using ipk packages, of course).

因此,您需要安装在构建Perl时已经构建的其他软件包。它们具有 perl-module-* 的非常简单的命名方案,因此对于您的软件包,其名称为 perl-module-posix perl-module-time-hires perl-module-io-handle perl-module-findbin 。当然,它们也可以具有某些依赖关系,因此最好为您的程序制作一个正确的配方,并适当地指定 RDEPENDS

So what you need is to install additional packages that are already built when building Perl. They have very simple naming scheme of perl-module-*, so for your package that would be perl-module-posix, perl-module-time-hires, perl-module-io-handle and perl-module-findbin. Of course they can also have some dependencies, so better make a proper recipe for your program and specify RDEPENDS appropriately.

这篇关于如何交叉编译Perl模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆