diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index 15efa6fe7..dc7932f9c 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -46,12 +46,6 @@ fi if [ $SRS_X86_X64 = YES ]; then srs_define_macro "SRS_X86_X64" $SRS_AUTO_HEADERS_H fi -if [ $SRS_ARM_UBUNTU12 = YES ]; then - srs_define_macro "SRS_ARM_UBUNTU12" $SRS_AUTO_HEADERS_H -fi -if [ $SRS_MIPS_UBUNTU12 = YES ]; then - srs_define_macro "SRS_MIPS_UBUNTU12" $SRS_AUTO_HEADERS_H -fi if [ $SRS_PI = YES ]; then srs_define_macro "SRS_PI" $SRS_AUTO_HEADERS_H fi @@ -69,15 +63,6 @@ echo "" >> $SRS_AUTO_HEADERS_H ##################################################################################### # generate auto headers file, depends on the finished of options.sh ##################################################################################### -# write to source file -if [ $SRS_CROSS_BUILD = YES ]; then - __TOOL_CHAIN="cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB" && echo "$__TOOL_CHAIN" - srs_define_macro_value "SRS_AUTO_EMBEDED_TOOL_CHAIN" "\"$__TOOL_CHAIN\"" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_AUTO_EMBEDED_TOOL_CHAIN" $SRS_AUTO_HEADERS_H -fi -echo "" >> $SRS_AUTO_HEADERS_H - # auto headers in depends. if [ $SRS_NGINX = YES ]; then srs_define_macro "SRS_AUTO_NGINX" $SRS_AUTO_HEADERS_H @@ -147,27 +132,6 @@ fi ##################################################################################### # for embeded. ##################################################################################### -if [ $SRS_CROSS_BUILD = YES ]; then - srs_define_macro "SRS_AUTO_EMBEDED_CPU" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_AUTO_EMBEDED_CPU" $SRS_AUTO_HEADERS_H -fi - -# arm -if [ $SRS_ARM_UBUNTU12 = YES ]; then - srs_define_macro "SRS_AUTO_ARM_UBUNTU12" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_AUTO_ARM_UBUNTU12" $SRS_AUTO_HEADERS_H -fi - -# mips -if [ $SRS_MIPS_UBUNTU12 = YES ]; then - srs_define_macro "SRS_AUTO_MIPS_UBUNTU12" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_AUTO_MIPS_UBUNTU12" $SRS_AUTO_HEADERS_H -fi - -echo "" >> $SRS_AUTO_HEADERS_H # for log level compile settings if [ $SRS_LOG_VERBOSE = YES ]; then srs_define_macro "SRS_AUTO_VERBOSE" $SRS_AUTO_HEADERS_H diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 96f395fbe..613e2fd47 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -45,24 +45,6 @@ function Ubuntu_prepare() fi fi fi - - # cross build for arm, install the cross build tool chain. - if [ $SRS_ARM_UBUNTU12 = YES ]; then - $SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then - echo "Installing gcc-arm-linux-gnueabi g++-arm-linux-gnueabi." - require_sudoer "sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi" - sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi - echo "The gcc-arm-linux-gnueabi g++-arm-linux-gnueabi are installed." - fi - fi - - # cross build for mips, user must installed the tool chain. - if [ $SRS_MIPS_UBUNTU12 = YES ]; then - $SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then - echo "You must install the tool chain: $SrsArmCC" - return 2 - fi - fi OS_IS_UBUNTU=YES echo "Installing tools for Ubuntu." @@ -168,12 +150,6 @@ function Centos_prepare() if [[ ! -f /etc/redhat-release ]]; then return 0; fi - - # cross build for arm, install the cross build tool chain. - if [ $SRS_CROSS_BUILD = YES ]; then - echo "CentOS doesn't support crossbuild for arm/mips, please use Ubuntu instead." - return 1 - fi OS_IS_CENTOS=YES echo "Installing tools for Centos." @@ -291,12 +267,6 @@ function OSX_prepare() fi return 0; fi - - # cross build for arm, install the cross build tool chain. - if [ $SRS_CROSS_BUILD = YES ]; then - echo "OSX doesn't support crossbuild for arm/mips, please use Ubuntu instead." - return 1 - fi OS_IS_OSX=YES echo "Installing tools for OSX." @@ -455,37 +425,19 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then _ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DMD_VALGRIND" fi # Patched ST from https://github.com/ossrs/state-threads/tree/srs - if [ $SRS_CROSS_BUILD = YES ]; then - # ok, arm specified, if the flag filed does not exists, need to rebuild. - if [[ -f ${SRS_OBJS}/_flag.st.cross.build.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then - echo "The state-threads for arm is ok."; - else - echo "Building state-threads for arm."; - ( - rm -rf ${SRS_OBJS}/state-threads-1.9.1 && cd ${SRS_OBJS} && - tar xf ../3rdparty/state-threads-1.9.1.tar.gz && cd state-threads-1.9.1 && chmod +w * && - patch -p0 < ../../3rdparty/patches/6.st.osx10.14.build.patch && - make ${_ST_MAKE} CC=${SrsArmCC} AR=${SrsArmAR} LD=${SrsArmLD} RANDLIB=${SrsArmRANDLIB} EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" && - cd .. && rm -f st && ln -sf state-threads-1.9.1/obj st && - rm -f state-threads && ln -sf state-threads-1.9.1 state-threads && - cd .. && touch ${SRS_OBJS}/_flag.st.cross.build.tmp - ) - fi + if [[ ! -f ${SRS_OBJS}/_flag.st.cross.build.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then + echo "The state-threads is ok."; else - if [[ ! -f ${SRS_OBJS}/_flag.st.cross.build.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then - echo "The state-threads is ok."; - else - echo "Building state-threads."; - ( - rm -rf ${SRS_OBJS}/state-threads-1.9.1 && cd ${SRS_OBJS} && - tar xf ../3rdparty/state-threads-1.9.1.tar.gz && cd state-threads-1.9.1 && chmod +w * && - patch -p0 < ../../3rdparty/patches/6.st.osx10.14.build.patch && - make ${_ST_MAKE} EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" && - cd .. && rm -f st && ln -sf state-threads-1.9.1/obj st && - rm -f state-threads && ln -sf state-threads-1.9.1 state-threads && - cd .. && rm -f ${SRS_OBJS}/_flag.st.cross.build.tmp - ) - fi + echo "Building state-threads."; + ( + rm -rf ${SRS_OBJS}/state-threads-1.9.1 && cd ${SRS_OBJS} && + tar xf ../3rdparty/state-threads-1.9.1.tar.gz && cd state-threads-1.9.1 && chmod +w * && + patch -p0 < ../../3rdparty/patches/6.st.osx10.14.build.patch && + make ${_ST_MAKE} EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" && + cd .. && rm -f st && ln -sf state-threads-1.9.1/obj st && + rm -f state-threads && ln -sf state-threads-1.9.1 state-threads && + cd .. && rm -f ${SRS_OBJS}/_flag.st.cross.build.tmp + ) fi # check status ret=$?; if [[ $ret -ne 0 ]]; then echo "Build state-threads failed, ret=$ret"; exit $ret; fi @@ -508,7 +460,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then mkdir -p ${SRS_OBJS}/nginx fi # make nginx -__SRS_BUILD_NGINX=NO; if [ $SRS_CROSS_BUILD = NO ]; then if [ $SRS_NGINX = YES ]; then __SRS_BUILD_NGINX=YES; fi fi +__SRS_BUILD_NGINX=NO; if [ $SRS_NGINX = YES ]; then __SRS_BUILD_NGINX=YES; fi if [ $__SRS_BUILD_NGINX = YES ]; then if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then echo "The nginx-1.5.7 is ok."; @@ -615,9 +567,6 @@ fi ##################################################################################### # extra configure options CONFIGURE_TOOL="./config" -if [ $SRS_CROSS_BUILD = YES ]; then - CONFIGURE_TOOL="./Configure linux-armv4" -fi if [ $SRS_OSX = YES ]; then CONFIGURE_TOOL="./Configure darwin64-`uname -m`-cc" fi @@ -635,39 +584,19 @@ if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then echo "Warning: Use system libssl, without compiling openssl." else - # check the cross build flag file, if flag changed, need to rebuild the st. - if [ $SRS_CROSS_BUILD = YES ]; then - # ok, arm specified, if the flag filed does not exists, need to rebuild. - if [[ -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then - echo "The openssl-1.1.0e for arm is ok."; - else - echo "Building openssl-1.1.0e for ARM."; - ( - rm -rf ${SRS_OBJS}/openssl-1.1.0e && cd ${SRS_OBJS} && - unzip -q ../3rdparty/openssl-1.1.0e.zip && cd openssl-1.1.0e && - $CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared no-asm no-threads $OPENSSL_HOTFIX && - make CC=${SrsArmCC} GCC=${SrsArmGCC} AR="${SrsArmAR} r" \ - LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} && - make install_sw && - cd .. && rm -rf openssl && ln -sf openssl-1.1.0e/_release openssl && - cd .. && touch ${SRS_OBJS}/_flag.ssl.cross.build.tmp - ) - fi + # cross build not specified, if exists flag, need to rebuild for no-arm platform. + if [[ ! -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then + echo "Openssl-1.1.0e is ok."; else - # cross build not specified, if exists flag, need to rebuild for no-arm platform. - if [[ ! -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then - echo "Openssl-1.1.0e is ok."; - else - echo "Building openssl-1.1.0e."; - ( - rm -rf ${SRS_OBJS}/openssl-1.1.0e && cd ${SRS_OBJS} && - unzip -q ../3rdparty/openssl-1.1.0e.zip && cd openssl-1.1.0e && - $CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared no-threads $OPENSSL_HOTFIX && - make && make install_sw && - cd .. && rm -rf openssl && ln -sf openssl-1.1.0e/_release openssl && - cd .. && rm -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp - ) - fi + echo "Building openssl-1.1.0e."; + ( + rm -rf ${SRS_OBJS}/openssl-1.1.0e && cd ${SRS_OBJS} && + unzip -q ../3rdparty/openssl-1.1.0e.zip && cd openssl-1.1.0e && + $CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared no-threads $OPENSSL_HOTFIX && + make && make install_sw && + cd .. && rm -rf openssl && ln -sf openssl-1.1.0e/_release openssl && + cd .. && rm -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp + ) fi # check status ret=$?; if [[ $ret -ne 0 ]]; then echo "Build openssl-1.1.0e failed, ret=$ret"; exit $ret; fi diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 8921ecadf..853640016 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -76,10 +76,6 @@ SRS_X86_X64=NO # for osx system SRS_OSX=NO SRS_ALLOW_OSX=NO -# armhf(v7cpu) built on ubuntu12 -SRS_ARM_UBUNTU12=NO -# mips built on ubuntu12 -SRS_MIPS_UBUNTU12=NO # dev, open all features for dev, no gperf/prof/arm. SRS_DEV=NO # dev, open main server feature for dev, no utest/research/librtmp @@ -99,7 +95,8 @@ SRS_DISABLE_ALL=NO # all features is on SRS_ENABLE_ALL=NO # -################################################################ +##################################################################################### +# We don't support crossbuild for ARM/MIPS, please directly build it on ARM/MIPS server. # whether cross build for embed cpu, arm/mips SRS_CROSS_BUILD=NO @@ -236,8 +233,8 @@ function parse_user_option() { --with-gmp) SRS_GPERF_MP=YES ;; --with-gcp) SRS_GPERF_CP=YES ;; --with-gprof) SRS_GPROF=YES ;; - --with-arm-ubuntu12) SRS_ARM_UBUNTU12=YES ;; - --with-mips-ubuntu12) SRS_MIPS_UBUNTU12=YES ;; + --with-arm-ubuntu12) SRS_CROSS_BUILD=YES ;; + --with-mips-ubuntu12) SRS_CROSS_BUILD=YES ;; --without-ssl) SRS_SSL=NO ;; --without-hds) SRS_HDS=NO ;; @@ -256,8 +253,8 @@ function parse_user_option() { --without-gmp) SRS_GPERF_MP=NO ;; --without-gcp) SRS_GPERF_CP=NO ;; --without-gprof) SRS_GPROF=NO ;; - --without-arm-ubuntu12) SRS_ARM_UBUNTU12=NO ;; - --without-mips-ubuntu12) SRS_MIPS_UBUNTU12=NO ;; + --without-arm-ubuntu12) SRS_CROSS_BUILD=NO ;; + --without-mips-ubuntu12) SRS_CROSS_BUILD=NO ;; --jobs) SRS_JOBS=${value} ;; --prefix) SRS_PREFIX=${value} ;; @@ -271,8 +268,8 @@ function parse_user_option() { --x86-64) SRS_X86_X64=YES ;; --osx) SRS_OSX=YES ;; --allow-osx) SRS_ALLOW_OSX=YES ;; - --arm) SRS_ARM_UBUNTU12=YES ;; - --mips) SRS_MIPS_UBUNTU12=YES ;; + --arm) SRS_CROSS_BUILD=YES ;; + --mips) SRS_CROSS_BUILD=YES ;; --pi) SRS_PI=YES ;; --cubie) SRS_CUBIE=YES ;; --dev) SRS_DEV=YES ;; @@ -341,40 +338,11 @@ function apply_user_presets() { SRS_LOG_TRACE=YES # set default preset if not specifies - if [ $SRS_PURE_RTMP = NO ]; then - if [ $SRS_FAST = NO ]; then - if [ $SRS_DISABLE_ALL = NO ]; then - if [ $SRS_ENABLE_ALL = NO ]; then - if [ $SRS_DEV = NO ]; then - if [ $SRS_FAST_DEV = NO ]; then - if [ $SRS_DEMO = NO ]; then - if [ $SRS_ARM_UBUNTU12 = NO ]; then - if [ $SRS_MIPS_UBUNTU12 = NO ]; then - if [ $SRS_PI = NO ]; then - if [ $SRS_CUBIE = NO ]; then - if [ $SRS_X86_X64 = NO ]; then - if [ $SRS_OSX = NO ]; then - SRS_X86_X64=YES; opt="--x86-x64 $opt"; - fi - fi - fi - fi - fi - fi - fi - fi - fi - fi - fi - fi - fi - - # whether embeded cpu. - if [ $SRS_ARM_UBUNTU12 = YES ]; then - SRS_CROSS_BUILD=YES - fi - if [ $SRS_MIPS_UBUNTU12 = YES ]; then - SRS_CROSS_BUILD=YES + if [[ $SRS_PURE_RTMP == NO && $SRS_FAST == NO && $SRS_DISABLE_ALL == NO && $SRS_ENABLE_ALL == NO && \ + $SRS_DEV == NO && $SRS_FAST_DEV == NO && $SRS_DEMO == NO && $SRS_PI == NO && $SRS_CUBIE == NO && \ + $SRS_X86_X64 == NO && $SRS_OSX == NO \ + ]]; then + SRS_X86_X64=YES; opt="--x86-x64 $opt"; fi # all disabled. @@ -421,29 +389,6 @@ function apply_user_presets() { SRS_STATIC=NO fi - # if arm specified, set some default to disabled. - if [ $SRS_ARM_UBUNTU12 = YES ]; then - SRS_HDS=YES - SRS_NGINX=NO - SRS_FFMPEG_TOOL=NO - SRS_LIBRTMP=YES - SRS_RESEARCH=NO - SRS_UTEST=NO - # TODO: FIXME: need static? maybe donot. - SRS_STATIC=YES - fi - - # if mips specified, set some default to disabled. - if [ $SRS_MIPS_UBUNTU12 = YES ]; then - SRS_HDS=YES - SRS_NGINX=NO - SRS_FFMPEG_TOOL=NO - SRS_LIBRTMP=YES - SRS_RESEARCH=NO - SRS_UTEST=NO - SRS_STATIC=NO - fi - # defaults for x86/x64 if [ $SRS_X86_X64 = YES ]; then SRS_HDS=YES @@ -618,8 +563,6 @@ SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}" if [ $SRS_GPERF_MP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmp"; fi if [ $SRS_GPERF_CP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gcp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gcp"; fi if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gprof"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gprof"; fi - if [ $SRS_ARM_UBUNTU12 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-arm-ubuntu12"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-arm-ubuntu12"; fi - if [ $SRS_MIPS_UBUNTU12 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-mips-ubuntu12"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-mips-ubuntu12"; fi if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi if [ $SRS_LOG_VERBOSE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-verbose"; fi if [ $SRS_LOG_INFO = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info"; fi @@ -634,6 +577,18 @@ regenerate_options # check user options ##################################################################################### function check_option_conflicts() { + if [ $SRS_CROSS_BUILD = YES ]; then + echo "We don't support crossbuild for ARM/MIPS, please directly build it on ARM/MIPS server." + exit -1 + fi + + if [ $SRS_OSX = YES ]; then + echo "We don't support OSX, please use docker https://github.com/ossrs/srs-docker" + exit -1 + fi + + # TODO: FIXME: check more os. + __check_ok=YES # check conflict if [ $SRS_GPERF = NO ]; then @@ -658,35 +613,6 @@ function check_option_conflicts() { echo "gmc/gmp/gcp not compatible with gprof, see: ./configure --help"; __check_ok=NO; fi fi - # check embeded(arm/mips), if embeded enabled, only allow st/ssl/librtmp, - # user should disable all other features - if [ $SRS_CROSS_BUILD = YES ]; then - if [ $SRS_FFMPEG_TOOL = YES ]; then echo "ffmpeg for arm is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_RESEARCH = YES ]; then echo "research for arm is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF = YES ]; then echo "gperf for arm is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF_MC = YES ]; then echo "gmc for arm is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF_MD = YES ]; then echo "gmd for arm is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF_MP = YES ]; then echo "gmp for arm is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF_CP = YES ]; then echo "gcp for arm is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPROF = YES ]; then echo "gprof for arm is not available, see: ./configure --help"; __check_ok=NO; fi - fi - - # osx not support gperf. - if [ $SRS_OSX = YES ]; then - if [ $SRS_GPERF = YES ]; then echo "gperf for osx is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF_MC = YES ]; then echo "gmc for osx is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF_MD = YES ]; then echo "gmd for osx is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF_MP = YES ]; then echo "gmp for osx is not available, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_GPERF_CP = YES ]; then echo "gcp for osx is not available, see: ./configure --help"; __check_ok=NO; fi - fi - - # if osx, never use static - if [[ $SRS_OSX = YES && $SRS_STATIC = YES ]]; then - echo "osx should never use static, see: ./configure --help"; __check_ok=NO; - fi - - # TODO: FIXME: check more os. - # check variable neccessary if [ $SRS_HDS = RESERVED ]; then echo "you must specifies the hds, see: ./configure --help"; __check_ok=NO; fi if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi @@ -702,8 +628,6 @@ function check_option_conflicts() { if [ $SRS_GPERF_MP = RESERVED ]; then echo "you must specifies the gperf-mp, see: ./configure --help"; __check_ok=NO; fi if [ $SRS_GPERF_CP = RESERVED ]; then echo "you must specifies the gperf-cp, see: ./configure --help"; __check_ok=NO; fi if [ $SRS_GPROF = RESERVED ]; then echo "you must specifies the gprof, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_ARM_UBUNTU12 = RESERVED ]; then echo "you must specifies the arm-ubuntu12, see: ./configure --help"; __check_ok=NO; fi - if [ $SRS_MIPS_UBUNTU12 = RESERVED ]; then echo "you must specifies the mips-ubuntu12, see: ./configure --help"; __check_ok=NO; fi if [[ -z $SRS_PREFIX ]]; then echo "you must specifies the prefix, see: ./configure --prefix"; __check_ok=NO; fi if [ $__check_ok = NO ]; then exit 1; diff --git a/trunk/auto/setup_variables.sh b/trunk/auto/setup_variables.sh index d1d643b4f..9d37edbf7 100755 --- a/trunk/auto/setup_variables.sh +++ b/trunk/auto/setup_variables.sh @@ -1,30 +1,3 @@ #!/bin/bash # when options parsed, setup some variables, then build the depends. - -# when arm specified, setup the cross build variables. -if [ $SRS_ARM_UBUNTU12 = YES ]; then - __SrsArmCC="arm-linux-gnueabi-gcc"; - __SrsArmGCC="arm-linux-gnueabi-gcc"; - __SrsArmCXX="arm-linux-gnueabi-g++"; - __SrsArmAR="arm-linux-gnueabi-ar"; - __SrsArmLD="arm-linux-gnueabi-ld"; - __SrsArmRANDLIB="arm-linux-gnueabi-ranlib"; -fi - -if [ $SRS_MIPS_UBUNTU12 = YES ]; then - __SrsArmCC="mipsel-openwrt-linux-gcc"; - __SrsArmGCC="mipsel-openwrt-linux-gcc"; - __SrsArmCXX="mipsel-openwrt-linux-g++"; - __SrsArmAR="mipsel-openwrt-linux-ar"; - __SrsArmLD="mipsel-openwrt-linux-ld"; - __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib"; -fi - -# the arm-ubuntu12 options for make for depends -if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi -if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi -if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi -if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi -if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi -if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi diff --git a/trunk/configure b/trunk/configure index bcffc0dc3..0a8d14f45 100755 --- a/trunk/configure +++ b/trunk/configure @@ -163,10 +163,6 @@ fi if [ $SRS_STATIC = YES ]; then SrsLinkOptions="${SrsLinkOptions} -static"; fi -# if mips, add -lgcc_eh, or stl compile failed. -if [ $SRS_MIPS_UBUNTU12 = YES ]; then - SrsLinkOptions="${SrsLinkOptions} -lgcc_eh"; -fi # For coverage. if [[ $SRS_GCOV == YES ]]; then SrsLinkOptions="${SrsLinkOptions} ${SrsGcov}"; @@ -351,23 +347,10 @@ cat << END > ${SRS_WORKDIR}/${SRS_MAKEFILE} SRS_PREFIX=${SRS_PREFIX} __REAL_INSTALL=\$(DESTDIR)\$(SRS_PREFIX) -END - -# embeded, ubuntu12, use embeded tool chain. -if [ $SRS_CROSS_BUILD = YES ]; then - cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE} -default: - \$(MAKE) GCC=${SrsArmGCC} CXX=${SrsArmCXX} AR=${SrsArmAR} LINK=${SrsArmCXX} _default - -END -# x86/x64, use gnu-gcc/g++ tool chain. -else - cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE} default: \$(MAKE) _default END -fi # the real entry for all platform: # the server, librtmp and utest @@ -687,16 +670,6 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then else echo -e "${GREEN}Note: The gprof(GNU profile tool) is disabled.${BLACK}" fi - if [ $SRS_ARM_UBUNTU12 = YES ]; then - echo -e "${GREEN}The cross-build arm-ubuntu12(armhf, v7cpu) is enabled.${BLACK}" - else - echo -e "${GREEN}Note: The cross-build arm-ubuntu12(armhf, v7cpu)is disabled.${BLACK}" - fi - if [ $SRS_MIPS_UBUNTU12 = YES ]; then - echo -e "${GREEN}The mips-ubuntu12 is enabled.${BLACK}" - else - echo -e "${GREEN}Note: The mips-ubuntu12 is disabled.${BLACK}" - fi if [ $SRS_VALGRIND = YES ]; then echo -e "${GREEN}The valgrind is enabled.${BLACK}" else diff --git a/trunk/src/kernel/srs_kernel_error.cpp b/trunk/src/kernel/srs_kernel_error.cpp index de52f710b..57f8c25c7 100644 --- a/trunk/src/kernel/srs_kernel_error.cpp +++ b/trunk/src/kernel/srs_kernel_error.cpp @@ -28,6 +28,7 @@ #include #include #include +#include using namespace std; bool srs_is_system_control_error(srs_error_t err) @@ -77,7 +78,7 @@ std::string SrsCplxError::description() { next = this; while (next) { - ss << "thread [" << next->cid << "]: " + ss << "thread [" << getpid() << "][" << next->cid << "]: " << next->func << "() [" << next->file << ":" << next->line << "]" << "[errno=" << next->rerrno << "]"; diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index 22932c160..912bf8f02 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -118,16 +118,15 @@ srs_error_t do_main(int argc, char** argv) } // config already applied to log. - srs_trace(RTMP_SIG_SRS_SERVER); - srs_trace("license: " RTMP_SIG_SRS_LICENSE); + srs_trace("%s, %s", RTMP_SIG_SRS_SERVER, RTMP_SIG_SRS_LICENSE); srs_trace("contributors: " SRS_AUTO_CONSTRIBUTORS); - srs_trace("build: %s, configure:%s, uname: %s", SRS_AUTO_BUILD_DATE, SRS_AUTO_USER_CONFIGURE, SRS_AUTO_UNAME); + srs_trace("cwd=%s, work_dir=%s, build: %s, configure: %s, uname: %s", + _srs_config->cwd().c_str(), cwd.c_str(), SRS_AUTO_BUILD_DATE, SRS_AUTO_USER_CONFIGURE, SRS_AUTO_UNAME); srs_trace("configure detail: " SRS_AUTO_CONFIGURE); #ifdef SRS_AUTO_EMBEDED_TOOL_CHAIN srs_trace("crossbuild tool chain: " SRS_AUTO_EMBEDED_TOOL_CHAIN); #endif - srs_trace("cwd=%s, work_dir=%s", _srs_config->cwd().c_str(), cwd.c_str()); - + // for memory check or detect. if (true) { stringstream ss; @@ -249,12 +248,6 @@ void show_macro_features() #ifdef SRS_CUBIE ss << "CubieBoard"; #endif -#ifdef SRS_ARM_UBUNTU12 - ss << "ARM(build on ubuntu)"; -#endif -#ifdef SRS_MIPS_UBUNTU12 - ss << "MIPS(build on ubuntu)"; -#endif #if defined(__amd64__) ss << " amd64";