ccRTP简介:
GitHub主页:https://github.com/dyfet/ccrtp
前提条件:
如果没有安装GNU Toolchain或其他必要软件,请安装。比如:
sudo apt-get install binutils automake* autoconf* libtool texinfo
下载源码:
- cd /home/yasi
- wget https://github.com/dyfet/ccrtp/archive/master.zip .
- unzip master.zip
安装依赖的commoncpp库:
- 在 https://ftp.gnu.org/gnu/commoncpp/ 找到最新的包 https://ftp.gnu.org/gnu/commoncpp/ucommon-6.3.1.tar.gz
- cd /home/yasi
- wget https://ftp.gnu.org/gnu/commoncpp/ucommon-6.3.1.tar.gz .
- unzip ucommon-6.3.1.tar.gz
- cd ucommon-6.3.1
- ./autogen.sh (生成configure文件)
- ./configure
- sudo make && make check && make install (没有sudo的话,make install 会失败的)
Build ccRTP:
先前已经安装下载解压到了/home/yasi/master 路径下
- cd /home/yasi/master
- ./autogen.sh (生成configure文件)
- ./configure
- sudo make && make check && make install (没有sudo的话,make install 会失败的)
CentOS上的安装:
步骤与Ubuntu类似,只是 apt-get install 改成 yum install,但是遇到一些问题。
问题一:
即使commoncpp已经做过了make install,在ccrtp的configure阶段仍然出现下面的提示
checking for COMMONCPP... configure: error: Package requirements (commoncpp >= 6.2.2) were not met:
No package 'commoncpp' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables COMMONCPP_CFLAGS
and COMMONCPP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
解决方法:
参考《简述configure、pkg-config、pkg_config_path三者的关系》
1)查找commoncpp.pc文件安装路径,比如执行 sudo updatedb && locate commoncpp.pc 得到 /usr/local/lib/pkgconfig/commoncpp.pc,则安装路径为 /usr/local/lib/pkgconfig/,执行 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
2)然后再 cd /home/yasi/mast && ./configure
问题二:
对ccrtp做make时,出现下面错误提示。
make[2]: Entering directory `/home/yasi/ccrtp-master/doc'
restore=: && backupdir=".am$$" && \
am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
rm -rf $backupdir && mkdir $backupdir && \
if (/bin/sh /home/yasi/ccrtp-master/autoconf/missing --run makeinfo --version) >/dev/null 2>&1; then \
for f in ccrtp.info ccrtp.info-[0-9] ccrtp.info-[0-9][0-9] ccrtp.i[0-9] ccrtp.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
cd "$am__cwd"; \
if /bin/sh /home/yasi/ccrtp-master/autoconf/missing --run makeinfo --no-warn -I . \
-o ccrtp.info ccrtp.texi; \
then \
rc=0; \
CDPATH="${ZSH_VERSION+.}:" && cd .; \
else \
rc=$?; \
CDPATH="${ZSH_VERSION+.}:" && cd . && \
$restore $backupdir/* `echo "./ccrtp.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
/home/yasi/ccrtp-master/autoconf/missing: line 52: makeinfo: command not found
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[2]: *** [ccrtp.info] Error 1
make[2]: Leaving directory `/home/yasi/ccrtp-master/doc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/yasi/ccrtp-master'
make: *** [all] Error 2
解决方法:
原因在于makeinfo没有安装,这里的makeinfo安装时的名字叫做texinfo。
执行 sudo yum install texinfo安装即可
问题三:
ccrtp做make时,遇到下面错误
Making all in demo
make[2]: Entering directory `/home/yasi/ccrtp-master/demo'
g++ -DHAVE_CONFIG_H -I. -I.. -fno-strict-aliasing -Wall -ansi -pedantic -I../src -I../src/ccrtp -g -O2 -Wno-long-long -pthread -fno-check-new -finline -fvisibility=hidden -c -o rtpsend.o rtpsend.cpp
/bin/sh ../libtool --tag=CXX --mode=link g++ -fno-strict-aliasing -Wall -ansi -pedantic -I../src -I../src/ccrtp -g -O2 -Wno-long-long -pthread -fno-check-new -finline -fvisibility=hidden -o rtpsend rtpsend.o ../src/libccrtp.la -lcommoncpp -lucommon -lrt -ldl -lpthread -lcrypto -lcrypto
libtool: link: g++ -fno-strict-aliasing -Wall -ansi -pedantic -I../src -I../src/ccrtp -g -O2 -Wno-long-long -pthread -fno-check-new -finline -fvisibility=hidden -o .libs/rtpsend rtpsend.o ../src/.libs/libccrtp.so -lcommoncpp -lucommon -lrt -ldl -lpthread -lcrypto -pthread -Wl,-rpath -Wl,/usr/local/lib
../src/.libs/libccrtp.so: undefined reference to `Twofish_encrypt'
../src/.libs/libccrtp.so: undefined reference to `Twofish_initialise'
../src/.libs/libccrtp.so: undefined reference to `Twofish_prepare_key'
collect2: ld returned 1 exit status
make[2]: *** [rtpsend] Error 1
make[2]: Leaving directory `/home/yasi/ccrtp-master/demo'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/yasi/ccrtp-master'
make: *** [all] Error 2
?