perlirix - Irix 系統上的 Perl 版本 5
本文件說明 Irix 的各種功能,這些功能會影響 Perl 版本 5(以下簡稱 Perl)的編譯和/或執行方式。
使用
sh Configure -Dcc='cc -n32'
編譯 32 位元 Perl。除非您有 7.1 或更新版本的編譯器,否則不要使用 -n32(使用 cc -version 檢查)。
(建置「cc -n32」為預設值。)
使用
sh Configure -Dcc='cc -64' -Duse64bitint
這需要 64 位元 MIPS CPU(R8000、R10000,...)
您也可以使用
sh Configure -Dcc='cc -64' -Duse64bitall
但由於 cc -64
,這與 -Duse64bitint 相比沒有任何不同。
您也可以執行
sh Configure -Dcc='cc -n32' -Duse64bitint
如果您沒有 64 位元 CPU,請使用 long long 作為 64 位元整數類型。
如果您使用 gcc,只要
sh Configure -Dcc=gcc -Duse64bitint
就夠了,Configure 應該會自動探測正確的 64 位元設定。
已知某些 Irix cc 版本(例如 7.3.1.1m,請嘗試 cc -version)在編譯 perl.c 時會出現問題(核心傾印)。如果您使用了 -OPT:fast_io=ON 且發生這種情況,請嘗試移除它。如果這樣做失敗,或者您沒有使用它,請嘗試調整其他最佳化選項(-LNO、-INLINE、-O3 至 -O2 等)。編譯器錯誤已回報給 SGI。(Allen Smith <easmith@beatrice.rutgers.edu>)
如果您收到關於 so_locations 的抱怨,請在 hints/irix_6.sh 檔案中搜尋「lddflags」並進行建議的調整。(David Billinghurst <David.Billinghurst@riotinto.com.au>)
請勿嘗試使用 Perl 的 malloc,這將導致非常神秘的錯誤(特別是使用 -Duse64bitall 時)。
使用 -Duseithreads 執行 Configure,這將使用 Perl 5.8.0 的「直譯器執行緒」設定 Perl,請參閱 執行緒。
對於使用 perl 執行緒的 Irix 6.2,您必須安裝以下修補程式
1404 Irix 6.2 Posix 1003.1b man pages
1645 Irix 6.2 & 6.3 POSIX header file updates
2000 Irix 6.2 Posix 1003.1b support modules
2254 Pthread library fixes
2401 6.2 all platform kernel rollup
重要事項:沒有修補程式 2401,Irix 6.2 中的內核錯誤會導致您的機器在執行執行緒 perl 時發生恐慌並崩潰。Irix 6.3 和更高版本沒問題。
Thanks to Hannu Napari <Hannu.Napari@hut.fi> for the IRIX
pthreads patches information.
在執行 Configure 和建置時,您可能會收到很多這樣的警告
ld:
The shared object /usr/lib/libm.so did not resolve any symbols.
You may want to remove it from your link line.
請忽略它們:在 IRIX 5.3 中,沒有辦法讓 ld 對此保持安靜。
在編譯過程中,您將看到來自 toke.c 的這個警告
uopt: Warning: Perl_yylex: this procedure not optimized because it
exceeds size threshold; to optimize this procedure, use -Olimit
option with value >= 4252.
請忽略這個警告。
在 IRIX 5.3 和 Perl 5.8.1 中(Perl 5.8.0 無法在 IRIX 5.3 中編譯),已知以下失敗。
Failed Test Stat Wstat Total Fail Failed|Failing List
-----------------------------------------------------------------------
../ext/List/Util/t/shuffle.t 0 139 ?? ?? % ??
../lib/Math/Trig.t 255 65280 29 12 41.38% 24-29
../lib/sort.t 0 138 119 72 60.50% 48-119
56 tests and 474 subtests skipped.
Failed 3/811 test scripts, 99.63% okay. 78/75813 subtests failed,
99.90% okay.
它們被懷疑是編譯器錯誤(至少已知 shuffle.t 失敗來自某些 IRIX 6 設定)和數學函式庫錯誤(Trig.t 失敗),但由於 IRIX 5 早已結束生命週期,因此不太可能為 IRIX 提供進一步的修正。如果您能為 5.3 取得 gcc,您也可以嘗試,因為 IRIX 6 中的 gcc 是至少 shuffle.t 和 sort.t 失敗的已知解決方法。
Jarkko Hietaniemi <jhi@iki.fi>
請將任何錯誤、更新或建議回報至 https://github.com/Perl/perl5/issues。