Redundant Dependency Checks in trunk/auto/depends.sh Script
Description:
The current implementation of the depends.sh script in the ossrs/srs repository checks for dependencies one at a time. If a dependency is missing, it notifies the user and exits the script. This approach requires multiple runs of the script to identify all missing dependencies, which is inefficient.
Proposed Solution:
Modify the depends.sh script to check for all required dependencies in a single run and report all missing dependencies at once. This will allow users to install all required dependencies in one go, improving the efficiency of the setup process.
It seems to have little significance.
TRANS_BY_GPT4
But actually I think it is really necessary to list out all dependencies required in compiling and also deployment environment at the beginning instead of quit out during the configuration due to missing dependencies.
I'm here to provide a temporarily solution if you desire, the depend.sh modified by AI can successfully solve this problem. If you are willing to use it, you can pick this commit into your own repo.
Example showcase:
~/srs/trunk$ ./configure
GCC is required for early configure checks that run before the full dependency scan.
Additional tools may also be missing; review manually if needed:
required tools: perl gcc g++ make patch unzip automake pkg-config which
optional tools for SRT (if enabled): tclsh cmake
Install gcc and rerun configure.
~/srs/trunk$ ./configure
Export SRS_JOBS=--jobs=24
User config:
Detail config: --prefix=/usr/local/srs --config=conf/srs.conf --osx=off --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-converter=on --http-api=on --utest=off --srt=on --sys-srt=off --rtc=on --rtsp=off --gb28181=off --simulator=off --cxx11=off --cxx14=off --backtrace=on --ffmpeg-fit=on --sys-ffmpeg=off --ffmpeg-opus=off --nasm=on --srtp-nasm=on --sys-srtp=off --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --shared-st=off --shared-srt=reserved --shared-ffmpeg=reserved --shared-srtp=reserved --log-verbose=off --log-info=off --log-trace=on --log-level_v2=on --gcov=off --debug=off --debug-stats=off --debug-nack-drop=off --cross-build=off --sanitizer=off --sanitizer-static=off --sanitizer-log=off --single-thread=on --signal-api=off --generic-linux=off --build-cache=on --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
Discover SRS version=7.0.102, major=7
SRS_WORKDIR: ., SRS_OBJS: ./objs, SRS_PLATFORM: Platform-SRS7-Linux-6.6.87.2-GCC11.4.0-x86_64
All outputs to: ./objs/Platform-SRS7-Linux-6.6.87.2-GCC11.4.0-x86_64
SRS_JOBS: --jobs=24, SRS_DEPENDS_LIBS: /home/jason_yang/srs/trunk/objs, OS_IS_LINUX: YES, OS_IS_UBUNTU: YES, OS_IS_X86_64: YES
Checking required tools: perl gcc g++ make patch unzip automake pkg-config which
Checking optional tools for SRT: tclsh cmake
Missing dependencies (8): g++ make patch unzip automake tclsh cmake pkg-config
Please install missing dependencies by: sudo apt install -y g++ make patch unzip automake tclsh cmake pkg-config
Please install the missing dependencies above and rerun configure.
Thanks. Fixed in v7.0.105, by AI.