ubuntu10.04 Cross-Compiling ARIA2 summary

Source: Internet
Author: User

1) After Google, find this https://github.com/z24/pitv/tree/master/cross script,

Feel very good. And ready to be compiled.

2) Install cross compiler

sudo Install gcc-arm-linux-gnueabihfsudoinstall G++-ARM-LINUX-GNUEABIHF

In particular, it is important to note that g++ must be installed. Before the installation, there have been a variety of puzzling errors, almost gave up

For example, obviously expat compiled good, but in configure aria2 time, just can't find.

Also, in the last link stage, a undefined reference error occurred

3) http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz because there is a wall, automatic download can not, need another FQ download.

4) The last modified compilation script.

#!/bin/SH# This script downloads and builds a static aria2 binary forRaspberry pi.# Copyright theYoujie Zhou <[email protected]># All rights reserved. CWD=$(pwd) Export ARCH=Armexport njob=4Export 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 weInstallbuilt binaries and libraries. Local_dir=$(Readlink-F./local)mkdir-p ${local_dir}# Cross-compiler tools. Latest version can be downloaded at:# github.com/raspberrypi/Toolstool_dir=/Usrtool_bin_dir=${tool_dir}/BinPath=${tool_bin_dir}: $PATH # zlibRM-RF zlib-1.2.8#wgethttp//zlib.net/zlib-1.2.8.tar.gz./TarXzf zlib*.Tar. GZCD zlib*/prefix=${local_dir} CC=${TOOL_CC} cflags="-o4"./configure--Static Make-J${njob} Make InstallCD ${cwd}# ExpatRM-RF expat-2.1.0#wgethttp//downloads.sourceforge.net/expat/2.1.0/expat-2.1.0.tar.gz./TarXzf expat*.Tar. GZCD Expat*/./Configure--host=arm-linux-GNUEABIHF--build=${arch}-Linux--enable-shared=No--enable-static=Yes--prefix=${local_dir} Make-J${njob} Make InstallCD ${cwd}# C-AresRM-RF c-ares-1.10.0#wgethttp//c-ares.haxx.se/download/c-ares-1.10.0.tar.gz./TarXzf c-ares*.Tar. GZCD C-ares*/./Configure--host=arm-linux-GNUEABIHF--build=${arch}-Linux--enable-shared=No--enable-static=Yes--prefix=${local_dir} Make-J${njob} Make InstallCD ${cwd}# aria2RM-RF aria2-1.18.Ten#wgethttp//downloads.sourceforge.net/aria2/aria2-1.18.10.tar.xz./TarXJF aria2*.Tar. XZCD 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 Cross-Compiling ARIA2 summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.