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 ...
随机推荐
- windows系统中常用的快捷键
开发中,一些常用的键盘技巧: (1)快速切换桌面(alt+tab)或者是(window+tab) (2)迅速关闭当前页面 (3)迅速收起所有页面 (4)直接回到桌面页面 (5)锁定你的屏幕
- android精确绘制文字位置的方法
android 中使用Canvas的drawText绘制文本的位置,是基于基线的. 例如以下图: 当中字母Q的小尾巴在横线以下了. 怎么样找准字母的中心位置呢? 先看以下的样例:(右边的数字,表示字体 ...
- 2019pycharm破解大法
通过激活码激活Pycharm 1 先找到你的hosts文件: Windows电脑:c:\windows\system32\drivers\etc Linux/Mac电脑:/etc 2 编辑hosts文 ...
- 算法笔记_164:算法提高 最小方差生成树(Java)
目录 1 问题描述 2 解决方案 1 问题描述 问题描述 给定带权无向图,求出一颗方差最小的生成树. 输入格式 输入多组测试数据.第一行为N,M,依次是点数和边数.接下来M行,每行三个整数U,V, ...
- 关于vector push_back()与其他方式读取数据的效率对比(转)
引言: 在读取大量数据(数组)时,使用vector会尽量保证不会炸空间(MLE),但是相比于scanf的读取方式会慢上不少.但到底效率相差有多大,我们将通过对比测试得到结果. 测试数据:利用srand ...
- jQuery中的append()和prepend(),after()和before()的差别
jQuery中的append()和preappend(),after()和before()的差别 append()和prepend() 如果 <div class='a'> //<- ...
- cocos2dx 制作单机麻将(四)
cocos2dx 制作单机麻将(四) 麻将逻辑5.模拟出牌 // // main.cpp // MajiangLogicTest // // Created by TinyUlt on 14-8-16 ...
- 02-hibernate注解-属性级别注解
添加方式: 一是写在属性字段上面. 二是写在属性的get访问器上面. 主要有: @Id, @SequenceGenerator @GeneratedValue @Colum @Embedded @Em ...
- centos7 install flash player
1.在 https://get.adobe.com/cn/flashplayer/ 上选择需要下载版本---> ( YUM,适用于Linux (YUM) ); 2.进入root权限后,进入你的下 ...
- 用 WebSocket 实现一个简单的客服聊天系统
一 需求 一个多商家的电商系统,比如京东商城,不同商家之间的客服是不同的,所面对的用户也是不同的.要实现一个这样的客服聊天系统,那该系统就必须是一个支持多客服.客服一对多用户的聊天系统. 二 思路 使 ...