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 ...
随机推荐
- 自开发实现Quartz Web管理
网上能找到的QuartzWeb管理的资料都是使用的一个国外人写的Quartz WebApp的东东.功能也非常全面. 可是作为自己的应用其有用不了那么多功能,一般我们仅仅要能够定义一个job,指定一个C ...
- 转:java中数组与List相互转换的方法
1.List转换成为数组.(这里的List是实体是ArrayList) 调用ArrayList的toArray方法. toArray public <T> T[] toArray(T[] ...
- Cocos2d-x中点九图(Scale9Sprite)创建图片按钮
1. 配置引擎根目录支持 C/C++->常规->附加包含目录->增加->$(EngineRoot) 2. 引入头文件 #include "cocos-ext.h&qu ...
- 【Datastage】函数大全
一. 类型转换函数 类型转换函数用于更改参数的类型. 以下函数位于表达式编辑器的"类型转换"类别中.方括号表示参数是可选的.缺省日期格式为 %yyyy-%mm-%dd. 以下示例按 ...
- MySQL数据迁移问题
最近尝试了一下小型数据迁移.本地迁移,windows平台,修改配置文件中的data_dir项,然后将旧的data文件下的数据文件全部拷贝过去. 之后登陆数据库,竟然1145错误.可以看到数据库的结构, ...
- Java集合-Map接口相关操作方法
Map接口不是Collection接口的继承.Map接口用于维护键/值对(key/value pairs). 该接口描述了从不重复的键到值的映射. (1) 添加.删除操作: Object put(Ob ...
- 分享一下自己ios开发笔记
// ********************** 推断数组元素是否为空 ********************** NSString *element = [array objectAtIndex ...
- cookie技术自动登录
user public class User implements Serializable{ private String username; private String nick; privat ...
- Java 继承、多态与类的复用
摘要: 本文结合Java的类的复用对面向对象两大特征继承和多态进行了全面的介绍. 首先,我们介绍了继承的实质和意义,并探讨了继承,组合和代理在类的复用方面的异同.紧接着,我们依据继承引入了多态.介绍了 ...
- Resources.FindObjectsOfTypeAll<T>()的坑(Ghost prefab)
今天遇到了一个Bug,因为调用Resources.FindObjectsOfTypeAll<T>()遍历整个场景,结果遍历出的对象不对.比较哈希一查果然是两个.原来prefab本身和pre ...