How to configure ffmpeg with libsrt (Secure Reliable Transport) protocol? - ffmpeg

I want to configure ffmpeg with libsrt (Secure Reliable Transport) protocol on linux-Ubuntu OS, I followed the steps from this link
But when run $./configure --enable-libsrt command it gives me an error:
ERROR: srt >= 1.3.0 not found using pkg-config
I modified the configuration file, it executed the above command but when i run $ make command it end up with the following errors:
LD ffmpeg_g
libavformat/libavformat.so: undefined reference to `srt_socket'
libavformat/libavformat.so: undefined reference to `srt_bind'
libavformat/libavformat.so: undefined reference to `srt_getsockopt'
libavformat/libavformat.so: undefined reference to `srt_close'
libavformat/libavformat.so: undefined reference to `srt_epoll_add_usock'
libavformat/libavformat.so: undefined reference to `srt_startup'
libavformat/libavformat.so: undefined reference to `srt_connect'
libavformat/libavformat.so: undefined reference to `srt_epoll_release'
libavformat/libavformat.so: undefined reference to `srt_listen'
libavformat/libavformat.so: undefined reference to `srt_getlasterror'
libavformat/libavformat.so: undefined reference to `srt_getlasterror_str'
libavformat/libavformat.so: undefined reference to `srt_cleanup'
libavformat/libavformat.so: undefined reference to `srt_setsockopt'
libavformat/libavformat.so: undefined reference to `srt_sendmsg'
libavformat/libavformat.so: undefined reference to `srt_clearlasterror'
libavformat/libavformat.so: undefined reference to `srt_epoll_wait'
libavformat/libavformat.so: undefined reference to `srt_epoll_remove_usock'
libavformat/libavformat.so: undefined reference to `srt_epoll_create'
libavformat/libavformat.so: undefined reference to `srt_recvmsg'
libavformat/libavformat.so: undefined reference to `srt_accept'
collect2: error: ld returned 1 exit status
Makefile:108: recipe for target 'ffmpeg_g' failed
make: *** [ffmpeg_g] Error 1
What are exact steps to enable libsrt with ffmpeg ? Am i missing anything ? Is there any patch i have to add to existing ffmpeg source ?
Thanks in advance !!!

The answer you referred to assumes the question asker was following the Ubuntu compile guide on the FFmpeg Wiki (because they claimed to be doing so). The compile guide "installs" external libraries into ~/ffmpeg_build for a variety of reasons. The libsrt instructions in that answer does the same to fit with the wiki article. Therefore, it is expected that you will use the additional compilation options as shown in the wiki to deal with this when compiling ffmpeg.
Undo whatever changes you made to configure.
Follow the linked answer and compile libsrt if you haven't already.
Now compile ffmpeg.
make distclean
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --enable-libsrt --pkg-config-flags="--static"
Alternatively, if you don't want to have to use most of those extra options then omit -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" when compiling libsrt.

Related

libfreefare mingw32-make error on windows

I am on windows 8 64 bits.
I have installed successfully libnfc, and I am able to use the .exe examples that are in libnfc\utils (like nfc-mfclassic.exe; nfc-list.exe ...)
I would like to manipulate Mifare cards and use NDEF Format, so I am trying to install libfreefare on Windows.
I have followed a tutorial on libnfc.org showing how to have libfreefare on Windows and It worked fine.
And I used cmake-gui to generate build file
Coming now to the step of mingw32-make, I have this error :
[ 55%] Building C object libfreefare/CMakeFiles/freefare.dir/tlv.c.obj
Linking C shared library libfreefare.dll
CMakeFiles\freefare.dir/objects.a(mifare_desfire.c.obj):mifare_desfire.c:(.text+0x64f): undefined reference to `RAND_bytes'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x1219): undefined reference to `DES_ecb_encrypt'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x1242): undefined reference to `DES_ecb_encrypt'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x1280): undefined reference to `DES_ecb_encrypt'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x12a9): undefined reference to `DES_ecb_encrypt'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x12d0): undefined reference to `DES_ecb_encrypt'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x12f9): more undefined references to `DES_ecb_encrypt' follow
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x1489): undefined reference to `AES_set_encrypt_key'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x14a8): undefined reference to `AES_encrypt'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x14c7): undefined reference to `AES_set_decrypt_key'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_crypto.c.obj):mifare_desfire_crypto.c:(.text+0x14e6): undefined reference to `AES_decrypt'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_key.c.obj):mifare_desfire_key.c:(.text+0x17): undefined reference to `DES_set_key'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_key.c.obj):mifare_desfire_key.c:(.text+0x32): undefined reference to `DES_set_key'
CMakeFiles\freefare.dir/objects.a(mifare_desfire_key.c.obj):mifare_desfire_key.c:(.text+0x58): undefined reference to `DES_set_key'
CMakeFiles\freefare.dir/objects.a(mifare_ultralight.c.obj):mifare_ultralight.c:(.text+0x7a3): undefined reference to `DES_random_key'
collect2.exe: error: ld returned 1 exit status
libfreefare\CMakeFiles\freefare.dir\build.make:351: recipe for target 'libfreefare/libfreefare.dll' failed
mingw32-make[2]: *** [libfreefare/libfreefare.dll] Error 1
CMakeFiles\Makefile2:74: recipe for target 'libfreefare/CMakeFiles/freefare.dir/all' failed
mingw32-make[1]: *** [libfreefare/CMakeFiles/freefare.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
Thanks for your help !!
I've found a solution :
At the root of the folder : libfreefare-0.4.0 there is CMakeLists.txt
I replaced this line :
set(LIBS ${LIBS} ${LIBNFC_LIBRARIES} ${OPENSSL_LIBRARIES})
by this one
set(LIBS ${LIBS} ${LIBNFC_LIBRARIES} D:/tools/OpenSSL-Win32/libeay32.dll D:/tools/OpenSSL-Win32/libssl32.dll)
And it worked fine ! Thanks #MichaelRoland for the tips on libcrypto equivalent

Harbour on DOS with DJGPP undefined refrence to "main()" and undefined reference to `hb_vmEx ecute'

