Perl交叉编译问题
我是 Perl 交叉编译的新手。 我正在尝试从 www.perl.org 中给出的源代码安装 perl。 接下来的命令是./Configure、Make、Make test。
要查找特定安装的路径,CLI“perl -V”显示错误,如下所示。
# ./perl -V
Can't locate Config.pm in @INC (@INC contains: /usr/local/lib/perl5/5.9 .).
BEGIN failed--compilation aborted.
我认为我在路径包含中犯了一些错误。 请告知交叉编译成功的原因和解决方法。
提前致谢。
I am newbie to perl cross compilation.
I'm trying to install perl from source as given in www.perl.org.
Commands followed are ./Configure, Make, Make test.
To find the path for specific installation, the CLI "perl -V" shows error as follows.
# ./perl -V
Can't locate Config.pm in @INC (@INC contains: /usr/local/lib/perl5/5.9 .).
BEGIN failed--compilation aborted.
I think i have done some mistake in path inclusions.
Please let me know the reason and solution for successfull cross compilation.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
交叉编译 Perl 可能是可能的(在 Linux 上构建并针对 BSD),但这样做没有多大意义。 NetBSD 与 Linux 一样能够在本地构建 Perl,这几乎肯定是您应该做的。
您可以按照安装说明从源代码构建它,或者更好的是您可以 安装二进制包,因为其他人已经为您完成了从源代码构建 Perl 的工作。
除非您对旧版本有非常具体的要求,否则您应该安装最新的生产版本,我认为是 5.14.2。
您在评论中提到,当您在目标 BSD 机器上从源代码构建 Perl 时,
Make test
出现了 2 次失败。您的成功率为 99.86%。当然,这已经足够好了——而且你不可能通过交叉编译做得更好。您可能想研究这些失败和 LD_LIBRARY_PATH 问题(我不知道 NetBSD 应该设置什么),但这些问题并没有严重到您应该放弃并使用一种完全不同的方法。It's probably possible to cross-compile Perl (building on Linux and targeting for BSD), but there's not much point in doing so. NetBSD is as capable as Linux of building Perl locally, and that's almost certainly what you should do.
You can build it from source, following the installation instructions, or better yet you can install a binary package, since somebody else has already done the work of building Perl from source for you.
Unless you have a very specific requirement for an old version, you should install the most recent production version, which I believe is 5.14.2.
You mentioned in a comment that when you build Perl from source on your target BSD machine,
Make test
had 2 failures. You had a 99.86% success rate. Surely that's good enough -- and you're not likely to do any better by cross-compiling. You might want to look into those failures and theLD_LIBRARY_PATH
issue (I don't know what it should be set to for NetBSD), but those issues aren't so serious that you should give up and use a radically different approach.