linux命令lnsrs,SRS 编译安装坑

SRS 编译

start

#./objs/srs -c conf/rtmp.conf

kill

#ps aux | grep srs | awk {'print $2'} | xargs kill

srs 2.0 release

[root@cp01-jinya.epc.baidu.com trunk]#./configure

./configure_origion:line67:syntax error near unexpected token`"`dirname $__mfile`"'

./configure_origion: line 67: `SRS_MODULES+=("`dirname $__mfile`")'

#将configure 的 += 改为数组的 XXX=(${XXX[8]} "sdfsf");应该有 4 处

[root@cp01-jinya.epc.baidu.com trunk]#make

...

srs_ingest_flv.c:262:error:foreachfunctionit appearsin.)

srs_ingest_flv.c:Infunction`re_cleanup':

srs_ingest_flv.c:274: error: `useconds_t' undeclared (first use in this function)

make[3]: *** [objs/srs_ingest_flv] Error 1

make[3]: Leaving directory `/home/forum/srs/trunk/research/librtmp'

make[2]:***[ssl]Error2

make[2]:Leavingdirectory`/home/forum/srs/trunk/research/librtmp'

make[1]: *** [librtmp] Error 2

make[1]: Leaving directory `/home/forum/srs/trunk'

make: *** [default] Error 2

[root@cp01-jinya.epc.baidu.com trunk]# vim objs/include/srs_librtmp.h

#加上声明

// typedefs

typedefint64_tuseconds_t;

typedefintsrs_bool;

...

20160311

升级make

./configure

make

后,make在源文件夹里面。cp到 /usr/bin/下面(注意做好备份)

编译

Makefile:3:***unterminated call tofunction'foreach':missing')'.Stop.

看看是不是有换行,有换行就去掉

http://stackoverflow.com/questions/18989598/makefile-unterminated-call-to-function-foreach-missing-stop

编译–with-ffmpeg

编译第三方库的时候,从auto/里面建立ln -sf 到 objs里

比如 ffmpeg, 从objs/ffmpeg.src里面建立的ln

但是编译ffmpeg的时候,可能会遇到 disable-asm的情况,请确认是x264 问题还是 ffmpeg问题

fdk-aac编译不过

https://github.com/mstorsjo/fdk-aac/issues/6

diff--git a/Makefile.am b/Makefile.am

index e995b0a..efa6fcb100644

---a/Makefile.am

+++b/Makefile.am

@@-13,7+13,7@@AM_CPPFLAGS=\

-I$(top_srcdir)/libPCMutils/include

AM_CXXFLAGS=-fno-exceptions-fno-rtti

-libfdk_aac_la_LINK=$(LINK)$(libfdk_aac_la_LDFLAGS)

+#libfdk_aac_la_LINK=$(LINK)$(libfdk_aac_la_LDFLAGS)

# Mention a dummy pure C file to trigger generation of the $(LINK) variable

nodist_EXTRA_libfdk_aac_la_SOURCES=dummy.c

diff--git a/configure.ac b/configure.ac

index c52d0b9..f489835100644

---a/configure.ac

+++b/configure.ac

@@-19,7+19,11@@AM_CONDITIONAL(EXAMPLE,test x$example=xyes)

dnlChecksforprograms.

AC_PROG_CC

AC_PROG_CXX

-LT_INIT

+

+AM_PROG_CC_C_O

+

+AC_PROG_LIBTOOL

+AC_SUBST(LIBTOOL_DEPS)

AC_CHECK_LIB([m],[sin])

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值