I have installed Harbour 1.0.1 on MSOS 6.22
I am using djgpp. When I tried to build exe it gves following errors
C:\HB101\TEST>BLD TESTPRG
c:/djgpp/lib/crt0.o:crt0.s:(.data+0xc2): undefined reference to `main'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x129): undefined reference to `hb_vmProcessSymbolsEx'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x14b): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x168): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x185): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1a2): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1bf): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1dc): more undefined references to `hb_vmExecute' follow
c:/djgpp/bin/ld.exe: c:/djgpp/tmp/ccpmwnoY.o: bad reloc address 0x0 in section `.data'
c:/djgpp/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
I have got all required lib files, Then Why it is giving this error ?

scalasca cube linking error

I'm trying to install cube library,required for installing SCALASCA.I've installed already PAPI,OPARI and Qt.I also installed zlib both from source and by apt-get.But during cube linking(make command) an error occurs refering to some classes of zlib.
This is the configuration command i use:
./configure --prefix=/opt/cube-4.2.2 --with-qt=/opt/Qt --with-frontend-zlib=/usr/include/i386-linux-gnu --with-compression=full
this is the output from configuration: cube lib configuration output
and this is the make output: cube lib make command output
The error:
./.libs/libcube4.so: undefined reference to `gzofstream::gzofstream()'
./.libs/libcube4.so: undefined reference to `gzifstream::gzifstream(int, std::_Ios_Openmode)'
./.libs/libcube4.so: undefined reference to `gzifstream::gzifstream()'
./.libs/libcube4.so: undefined reference to `gzfilebuf::~gzfilebuf()'
./.libs/libcube4.so: undefined reference to `gzifstream::open(char const*, std::_Ios_Openmode)'
./.libs/libcube4.so: undefined reference to `gzofstream::close()'
./.libs/libcube4.so: undefined reference to `gzofstream::open(char const*, std::_Ios_Openmode)'
./.libs/libcube4.so: undefined reference to `gzifstream::close()'
collect2: error: ld returned 1 exit status
I'm using xubuntu 14.04 on vmware

Suricata luajit compilation error

I'm currently trying to compile suricata (http://suricata-ids.org/) with luajit support on my arch linux distribution with these commands:
./configure --enable-luajit --with-libpcap-includes=/usr/local/pfring/include \
--with-libpcap-libraries=/usr/local/pfring/lib --with-libnss-libraries=/usr/lib \
--with-libnss-includes=/usr/include/nss/ --with-libnspr-libraries=/usr/lib \
--with-libnspr-includes=/usr/include/nspr \
--with-libluajit-includes=/usr/local/include/luajit-2.0/ \
--with-libluajit-libraries=/usr/lib/
then:
make
but I get the following errors when I make the project:
detect-luajit.o: In function `LuaDumpStack':
detect-luajit.c:(.text+0x46e): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitMatchBuffer':
detect-luajit.c:(.text+0x5d6): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0x6b9): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0x7d5): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitMatch':
detect-luajit.c:(.text+0xaac): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0xde4): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0xf00): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitThreadInit':
detect-luajit.c:(.text+0x1864): undefined reference to `lua_pcallk'
detect-luajit.o: In function `DetectLuaSetupPrime':
detect-luajit.c:(.text+0x1fe7): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0x2167): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0x24bf): undefined reference to `lua_pcallk'
collect2: error: ld returned 1 exit status
make[2]: *** [suricata] Error 1
I first though it was an issue coming from the lua version. So I tried to install both the lua 5.1.5 and 5.2.2, remaking the library and symbolic links as well, and nothing worked.
Thanks for your help
In Debian and Ubuntu, the library files are installed into /usr/lib/x86_64-linux-gnu/. If arch does the same, your configure line should include: --with-libluajit-libraries=/usr/lib/x86_64-linux-gnu/

Porting newlib into cross-compiler

I am using this tutorial to create a cross-compiler.
I followed the gcc cross-compiler tutorial and went to the porting newlib. Everything worked fine till I tried compiling it by issuing
make all install
when I got the following error:
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
and the compilation stops.
I am using Ubuntu 11.10.
I have tried:
using different gcc, binutils and newlib versions (about 5 different combinations)
installing Texinfo
correcting makeinfo path
My cross-compiler works perfectly without the newlib just that it of course cannot include the libraries.
Even if you have makeinfo installed, it may not recognize newer versions. The following patch works. Copy below and save as "configure.patch", save it where the configure script is, then type "patch -p1 < configure.patch".
--- newlib-1.14.0-bak/configure 2008-06-10 20:49:16.918036351 +0200
+++ newlib-1.14.0/configure 2008-06-10 21:21:35.750035824 +0200
## -3542,7 +3542,7 ##
# For an installed makeinfo, we require it to be from texinfo 4.2 or
# higher, else we use the "missing" dummy.
if ${MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.([2-9]|[1-9][0-9])|[5-9])' >/dev/null 2>&1; then
:
else
MAKEINFO="$MISSING makeinfo"
I was trying to install 6809 GDB and got this error. I fixed by going into Makefile and changing
MAKEINFO = /opt/binutils-gdb/missing makeinfo
to
MAKEINFO = makeinfo
I also had to do this with
BISON = bison
YACC = bison -y
FLEX = flex
LEX = flex
However make got stuck with some bison function definitions:
macroexp.o: In function `get_character_constant':
/opt/vectrex/binutils-gdb/gdb/macroexp.c:364: undefined reference to `c_parse_escape'
c-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x148): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x150): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x268): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x270): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x388): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x390): undefined reference to `c_error'
d-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
d-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
f-lang.o:(.data.rel.ro+0x28): undefined reference to `f_parse'
f-lang.o:(.data.rel.ro+0x30): undefined reference to `f_error'
objc-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
objc-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
go-lang.o:(.data.rel.ro+0x28): undefined reference to `go_parse'
go-lang.o:(.data.rel.ro+0x30): undefined reference to `go_error'
m2-lang.o:(.data.rel.ro+0x28): undefined reference to `m2_parse'
m2-lang.o:(.data.rel.ro+0x30): undefined reference to `m2_error'
opencl-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
opencl-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
p-lang.o:(.data.rel.ro+0x28): undefined reference to `pascal_parse'
p-lang.o:(.data.rel.ro+0x30): undefined reference to `pascal_error'
cp-support.o: In function `mangled_name_to_comp':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:644: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:629: undefined reference to `cp_new_demangle_parse_info'
cp-support.o: In function `cp_canonicalize_string_full':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:534: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:541: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:545: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `inspect_type':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:260: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:264: undefined reference to `cp_merge_demangle_parse_infos'
cp-support.o: In function `replace_typedefs':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:441: undefined reference to `cp_comp_to_string'
cp-support.o: In function `replace_typedefs_qualified_name':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:368: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:343: undefined reference to `cp_comp_to_string'
cp-support.o: In function `cp_canonicalize_string':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:582: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:587: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:588: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_class_name_from_physname':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:743: undefined reference to `cp_demangled_name_parse_free'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:738: undefined reference to `cp_comp_to_string'
cp-support.o: In function `method_name_from_physname':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:826: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:830: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_func_name':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:847: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:855: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:857: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_remove_params':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:876: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:903: undefined reference to `cp_demangled_name_parse_free'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:901: undefined reference to `cp_comp_to_string'
cp-support.o: In function `do_demangled_name_parse_free_cleanup':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:108: undefined reference to `cp_demangled_name_parse_free'
collect2: error: ld returned 1 exit status
Makefile:1174: recipe for target 'gdb' failed
make[2]: *** [gdb] Error 1
make[2]: Leaving directory '/opt/vectrex/binutils-gdb/gdb'
Makefile:8590: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/opt/vectrex/binutils-gdb'
Makefile:827: recipe for target 'all' failed
make: *** [all] Error 2
After removing the entire directory and redownloading, the makefile was all correct (no missing directory) and make and make install completed fully. So perhaps the modifications to the makefile weren't needed and I just needed to have bison, flex, and makeinfo installed.

Resources