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:

wget http://www.cpan.org/src/5.0/perl-5.20.2.tar.gz

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的更多相关文章

  1. 产品中 configure/cross compile的一个bug

    在mac机上, 为iPhone版本编译产品. 运行./configure报错如下: configure:22793: error: cannot run test program while cros ...

  2. cross compile vlc 播放器

    上一篇文章介绍了如何交叉编译 FFmpeg ,继续介绍  VLC播放器  交叉编译 . 首先下载 vlc 源码  我用的是 2.2.6  地址 : http://mirrors.neusoft.edu ...

  3. build-qt.sh(Cross compile in Linux for Windows)

    #!/bin/bash set -e MINGW=${MINGW:-${ARCH:-x86_64}-w64-mingw32} PREFIX=${PREFIX:-usr} WORKSPACE=${WOR ...

  4. aarch64 cross compile 交叉编译 opencv

    需求 : linux host :  UBUNTU opencv source : opencv 3.3.1.zip CMAKE  :  apt-get install cmake cmake-qt- ...

  5. static cross compile gtk-2.16.6+gtk-directfb+arm-linux (arm-linux-gcc-3.4.4+glib-2.3.5)

    ----------------------------------------------------------------------- In Ubuntu 10.4 Desktop and & ...

  6. [cross compile]cygwin和mingw

    转自:http://blog.csdn.net/embededvc/article/details/6829010 1. MinGW和CygWin/gcc概念 Unix下编译通过的C代码,在win32 ...

  7. Cross compile openwrt

    在Centos7上交叉编译生成OpenWrt固件 安装ss-* 获取最新的ss, 当前是 wget https://github.com/shadowsocks/shadowsocks-libev/a ...

  8. cross compile gdbserver

    1. 下载gdb源码,7.12版本,下载地址:ftp://ftp.gnu.org/gnu/gdb.2. 编译gdb:0> cd gdb-7.121> mkdir __install2> ...

  9. Qt5 CMake cross compile

    cmake_minimum_required(VERSION 2.8) if (${ARM}) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCES ...

随机推荐

  1. 关于Objective-c和Java下DES加密保持一致的方式

    转载自:http://www.cnblogs.com/janken/archive/2012/04/05/2432930.html 最近做了一个移动项目,是有服务器和客户端类型的项目,客户端是要登录才 ...

  2. 1000个经常使用的Python库和演示样例代码

    以下是programcreek.com通过分析大量开源码,提取出的最经常使用的python库. 1. sys    (4627) 2. os    (4088)  3. re    (3563)  4 ...

  3. 把IIS日志导入到数据库

    1.建表 CREATE TABLE [dbo].[inetlog0828]( [date] [date] NULL, ) NULL, ) NULL, ) NULL, ) NULL, ) NULL, [ ...

  4. 泛型Where T 说明

    约束 说明 where T : struct 对于结构约束,类型 T 必须是值类型 where T : class 类约束指定类型 T 必须是引用类型 where T : IFoo 指定类型 T 必须 ...

  5. Leetcode Find Minimum in Rotated Sorted Array 题解

    Leetcode Find Minimum in Rotated Sorted Array 题目大意: 对一个有序数组翻转, 就是随机取前K个数,移动到数组的后面,然后让你找出最小的那个数.注意,K有 ...

  6. 转载:Linux下执行SVN命令时提示错误:Valid UTF-8 data

    在Linux下执行svn add *时出现如下错误: svn:  Valid UTF-8  data(hex: 4b)followed by invalid UTF-8 sequence(hex:  ...

  7. unity3d通过代码动态创建销毁游戏对象

    只能动态创建内部提供的游戏对象,代码如下: //按下C后创建 if (Input.GetKeyDown (KeyCode.C)) { GameObject s1 = GameObject.Create ...

  8. python selenium ---键盘事件

    转自:http://www.cnblogs.com/fnng/p/3258946.html 本节重点: l 键盘按键用法 l 键盘组合键用法 l send_keys() 输入中文运行报错问题 键盘按键 ...

  9. 以登录实例简单介绍Servlet使用

    1.简单介绍 Java Servlet 是执行在 Web server或应用server上的程序,使用 Servlet.您能够收集来自网页表单的用户输入.呈现来自数据库或者其它源的记录.还能够动态创建 ...

  10. 使用forever运行nodejs应用

    使用forever运行nodejs应用 何为forever forever可以看做是一个nodejs的守护进程,能够启动,停止,重启我们的app应用. 官方的说明是说: A simple CLI to ...