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. python中,== 与 is 之间区别

    在python中,== 与 is 之间既有区别,又有联系,本文将通过实际代码的演示,力争能够帮助读到这篇文章的朋友以最短的时间理清二者的关系,并深刻理解它们在内存中的实现机制. 扯淡的话不多说,下面马 ...

  2. Oracle 临时表空间 temp表空间切换

    一.TEMP表空间 临时表空间主要用途是在数据库进行排序运算.管理索引.访问视图等操作时提供临时的运算空间,当运算完成之后系统会自动清理.当oracle里需要用到sort的时候,PGA中sort_ar ...

  3. kubernetes 环境搭建

    一.规划1.系统centos 7 2.ip规划及功能分配192.168.2.24 master 192.168.2.24 etcd 192.168.2.25 node1(即minion)192.168 ...

  4. Android 8.0新特性-取消大部分静态注册广播

    今天楼主在写一个广播的demo,功能非常的简单,就是一个应用发送一个自定义的广播,同时在这个应用里面定义了一个广播接受者,并且在AndroidManifest文件中进行静态的注册.Demo看上去非常的 ...

  5. 算法笔记_078:蓝桥杯练习 最大最小公倍数(Java)

    目录 1 问题描述 2 解决方案   1 问题描述 问题描述 已知一个正整数N,问从1~N中任选出三个数,他们的最小公倍数最大可以为多少. 输入格式 输入一个正整数N. 输出格式 输出一个整数,表示你 ...

  6. angular 禁止事件冒泡 和 默认行为

    事件冒泡和事件捕捉一直以来都是被讨论的话题,也许大家平时在工作中没有遇到过需要解决事件冒泡的情况举个例子: <body ng-click="fun1()"> <d ...

  7. ES6 对象转Map

    使用Object.entries const obj = { foo: 'bar', baz: 42 }; const map = new Map(Object.entries(obj)); map ...

  8. Java Collection之Queue具体解释及用途

    Queue是一种常见的数据结构,其主要特征在于FIFO(先进先出),Java中的Queue是这样定义的: public interface Queue<E> extends Collect ...

  9. newWindow 弹出的新窗口居中显示

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  10. sql 数据类型 论可变长度字符串与定长性能差异(my sql版)

    首先从字节上来说CHAR是定长,意思就是只要输入在我这个定长以下,不管是几个字符,它的实际占用空间都是CHAR定长的长度.而VARCHAR则相对来说会节省一点空间,比如:你VARCHAR的长度设为10 ...