ubuntu10.04 交叉编译 aria2 总结
1) google之后,找到 这个 https://github.com/z24/pitv/tree/master/cross 的脚本,
觉得非常好。 于是准备用来进行编译
2) 安装交叉编译器
sudo apt-get install gcc-arm-linux-gnueabihf
sudo apt-get install g++-arm-linux-gnueabihf
特别需要注意的是,g++一定需要安装。 之前由于没安装,出现了各种费解的错误,差点就放弃了
比如说 明明 expat编译的好好的,却在 configure aria2的时候,硬是找不到。
还有,在最后链接阶段, 出现了 undefined reference 错误
3)http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz 因为有墙,自动下载不了,需要另外翻墙下载。
4)最后修正的编译脚本。
#!/bin/sh # This script downloads and builds a static aria2 binary for raspberry pi. # Copyright Youjie Zhou <jmpopush@gmail.com>
# All rights reserved. CWD=$(pwd)
export ARCH=arm
export NJOB=
export CPP="/usr/bin/arm-linux-gnueabihf-cpp"
export CC="/usr/bin/arm-linux-gnueabihf-gcc"
export CXX="/usr/bin/arm-linux-gnueabihf-g++"
export TOOL_CC=${CC}
export LD="/usr/bin/arm-linux-gnueabihf-ld"
export AR="/usr/bin/arm-linux-gnueabihf-ar"
export AS="/usr/bin/arm-linux-gnueabihf-as"
export RANLIB="/usr/bin/arm-linux-gnueabihf-ranlib" # Local folder where we install built binaries and libraries.
LOCAL_DIR=$(readlink -f ./local)
mkdir -p ${LOCAL_DIR} # Cross-compiler tools. Latest version can be downloaded at:
# github.com/raspberrypi/tools
TOOL_DIR=/usr
TOOL_BIN_DIR=${TOOL_DIR}/bin PATH=${TOOL_BIN_DIR}:$PATH # zlib
rm -rf zlib-1.2.
#wget http://zlib.net/zlib-1.2.8.tar.gz ./
tar xzf zlib*.tar.gz
cd zlib*/
prefix=${LOCAL_DIR} CC=${TOOL_CC} CFLAGS="-O4" ./configure --static
make -j${NJOB}
make install cd ${CWD} # expat
rm -rf expat-2.1.
#wget http://downloads.sourceforge.net/expat/2.1.0/expat-2.1.0.tar.gz ./
tar xzf expat*.tar.gz
cd expat*/
./configure \
--host=arm-linux-gnueabihf \
--build=${ARCH}-linux \
--enable-shared=no \
--enable-static=yes \
--prefix=${LOCAL_DIR}
make -j${NJOB}
make install cd ${CWD} # c-ares
rm -rf c-ares-1.10.
#wget http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz ./
tar xzf c-ares*.tar.gz
cd c-ares*/
./configure \
--host=arm-linux-gnueabihf \
--build=${ARCH}-linux \
--enable-shared=no \
--enable-static=yes \
--prefix=${LOCAL_DIR}
make -j${NJOB}
make install cd ${CWD} # aria2
rm -rf aria2-1.18.
#wget http://downloads.sourceforge.net/aria2/aria2-1.18.10.tar.xz ./
tar xJf aria2*.tar.xz
cd aria2*/
./configure \
--host=arm-linux-gnueabihf \
--build=${ARCH}-linux \
--disable-nls \
--disable-ssl \
--disable-epoll \
--without-gnutls \
--without-openssl \
--without-sqlite3 \
--without-libxml2 \
--with-libz --with-libz-prefix=${LOCAL_DIR} \
--with-libexpat --with-libexpat-prefix=${LOCAL_DIR} \
--with-libcares --with-libcares-prefix=${LOCAL_DIR} \
--prefix=${LOCAL_DIR} \
CXXFLAGS="-Os -g" \
CFLAGS="-Os -g" \
LDFLAGS="-L${LOCAL_DIR}/lib" \
PKG_CONFIG_LIBDIR="${LOCAL_DIR}/lib/pkgconfig" \
ARIA2_STATIC=yes
make -j${NJOB}
make install
ubuntu10.04 交叉编译 aria2 总结的更多相关文章
- ubuntu10.04编译安装LAMP
ubuntu10.04编译安装LAMP以及简单wordpress的使用 : http://linuxme.blog.51cto.com/1850814/971631 一.源码安装LAMP 网上有一堆关 ...
- ubuntu10.04下修改mysql的datadir的问题
ubuntu10.04下修改mysql的datadir的问题 转自:http://blog.sina.com.cn/s/blog_4152a9f50100mq5i.html 昨天由于服务器空间告紧,需 ...
- ubuntu10.04+win7双系统,重装win7后,恢复grub引导菜单以及命令行引导linux
我在我的小Y上安装了ubuntu10.04和win7旗舰版的双系统,采用的是grub引导.今天win7不知道哪儿出了问题,windows update更新一直报错,(当然360也是打不上滴)网上查了很 ...
- ubuntu10.04编译内核不显示grub菜单解决
问题描述: ubuntu10.04 内核版本2.6.32.28编译内核之后版本2.6.37.6,系统在编译完内核之后,不显示grub菜单 参考资料: http:// ...
- ubuntu10.04共享文件夹
ubuntu10.04共享文件夹 参考http://jingyan.baidu.com/album/9989c746084c70f648ecfe99.html,共享了home文件夹,然后把共享文件夹映 ...
- ubuntu10.04版本下android源码的编译
首先是网址:http://software.intel.com/en-us/blogs/2012/03/06/hands-on-notesbuild-android-x86-ics-4-virtual ...
- 【转】Ubuntu10.04上编译Android源码(Build Android source in Ubuntu10.04 Platform)
原文网址:http://blog.csdn.net/chenyafei617/article/details/6570928 一.Introduction 今天我们就来谈谈如何在Ubuntu平台上面编 ...
- Ubuntu server 14.04 交叉编译Unicorn-engine
Ubuntu server 14.04 交叉编译Unicorn-engine 编译的过程基本上按照的是unicorn/COMPILE-WINDOWS.md描述的进行编译的,不过还是改了一些地方.在Ub ...
- u盘安装ubuntu10.04 server.txt
10.04 先将 ubuntu server 的 iso 放到优盘上,然后在提示无法找到光驱时,按 alt+f2 打开一个新的 console 窗口,将 iso mount 上,具体操作如下: ls ...
随机推荐
- Python: 合并拼接字符串join()| format() | +
将几个小字符串合并成为一个大的字符串 1如果合并的是一个序列,最快的方式是使用join()方法 >>> parts = ['Is', 'Chicago', 'Not', 'Chica ...
- MIPI接口LCD屏调试心得(转)
源: MIPI接口LCD屏调试心得
- pyDay2
内容来自廖雪峰的官方网站 1.dict 为什么dict查找速度这么快?因为dict的实现原理和查字典是一样的.假设字典包含了1万个汉字,我们要查某一个字,一个办法是把字典从第一页往后翻,直到找到我们想 ...
- 05: MySQLdb 原生SQL语句操作数据库
1.1 MySQLdb安装与简介 1.MySQLdb 模块的安装(python3中目前这个模块还不可用)参考博客 1. linux: yum install MySQL-python 2. windo ...
- PN结讲解
可能大家在使用半导体器件的时候只是在使用它的电气属性,并没有很好的关心下它是什么原因才有了这样的电气属性,那么我们本篇就从物理结构分析下PN结吧. 首先看一张比较陈旧的图图: (就按自己的笔记简单谈谈 ...
- 在Windows下搭建Android开发环境及遇到的问题
转载1:http://www.cnblogs.com/xdp-gacl/p/4322165.html 转载2:http://www.cnblogs.com/zoupeiyang/p/4034517.h ...
- RNN网络【转】
本文转载自:https://zhuanlan.zhihu.com/p/29212896 简单的Char RNN生成文本 Sherlock I want to create some new thing ...
- jz2440-linux3.4.2-kernel移植【学习笔记】【原创】
平台:jz2440 作者:庄泽彬(欢迎转载,请注明作者) 说明:韦东山二期视频学习笔记 交叉编译工具:arm-linux-gcc (GCC)4.3.2 linux:linu3.4.2 PC环境:ubu ...
- SpringBoot中使用mybatis-generator自动生产
步骤: 1.在pom.xml中添加插件配置 <plugin> <groupId>org.mybatis.generator</groupId> <artifa ...
- SQL NULL
表 select CHARACTER_MAXIMUM_LENGTH from information_schema.columns where table_name= 'Alliance' selec ...