我试图在我的FreeBSD 7.1 (BSD)服务器上编译Perl 5.10,但是当我运行配置脚本并回答问题时,我会得到以下错误:
...POSTIX threads should be supported by FreeBSD 7.1 ... but your system is missing the shared libc_r.谷歌搜索出的答案是安装了gethostnamadr.c,这很好,除了两件事:
,如何解决我的问题?
发布于 2009-05-02 19:02:02
要在FreeBSD 7上启用Perl5.10线程,只需使用patch应用下面的修补程序即可。然后,您可以使用-Dusethreads构建perl,或者回答Configure文件问题以启用线程处理,这样就可以了。我还没有做过任何重要的测试或比较,但是所有的编译都很好,包括线程库和我所有的Perl程序都很好。
--- hints/freebsd.sh 2008/10/20 04:59:30 1.1
+++ hints/freebsd.sh 2008/10/20 22:49:29
@@ -211,6 +211,14 @@
exit 1
;;
+ 7.*)
+ # 7.x doesn't install libc_r by default, and Configure
+ # would fail in the code following
+ #
+ # gethostbyaddr_r() appears to have been implemented in 6.x+
+ ldflags="-pthread $ldflags"
+ ;;
+
*)
if [ ! -r "$lc_r" ]; then
cat <<EOM >&4 编辑:我忘了我的参考资料;请在这里查看更多信息:http://www.gossamer-threads.com/lists/perl/porters/232518?nohighlight=1#232518。
发布于 2009-05-02 18:26:25
与斯波斯基所说的"perl几乎被遗忘“相反.perl非常活跃。
您没有说明您安装了哪个版本的FreeBSD .但是,假设您已经安装了一分钟的FreeBSD 7.1,那么您就无法安装线程库,或者线程库不在库路径中。
请注意,libc是一个通用的'c‘库,而libc_r是该文件的线程安全版本。2005年谷歌的一些调查结果表明,libc_r已经遭到了反对。
考虑到这一点,很可能您正处于“修订冲突”的中间。遗憾的是,FreeBSD本机没有提供线程安全版本的perl,但是,它们确实打包了perl 5.10和随后的几个修订版。我发现这个链接很有用:
http://www.nabble.com/How---where-to-get-a-Perl-that-has-threads--td22270858.html
您还可以尝试安装FreeBSD中包含的p5-叉库。
http://www.nabble.com/How---where-to-get-a-Perl-that-has-threads--td22270858.html
https://stackoverflow.com/questions/814285
复制相似问题