srs icon indicating copy to clipboard operation
srs copied to clipboard

ARM: Feiteng S2500 compilation failed.

Open qzwlinux opened this issue 4 years ago • 7 comments

Description'

Please ensure that the markdown structure is maintained.

Please describe the issue you encountered here. ' Make sure to maintain the markdown structure.

CPU: Feiteng S2500 Operating System: CentOS 7.8 gcc: 4.8.5

When installing SRS on the Feiteng S2500 ARM server, the following issues occur:

  1. SRS version: 4.0-b6
  1. SRS log:
[root@srs trunk]# ./configure
User config: --x86-x64
Detail config: --prefix=/usr/local/srs --config=conf/srs.conf --hls=on --hds=off --dvr=on --ssl=on --https=on --ssl-1-0=off --ssl-local=off --sys-ssl=off --transcode=on --ingest=on --stat=on --http-callback=on --http-server=on --stream-caster=on --http-api=on --utest=off --cherrypy=off --srt=off --rtc=on --simulator=off --cxx11=off --cxx14=off --ffmpeg-fit=on --nasm=on --srtp-nasm=on --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --shared-st=off --shared-srt=off --shared-ffmpeg=off --log-verbose=off --log-info=off --log-trace=on --gcov=off --debug=off --debug-stats=off --cross-build=off --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
SRS_WORKDIR: ., SRS_OBJS_DIR: objs, SRS_OBJS: ./objs, SRS_PLATFORM: Platform-Linux-4.18.0-GCC4.8.5-SRS4-aarch64
Alias python2 as python
Checking gcc/g++/gdb/make.
Required tools are ok.
Installing tools for Centos.
Tools for Centos are installed.
SED is sed_utility
The state-threads is ok.
The openssl-1.1-fit is ok.
The libsrtp-2-fit is ok.
Building opus-1.3.1.
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gcc option to accept ISO C99... -std=gnu99
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking dependency style of gcc -std=gnu99... gcc3
checking for C/C++ restrict keyword... __restrict
checking for C99 variable-size arrays... yes
checking for cos in -lm... yes
checking if compiler supports ARM Neon intrinsics... yes
checking for NE10... no
checking if compiler supports Aarch64 Neon intrinsics... yes
checking if gcc -std=gnu99 supports -fvisibility=hidden... yes
checking whether to add -D_FORTIFY_SOURCE=2 to CFLAGS... yes
checking if gcc -std=gnu99 supports -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes... yes
checking for lrintf... yes
checking for lrint... yes
checking for __malloc_hook... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating opus.pc
config.status: creating opus-uninstalled.pc
config.status: creating celt/arm/armopts.s
config.status: creating doc/Makefile
config.status: creating doc/Doxyfile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure:
------------------------------------------------------------------------
  opus 1.3.1:  Automatic configuration OK.

    Compiler support:

      C99 var arrays: ................ yes
      C99 lrintf: .................... yes
      Use alloca: .................... no (using var arrays)

    General configuration:

      Floating point support: ........ yes
      Fast float approximations: ..... no
      Fixed point debugging: ......... no
      Inline Assembly Optimizations: . No inline ASM for your platform, please send patches
      External Assembly Optimizations:
      Intrinsics Optimizations: ...... ARM (NEON) (NEON Aarch64)
      Run-time CPU detection: ........ no
      Custom modes: .................. no
      Assertion checking: ............ no
      Hardening: ..................... yes
      Fuzzing: ....................... no
      Check ASM: ..................... no

      API documentation: ............. no
      Extra programs: ................ yes
------------------------------------------------------------------------

 Type "make; make install" to compile and install
 Type "make check" to run the test suite


make  all-recursive
make[1]: Entering directory `/usr/local/src/srs-server-4.0-b6/trunk/objs/Platform-Linux-4.18.0-GCC4.8.5-SRS4-aarch64/opus-1.3.1'
make[2]: Entering directory `/usr/local/src/srs-server-4.0-b6/trunk/objs/Platform-Linux-4.18.0-GCC4.8.5-SRS4-aarch64/opus-1.3.1'
  CC       celt/bands.lo
  CC       celt/celt.lo
  CC       celt/celt_encoder.lo
  CC       celt/celt_decoder.lo
  CC       celt/cwrs.lo
  CC       celt/entcode.lo
  CC       celt/entdec.lo
  CC       celt/entenc.lo
  CC       celt/kiss_fft.lo
  CC       celt/laplace.lo
  CC       celt/mathops.lo
  CC       celt/mdct.lo
  CC       celt/modes.lo
  CC       celt/pitch.lo
  CC       celt/celt_lpc.lo
  CC       celt/quant_bands.lo
  CC       celt/rate.lo
  CC       celt/vq.lo
  CC       celt/arm/armcpu.lo
  CC       celt/arm/arm_celt_map.lo
  CC       celt/arm/celt_neon_intr.lo
In file included from celt/arm/celt_neon_intr.c:37:0:
> celt/arm/celt_neon_intr.c: In function 'xcorr_kernel_neon_float':
> celt/arm/celt_neon_intr.c:137:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YY[0], vget_low_f32(XX[0]), 0);
              ^
