Cross compile perl
Alex Suykov had do some work for this purpose, and my compile script is based on her patch.
Steps
Step 1:
Download perl source code from perl’s official site, such as:
Step 2:
Download the corresponding perl cross compile patch from Alex Suykov ‘s site.
wget https://raw.github.com/arsv/perl-cross/releases/perl-5.20.2-cross-0.9.7.tar.gz
Step 3:
Extract the source code to the some diretory.
tar xvzf perl-5.20.2.tar.gz
tar xvzf perl-5.20.2-cross-0.9.7.tar.gz
Step 4:
Edit the configure script below to generate the Makefile, replace the paths to your own, such as:
/home/username/arm/gcc/bin
/home/username/arm/dist/lib
/home/username/arm/dist
…
Be careful! :
Do not add
--target-tools-prefix=arm-none-linux-gnueabi-into you configure arguments, otherwise you will get some strange error during the configure stage.
Installation script file:
unset LD_LIBRARY_PATH LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE export PATH=$PATH:/home/username/arm/gcc/bin LDFLAGS='-L/home/username/arm/dist/lib' LD=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-ld AR=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-ar RANLIB=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-ranlib NM=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-nm READELF=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-readelf OBJDUMP=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-objdump CC=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-gcc CXX=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-g++ CFLAGS='--sysroot=/home/username/arm/gcc/arm-none-linux-gnueabi/sys-root' ./configure --target=arm-linux --host=arm-linux-gnueabi --prefix=/home/username/arm/dist
Step 3:
After the configure stage finish successfully.
Run the make command to start the make stage:
make -j4
Step 4:
After the make stage finish successfully.
Run the install command to start the install stage:
make install
Step 5:
Copy the cross compile result to you device, and check the result by run perl from console:
perl –version
If u get the correct version info, u succeed !
Ref:
1. http://arsv.github.io/perl-cross/index.html
2. http://www.cpan.org/src/5.0/perl-5.20.2.tar.gz
2. https://github.com/SynoCommunity/spksrc/issues/138
- Cross compile perl
- cross compile openssl
- ubuntu cross_compile android error
- arm-linux-cross compile chain building
- mplayer cross compile
- cross compile nginx+openssl+curl
- Cross compile webrtc for ios on mac os.
- How to Cross Compile the Bash shell for Android 1.5 (为Android平台编译Bash shell)
- cross-compile minigui in arm 2410
- How to Cross Compile the wireless_tools(iwconfig iwlist)
- Delphi 正则表达式之TPerlRegEx 类的属性与方法(5): Compile、Study
- Unity导出IOS项目Error with iOS compile: Cross Compilation job Mono.WebBrowser.dll failed
- cross_compile glibc for arm
- build-qt.sh(Cross compile in Linux for Windows)
- Delphi 正则表达式之TPerlRegEx 类的属性与方法(5): Compile、Study
- Cross-Compile FreeRDP using Mingw-w64
- makefile中CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)什么意思
- Linux ARM Cross Compile On Intel x86
- Delphi 正则表达式之TPerlRegEx 类的属性与方法(5): Compile、Study
- Cross compile iperf which is a network tools for test TCP/IP network