2011-09-21 75 views
1

我已經成功地通過配置選項配置跨comile的Perl:使錯誤時,交叉編譯的Perl ARM

./Configure -des -Dusecrosscompile \ 
    -Dtargethost=172.17.185.91 \ 
    -Dtargetdir=/home/perl/ \ 
    -Dtargetuser=root \ 
    -Dtargetarch=arm-linux \ 
    -Dcc=arm-linux-gcc \ 
    -Dusrinc=/opt/Mozart_Toolchain/arm-eabi-uclibc/include/ \ 
    -Dincpth=/opt/Mozart_Toolchain/arm-eabi-uclibc/include/ \ 
    -Dlibpth=/opt/Mozart_Toolchain/arm-eabi-uclibc/lib/ 

而且配置腳本告訴我:「你現在運行‘使’。」但我遇到諸如錯誤,當我做:

`sh cflags "optimize='-O2'" miniperlmain.o` miniperlmain.c 
    CCCMD = arm-linux-gcc -DPERL_CORE -c -DOVR_DBL_DIG=14 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall 
In file included from perl.h:38, 
       from miniperlmain.c:40: 
config.h:4425:12: error: operator '==' has no left operand 
In file included from miniperlmain.c:40: 
perl.h:713:14: error: operator '>=' has no left operand 
... ... 

config.h中,一些宏觀留空,例如:

#define INTSIZE   /**/ 
#define LONGSIZE  /**/ 
#define SHORTSIZE  /**/ 
... much more ... 

我認爲這是未定義的宏結果在make錯誤。我不知道如何解決它。爲什麼即使配置成功,宏也是空白的? 是否有一些指南可以交叉編譯Perl?

回答

0

我交叉編譯的最簡單方法Perl for arm-linux.Please請參考Cross-compiling perl。這是一個偉大的工作!它拯救了我的生命。

只要按照指示,你可以得到你想要的。 'make'時可能會遇到這樣的錯誤:

pp_sys.c:78: error: non-thread-local declaration of 'h_errno' follows thread-local declaration 

只需註釋該行即可。 享受它!

1

有一個Cross目錄,具有一個README文件,其中包括對ARM-Linux的以下說明:(閱讀這件事)

1) You should be reading me (README) in perl-5.x.y/Cross 

2) Make sure you are in the Cross directory. 

3) Edit the file 'config' to contain your target platform information. 

4) make patch ## This will patch the existing source-tree. 
5) make perl ## Will make perl