> celt/arm/celt_neon_intr.c:139:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[0]), 1);
              ^
> celt/arm/celt_neon_intr.c:141:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[0]), 0);
              ^
> celt/arm/celt_neon_intr.c:143:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[0]), 1);
              ^
> celt/arm/celt_neon_intr.c:145:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YY[1], vget_low_f32(XX[1]), 0);
              ^
> celt/arm/celt_neon_intr.c:147:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[1]), 1);
              ^
> celt/arm/celt_neon_intr.c:149:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[1]), 0);
              ^
> celt/arm/celt_neon_intr.c:151:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[1]), 1);
              ^
> celt/arm/celt_neon_intr.c:170:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YY[0], vget_low_f32(XX[0]), 0);
              ^
> celt/arm/celt_neon_intr.c:172:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[0]), 1);
              ^
> celt/arm/celt_neon_intr.c:174:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[0]), 0);
              ^
> celt/arm/celt_neon_intr.c:176:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[0]), 1);
              ^
> celt/arm/celt_neon_intr.c:184:14: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
       SUMM = vmlaq_lane_f32(SUMM, YY[0], XX_2, 0);
              ^
> celt/arm/celt_neon_intr.c:189:11: error: incompatible types when initializing type 'float32x4_t' using type 'float32x2_t
    SUMM = vmlaq_lane_f32(SUMM, YY[0], XX_2, 0);
           ^
make[2]: *** [celt/arm/celt_neon_intr.lo] Error 1
make[2]: Leaving directory `/usr/local/src/srs-server-4.0-b6/trunk/objs/Platform-Linux-4.18.0-GCC4.8.5-SRS4-aarch64/opus-1.3.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/srs-server-4.0-b6/trunk/objs/Platform-Linux-4.18.0-GCC4.8.5-SRS4-aarch64/opus-1.3.1'
make: *** [all] Error 2
Build opus-1.3.1 failed, ret=2

Reproducing the bug steps (How to replay bug?)

I can provide a remote testing machine environment on my side

  1. cd srs-server-4.0-b6/trunk/
  2. ./configure

Expected behavior

> Describe your expectation

> Complete the normal compilation of the SRS service

TRANS_BY_GPT3

qzwlinux avatar Feb 09 '22 03:02 qzwlinux

Opus compilation failed, this platform needs to be adapted. Whoever wants to use it, should adapt it.

Patch welcome. 😄

TRANS_BY_GPT3

winlinvip avatar Feb 10 '22 00:02 winlinvip

Hello, I have completed the compilation of the SRS server after changing the GCC version.

Operating system: CentOS 7.8 After changing the GCC version, everything is working fine. The original GCC version was 4.8.5, and it has been replaced with Kunpeng GCC 9.3.1. GCC download link: https://mirror.iscas.ac.cn/kunpeng/archive/compiler/hcc/gcc-9.3.1-2021.03-aarch64-linux.tar.gz

After completing the replacement of GCC, the compilation was successfully completed, and the OBS streaming is working fine.

Thank you for your support.

TRANS_BY_GPT3

qzwlinux avatar Feb 10 '22 03:02 qzwlinux

Changing GCC is necessary to compile successfully. This cannot be considered as supporting this platform. We cannot expect users to change the GCC compiler themselves.

So I believe that currently SRS cannot be compiled on S2500.

Whoever needs to use it on this platform, feel free to submit a patch.

TRANS_BY_GPT3

winlinvip avatar Feb 11 '22 00:02 winlinvip

Hello, I have completed the compilation of the SRS server after changing the gcc version.

The operating system CentOS 7.8 is working fine after changing the gcc version. The original gcc version was 4.8.5, and it has been replaced with Kunpeng gcc 9.3.1. You can find the gcc link here: gcc-9.3.1-2021.03-aarch64-linux.tar.gz

After completing the gcc replacement, the compilation was successfully completed, and the OBS streaming is working fine.

Thank you for your support.

This GCC version is too old, which leads to functions/features being incompatible. Upgrading the GCC version is the correct choice. Many projects now require a newer GCC version to compile successfully. As a reference, a newer Linux kernel also requires GCC 5.1 or above to compile.

My suggestion is to also switch the system to a newer distribution ... If you want to support an older GCC separately, you may have to apply patches individually, which I personally don't think is worth it ...

TRANS_BY_GPT3

WhiredPlanck avatar Feb 28 '22 12:02 WhiredPlanck

Okay, then let's upgrade the GCC on the platform.

TRANS_BY_GPT3

winlinvip avatar Mar 05 '22 09:03 winlinvip

 ./configure --gb28181=on

my error is ./auto/depends.sh: line 522: autoreconf: command not found Build opus-1.3.1 failed.

image

I solve the problem by install autoconf , just run sudo apt install autoconf -y

aohanhongzhi avatar Nov 27 '23 13:11 aohanhongzhi

The SRS can operate without relying on libopus by using the --ffmpeg-opus=on option, which allows the use of FFmpeg's opus codec instead of depending on libopus.

TRANS_BY_GPT4

winlinvip avatar Dec 01 '23 01:12 winlinvip