想在 10.5.4 加裝 perl Term-ReadLine-Gnu module,結果…
sh-3.2# perl Makefile.PL
Found `/usr/lib/libtermcap.dylib'.
cc -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -DHAVE_STRING_H rlver.c -o rlver -arch i386 -arch ppc -L/usr/local/lib -lreadline -ltermcap
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The libreadline you use is libedit library. Use the GNU Readline Library.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

使用 MacPorts 裝了 readline,然後…
sh-3.2# perl Makefile.PL --prefix=/opt/local
Found `/usr/lib/libtermcap.dylib'.
cc -I/opt/local/include -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/
include -DHAVE_STRING_H rlver.c -o rlver -L/opt/local/lib -arch i386 -arch ppc
-L/usr/local/lib -lreadline -ltermcap
ld warning: in /opt/local/lib/libreadline.dylib, file is not of required archite
cture
Undefined symbols for architecture ppc:
"_rl_library_version", referenced from:
_rl_library_version$non_lazy_ptr in ccPO5dhY.o
ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccRHSHso.out (No such file or directory)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Could not compile rlver.c.

cc 竟然architecture 設為 ppc,請問 10.5.4 要如何加裝 perl Term-ReadLine-Gnu 呢?

謝謝。

覺得xcode3(iPhone sdk final附的)的gcc/perl怪怪的,現正用macports裝gcc43…(這個大概要跑很久)

Regards,
chw
直接用 Macports 安裝 p5-term-readline-gnu 即可.
'Everything that has a beginning has an end' ... thankfully
之前我用 10.5 的時候,有些 macports 的軟體也裝不起來哩。
不知道是不是同樣的問題。
謝謝,這樣方便多了 :D

不過 macports 裝 p5-term-readline-gnu,它先裝 perl5.8(這個也要裝很久),而不是將
Term-ReadLine-Gnu裝到系統的(/usr/bin/)perl裡。

Regards,
chw
文章分享
評分
評分
複製連結

今日熱門文章 網友點擊推薦!