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 总结的更多相关文章

  1. ubuntu10.04编译安装LAMP

    ubuntu10.04编译安装LAMP以及简单wordpress的使用 : http://linuxme.blog.51cto.com/1850814/971631 一.源码安装LAMP 网上有一堆关 ...

  2. ubuntu10.04下修改mysql的datadir的问题

    ubuntu10.04下修改mysql的datadir的问题 转自:http://blog.sina.com.cn/s/blog_4152a9f50100mq5i.html 昨天由于服务器空间告紧,需 ...

  3. ubuntu10.04+win7双系统,重装win7后,恢复grub引导菜单以及命令行引导linux

    我在我的小Y上安装了ubuntu10.04和win7旗舰版的双系统,采用的是grub引导.今天win7不知道哪儿出了问题,windows update更新一直报错,(当然360也是打不上滴)网上查了很 ...

  4. ubuntu10.04编译内核不显示grub菜单解决

    问题描述:        ubuntu10.04 内核版本2.6.32.28编译内核之后版本2.6.37.6,系统在编译完内核之后,不显示grub菜单 参考资料:            http:// ...

  5. ubuntu10.04共享文件夹

    ubuntu10.04共享文件夹 参考http://jingyan.baidu.com/album/9989c746084c70f648ecfe99.html,共享了home文件夹,然后把共享文件夹映 ...

  6. ubuntu10.04版本下android源码的编译

    首先是网址:http://software.intel.com/en-us/blogs/2012/03/06/hands-on-notesbuild-android-x86-ics-4-virtual ...

  7. 【转】Ubuntu10.04上编译Android源码(Build Android source in Ubuntu10.04 Platform)

    原文网址:http://blog.csdn.net/chenyafei617/article/details/6570928 一.Introduction 今天我们就来谈谈如何在Ubuntu平台上面编 ...

  8. Ubuntu server 14.04 交叉编译Unicorn-engine

    Ubuntu server 14.04 交叉编译Unicorn-engine 编译的过程基本上按照的是unicorn/COMPILE-WINDOWS.md描述的进行编译的,不过还是改了一些地方.在Ub ...

  9. u盘安装ubuntu10.04 server.txt

    10.04 先将 ubuntu server 的 iso 放到优盘上,然后在提示无法找到光驱时,按 alt+f2 打开一个新的 console 窗口,将 iso mount 上,具体操作如下: ls ...

随机推荐

  1. Hive 常用优化参数

    常用调优测试语句 :    ①显示当前hive环境的参数值: set 参数名; 如:   hive> set mapred.map.tasks;mapred.map.tasks;   ②设置hi ...

  2. 修改MySQL数据库中表和表中字段的编码方式的方法

    今天向MySQL数据库中的一张表添加含有中文的数据,可是老是出异常,检查程序并没有发现错误,无奈呀,后来重新检查这张表发现表的编码方式为latin1并且原想可以插入中文的字段的编码方式也是latin1 ...

  3. Instagram 在 PyCon 2017 的演讲摘要

    Instagram 在 PyCon 2017 的演讲摘要 PyCon 简介 PyCon 是全世界最大的以 Python 编程语言 为主题的技术大会.大会由 Python 社区组织,每年举办一次.在大会 ...

  4. MySQL数据库----单表查询

    先创建表 #创建表 create table employee( id int not null unique auto_increment, name varchar(20) not null, s ...

  5. 深入浅出JavaScript运行机制

    一.引子 本文介绍JavaScript运行机制,这一部分比较抽象,我们先从一道面试题入手: console.log(1); setTimeout(function(){ console.log(3); ...

  6. .NET,ASP.NET,ASP.NET MVC 之间的区别

    https://www.cnblogs.com/wwym/p/5555772.html

  7. cojs DAG计数问题1-4 题解报告

    最近突然有很多人来问我这些题目怎么做OwO 然而并不是我出的,结论我也不是很懂 研究了一下觉得非常的一颗赛艇,于是就打算写这样一篇题解 DAG 1 我们考虑DAG的性质,枚举出度为0的点 设出度为0的 ...

  8. Linux系统安装telnet以及xinetd服务

    Linux系统安装telnet以及xinetd服务 一.安装telnet 1.检测telnet-server的rpm包是否安装 # rpm -qa telnet-server 若无输入内容,则表示没有 ...

  9. RabbitMQ详解(一)------简介与安装(Docker)

    RABBITMQ详解(一)------简介与安装(DOCKER) 刚刚进入实习,在学习过程中没有接触过MQ,RabbitMQ 这个消息中间件,正好公司最近的项目中有用到,学习了解一下. 首先什么是MQ ...

  10. 20145208 蔡野《网络对抗》shellcode注入&Return-to-libc攻击深入

    20145208 蔡野<网络对抗>shellcode注入&Return-to-libc攻击深入 Shellcode注入 shellcode的获取代码 我使用了许心远同学博客中的代码 ...