从 https://github.com/aria2/aria2 下载的源代码,依赖包已经安装 在 Cent os 下使用命令
yum install gnutls-devel nettle-devel gmp-devel libssh2-devel c-ares-devel libxml2-devel zlib-devel sqlite-devel pkgconfig libgcrypt-devel libssl-devel libtool autoconf automake autotools autopoint
./configure
后显示信息如下
version: 1.0.1-DEV shared 0:1:0
Host type: x86_64-pc-linux-gnu
Install prefix: /usr/local
C compiler: gcc
CFlags: -g -O2
Library types: Shared=yes, Static=yes
CUnit: no
Nettle: yes
Build examples: yes
configure: summary of build options:
Build: x86_64-pc-linux-gnu
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Install prefix: /usr/local
CC: gcc
CXX: g++
CPP: gcc -E
CXXFLAGS: -g -O2
CFLAGS: -g -O2
CPPFLAGS:
LDFLAGS:
LIBS:
DEFS: -DHAVE_CONFIG_H
CXX1XCXXFLAGS: -std=c++11
EXTRACXXFLAGS: -pipe
EXTRACFLAGS: -pipe
EXTRACPPFLAGS:
EXTRALDFLAGS:
EXTRALIBS:
WARNCXXFLAGS:
LibUV: no (CFLAGS='' LIBS='')
SQLite3: yes (CFLAGS=' ' LIBS='-lsqlite3 ')
SSL Support: yes
AppleTLS: no (LDFLAGS='')
WinTLS: no (LIBS='')
GnuTLS: yes (CFLAGS='-I/usr/include/p11-kit-1 ' LIBS='-lgnutls ')
OpenSSL: no (CFLAGS='' LIBS='')
CA Bundle:
LibNettle: yes (CFLAGS=' ' LIBS='-lnettle ')
LibGmp: yes (CFLAGS='' LIBS='-lgmp')
LibGcrypt: no (CFLAGS='' LIBS='')
LibXML2: yes (CFLAGS='-I/usr/include/libxml2 ' LIBS='-lxml2 ')
LibExpat: no (CFLAGS='' LIBS='')
LibCares: yes (CFLAGS=' ' LIBS='-lcares ')
Zlib: yes (CFLAGS=' ' LIBS='-lz ')
Libssh2: yes (CFLAGS=' ' LIBS='-lssh2 ')
Tcmalloc: no (CFLAGS='' LIBS='')
Jemalloc: no (CFLAGS='' LIBS='')
Epoll: yes
Bittorrent: yes
Metalink: yes
XML-RPC: yes
Message Digest: libnettle
WebSocket: yes (CFLAGS='-I$(top_builddir)/deps/wslay/lib/includes -I$(top_srcdir)/deps/wslay/lib/includes' LIBS='$(top_builddir)/deps/wslay/lib/libwslay.la')
Libaria2: no (shared=yes static=no)
bash_completion dir: ${datarootdir}/doc/${PACKAGE_TARNAME}/bash_completion
Static build: no
make 之后在 src 目录里面找到 aria2c,但是体积有 70 多 MB,通过 yum 安装的只有 2MB,但是 yum 安装的版本特别低。 编译安装的在后台运行的时候占用内存达到 200MB,yum 安装的后台占用只有 10MB 左右。 百度,谷歌都已经问过。 请问一下怎么编译才能编译出 yum 安装的那样的小体积程序?
1
julyclyde 2018-04-13 22:06:23 +08:00
把-g 去掉?
|
2
SupperMary OP @julyclyde 改 makefile ?
|
3
messyidea 2018-04-13 22:22:31 +08:00
strip -s aria2c
|