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的更多相关文章
- 产品中 configure/cross compile的一个bug
在mac机上, 为iPhone版本编译产品. 运行./configure报错如下: configure:22793: error: cannot run test program while cros ...
- cross compile vlc 播放器
上一篇文章介绍了如何交叉编译 FFmpeg ,继续介绍 VLC播放器 交叉编译 . 首先下载 vlc 源码 我用的是 2.2.6 地址 : http://mirrors.neusoft.edu ...
- 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 ...
- aarch64 cross compile 交叉编译 opencv
需求 : linux host : UBUNTU opencv source : opencv 3.3.1.zip CMAKE : apt-get install cmake cmake-qt- ...
- 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 & ...
- [cross compile]cygwin和mingw
转自:http://blog.csdn.net/embededvc/article/details/6829010 1. MinGW和CygWin/gcc概念 Unix下编译通过的C代码,在win32 ...
- Cross compile openwrt
在Centos7上交叉编译生成OpenWrt固件 安装ss-* 获取最新的ss, 当前是 wget https://github.com/shadowsocks/shadowsocks-libev/a ...
- cross compile gdbserver
1. 下载gdb源码,7.12版本,下载地址:ftp://ftp.gnu.org/gnu/gdb.2. 编译gdb:0> cd gdb-7.121> mkdir __install2> ...
- Qt5 CMake cross compile
cmake_minimum_required(VERSION 2.8) if (${ARM}) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCES ...
随机推荐
- iOS工程中的info.plist文件的完整研究
原地址:http://blog.sina.com.cn/s/blog_947c4a9f0100zf41.html 们建立一个工程后,会在Supporting files下面看到一个"工程名- ...
- Codeforces 385 C Bear and Prime Numbers
题目链接~~> 做题感悟:这题属于想法题,比赛时直接做的 D 题.可是处理坐标处理的头晕眼花的结果到最后也没AC. 解题思路: 由于查询的时候仅仅考虑素数,so~我们仅仅考虑素数就能够,这就须要 ...
- The promises and challenges of std::async task-based parallelism in C++11 C++11 std::async/future/promise
转载 http://eli.thegreenplace.net/2016/the-promises-and-challenges-of-stdasync-task-based-parallelism- ...
- MySQL外键的设置及作用
原文地址:http://www.php100.com/html/webkaifa/database/Mysql/2010/0830/5342.html 外键的作用: 保持数据一致性,完整性,主要目的是 ...
- 大规模分布式数据处理平台Hadoop的介绍 一种可靠、高效、可伸缩的处理方案
http://www.nowamagic.net/librarys/veda/detail/1767 Hadoop是什么 Hadoop原来是Apache Lucene下的一个子项目,它最初是从Nutc ...
- GCC手册学习(序)
已经是2014年的年末了,又快过了一年.今年,一定要认真把GCC再学习一遍,做好笔记. 总览 gcc [option|filename] ... g++ [option|filename] ... ...
- SQL 2005示例库(转载)
sql2005数据库实例 从网上找还得麻烦,转了过来,点击就可以下载! 在学习SQL2005中离开不了SQL2005示例数据库,AdventureWorks数据库下载安装,,northwind数据库下 ...
- PHP:计算文件或数组中单词出现频率
一:如果是小文件,可以一次性读入到数组中,使用方便的数组计数函数进行词频统计(假设文件中内容都是空格隔开的单词): <?php $str = file_get_contents("/p ...
- atitit。html css框架Bootstrap Foundation的比较与不同 attilax大总结
atitit.html css框架Bootstrap Foundation的比较与不同 attilax大总结 1. Bootstrap Foundation的比较与不同1 2. Bootstrap ...
- [elk]logstash的grok匹配逻辑grok+date+mutate
重点参考: http://blog.csdn.net/qq1032355091/article/details/52953837 logstash的精髓: grok插件原理 date插件原理 kv插件 ...