在海思hisiv100nptl平台上交叉编译并安装SRS
./configure --with-arm-ubuntu12 && make
须要安装:
apt-get installgcc-arm-linux-gnueabi ,但hi3516C是用的arm-hisiv100-nptl-gcc,
须要替换gcc-arm-linux-gnueabi为arm-hisiv100-nptl-gcc
auto# gedit setup_variables.sh,
# when arm specified, setup the cross buildvariables.
if [ $SRS_ARM_UBUNTU12 = YES ]; then
__SrsArmCC="arm-hisiv100nptl-linux-gcc";
__SrsArmGCC="arm-hisiv100nptl-linux-gcc";
__SrsArmCXX="arm-hisiv100nptl-linux-g++";
__SrsArmAR="arm-hisiv100nptl-linux-ar";
__SrsArmLD="arm-hisiv100nptl-linux-ld";
__SrsArmRANDLIB="arm-hisiv100nptl-linux-ranlib";
Fi
但编译build openssl-1.0.1f碰到问题,直接改动Makefile进行单独交叉编译即可。
Make&&makeinstall。
编译时出现链接问题:
/home/ossrs/srs-hisi/trunk/src/protocol/srs_rtmp_utility.cpp:85:undefined reference to `std::basic_string<char,std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/ossrs/srs-hisi/trunk/src/protocol/srs_raw_avc.cpp:538:undefined reference to `operator new[](unsigned int)'
dso_dlfcn.c:(.text+0x1c):undefined reference to `dlopen'
感觉应该是编译工具、链接库出了问题,可能是不兼容。
CPU: ARM926EJ-S[41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT datacache, VIVT instruction cache
Machine: hi3518
按以下的办法改动一下librtmp以下的Makefile中的gcc定义就能够。
Vi research/librtmp/Makefile
GCC= arm-hisiv100nptl-linux-gcc
# for arm.
ifeq ($(GCC),arm-hisiv100nptl-linux-gcc)
EXTRA_CXX_FLAG = -g -O0 -ldl -static-lstdc++
Endif
编译生成
ls objs/srs -l
-rwxr-xr-x 1 rootroot 11307924 2016-01-20 22:59 objs/srs
大小竟然有11M之多,明显没有strip。Strip后有3.6MB。勉强能够接受。
注意:
在x86上面编译,假设-without-ssl的话,能够公布rtmp url成功,但连上去没有流。所以。--with-http-callback –with-ssl必须包含在里面。
安装实施:
# ./srs -cconf/srs.conf
[2016-01-0101:24:43.839][trace][754][0] config parse complete
[2016-01-0101:24:43.904][trace][754][0] write log to file ./objs/srs.log
[2016-01-0101:24:43.904][trace][754][0] you can: tailf ./objs/srs.log
[2016-01-0101:24:43.905][trace][754][0] @see:https://github.com/ossrs/srs/wiki/v1_CN_SrsLog
#
# ../RtxpServer&
# ../RtxpServerbuild time=20160120-2125, log is /tmp/tcpsvr.log.
http://winlinvip.github.io/srs.release/trunk/research/players/srs_player.html?server=192.168.3.1&app=live&stream=0&port=1935
播放rtmp://192.168.3.1:1935/live/0
一切正常!能够看到流。听到声音。
交流请加QQ群: 194257702。
最新文章
- Leetcode 230. Kth Smallest Element in a BST
- linux系统文件权限
- pt-ioprofile分析查看mysql的真实IO情况
- 【BZOJ】【3261】最大异或和
- (转)Yale CAS + .net Client 实现 SSO(4)
- php函数serialize()与unserialize()
- NVL函数(NVL,NVL2,NULLIF,COALESCE)
- WPF&;Winform版本地图引擎
- 上传Jcenter
- scheduleAtFixedRate 与 scheduleWithFixedDelay 的区别
- 单片机的基本构成、工作原理 LET′S TRY“嵌入式编程”: 1 of 6
- target与currentTarget与this的区别
- valueof toString
- locate语法
- linux文件管理之管道与重定向
- Quartus II 安装教程—FPGA入门教程【钛白Logic】
- 解决本地项目推送到码云(github),上提示:failed to push some refs to ...
- ASP.NET找不到类型或命名空间名称怎么办
- 仿微信-ActionSheet
- springMVC的url-pattern /和/*的区别