Closed
Description
Hi hi!
Still a huge fan of this script, still feels like magic :)
Was wondering if it was possible to add LibSRT officially, as it is getting more and more popular (especially for "quick, dependency-free" deploys as relay servers).
I have a patch that will compile, but it's not ideal for 2 reasons:
- Currently have to checkout an older git hash because of an incompatibility with released FFMPEG and deprecated calls. This can be worked around with an older commit hash, an older SRT version, or just wait for new FFMPEG (or HEAD). No biggies here. (see "patch" below). I have it as
git
but could of coursewget
the commit archive. - More importantly, the SRT package doesn't seem to compile fully statically in the context of this build script. Technically what fails are the included apps, which AFAICT aren't needed at all for libsrt features, but makes me nervous. I spoke at length with the devs in [BUG] Linux: static linking apps fails Haivision/srt#1172 and the project seems to have no problem compiling statically, but I couldn't figure out what about this build script makes it such that it won't compile statically in the context of the script. Given that it is kind of the only other thing that compiles after openssl (besides FFMPEG), I wonder if there's some tweak to the openssl build needed. I tried everything I could think of. Maybe something super simple that will make sense to you all :) Issue seen on Ubuntu (presumably Deb) and Docker; seemed to work on Darwin but haven't quite pinned that down, and the remote VM use case is the point anyway.
Love to work with you on making this work!
Hacky Patch:
if build "srt"; then
cd "$PACKAGES"
git clone https://github.com/Haivision/srt.git
cd srt
git checkout 10ed37b6d4b49a3042213b029f0de6bca4bcfe83
#sed -i -e 's/${name} ${srt_link_library})/${name} ${srt_link_library} ${WITH_EXTRALIBS})/' CMakeLists.txt
cmake -DCMAKE_INSTALL_PREFIX:PATH="${WORKSPACE}" -DENABLE_SHARED=OFF -DENABLE_STATIC=ON -DENABLE_APPS=ON -DWITH_EXTRALIBS="-lz -ldl" .
# if you just set -DENABLE_APPS=OFF these patches aren't needed since it's the included apps that will fail to compile against static ffmpeg
sed -i -e 's/libsrt.a -ldl -lssl -lcrypto -lpthread/libsrt.a -lssl -lcrypto -lz -ldl -lpthread/' CMakeFiles/srt-live-transmit.dir/link.txt
sed -i -e 's/libsrt.a -ldl -lssl -lcrypto -lpthread/libsrt.a -lssl -lcrypto -lz -ldl -lpthread/' CMakeFiles/srt-tunnel.dir/link.txt
sed -i -e 's/libsrt.a -ldl -lssl -lcrypto -lpthread/libsrt.a -lssl -lcrypto -lz -ldl -lpthread/' CMakeFiles/srt-file-transmit.dir/link.txt
execute make -j $MJOBS
execute make install
build_done "srt"
fi
....
--enable-libsrt
d-averkiev
Metadata
Metadata
Assignees
Labels
No labels