Edward-Wu / srt-live-server

srt live server for low latency

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compiler errors on raspberry pi

fencomstudios opened this issue · comments

Hi, I've been attempting to compile the newest version of the server on my raspberry pi, but I don't think it's working; it looks like a bunch of compiler errors are thrown:

g++ -c -g slscore/SLSLog.cpp -o obj/SLSLog.o
In file included from slscore/SLSLog.hpp:32,
from slscore/SLSLog.cpp:31:
slscore/common.hpp:120:1: warning: ‘typedef’ was ignored in this declaration
typedef struct ts_info {
^~~~~~~
slscore/SLSLog.cpp: In member function ‘void CSLSLog::print_log(int, const char*, va_list)’:
slscore/SLSLog.cpp:84:64: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sls_gettime_fmt(cur_time, cur_time_sec, "%Y-%m-%d %H:%M:%S");
^
g++ -c -g slscore/common.cpp -o obj/common.o
In file included from slscore/common.cpp:48:
slscore/common.hpp:120:1: warning: ‘typedef’ was ignored in this declaration
typedef struct ts_info {
^~~~~~~
slscore/common.cpp: In function ‘void sls_gettime_default_string(char*)’:
slscore/common.cpp:102:64: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sls_gettime_fmt(cur_time, cur_time_sec, "%Y-%m-%d %H:%M:%S");
^
g++ -c -g slscore/conf.cpp -o obj/conf.o
In file included from slscore/conf.cpp:33:
slscore/common.hpp:120:1: warning: ‘typedef’ was ignored in this declaration
typedef struct ts_info {
^~~~~~~
slscore/conf.cpp:38:50: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sls_conf_base_t sls_first_conf = {"", NULL, NULL} ;
^
g++ -c -g slscore/SLSThread.cpp -o obj/SLSThread.o
In file included from slscore/SLSLog.hpp:32,
from slscore/SLSThread.cpp:31:
slscore/common.hpp:120:1: warning: ‘typedef’ was ignored in this declaration
typedef struct ts_info {
^~~~~~~
g++ -c -g slscore/SLSEpollThread.cpp -o obj/SLSEpollThread.o
In file included from /usr/include/srt/srt.h:19,
from slscore/SLSEpollThread.hpp:29,
from slscore/SLSEpollThread.cpp:30:
/usr/include/version.h:27:2: error: invalid preprocessing directive #cmakedefine; did you mean #define?
#cmakedefine SRT_VERSION_BUILD @APPVEYOR_BUILD_NUMBER_STRING@
^~~~~~~~~~~
define
In file included from slscore/SLSLog.hpp:32,
from slscore/SLSEpollThread.cpp:31:
slscore/common.hpp:120:1: warning: ‘typedef’ was ignored in this declaration
typedef struct ts_info {
^~~~~~~
In file included from slscore/HttpClient.hpp:29,
from slscore/SLSRole.hpp:38,
from slscore/SLSEpollThread.cpp:33:
slscore/TCPRole.hpp:47:1: warning: ‘typedef’ was ignored in this declaration
typedef struct DATA_PARAM {
^~~~~~~
In file included from slscore/SLSRole.hpp:38,
from slscore/SLSEpollThread.cpp:33:
slscore/HttpClient.hpp:45:1: warning: ‘typedef’ was ignored in this declaration
typedef struct HTTP_RESPONSE_INFO {
^~~~~~~
make: *** [Makefile:61: obj/SLSEpollThread.o] Error 1

I'm pretty sure I installed everything correctly; is there something that I'm missing? thanks!

After a bit of fiddling around, it appears that when Haivision's srt implementation is installed on Raspbian, it doesn't install it to /usr/local unless you run "make install". I did that and tried compiling again, and it appears that it has compiled successfully, albeit with a ton more compiler warnings like the ones previously listed. However, now when I try to launch the server it says that the srt library can't be found. I've placed it everywhere imaginable, so is the server expecting this library to be in a different place?

me pasa lo mismo

a mi me andubo en raspberry pi 3

please check whether the path of srt library in LD_LIBRARY_PATH, if not , add it to.