Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compile - Error 1 - error: ‘srt_epoll_set’ #24

Open
d3im opened this issue Apr 5, 2020 · 2 comments
Open

can't compile - Error 1 - error: ‘srt_epoll_set’ #24

d3im opened this issue Apr 5, 2020 · 2 comments

Comments

@d3im
Copy link

d3im commented Apr 5, 2020

Hi, have installed srt 1.3.2 (64bit) and getting this error while compiling with gcc 9.2.0:

# make

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
  120 | typedef struct ts_info {
      | ^~~~~~~
slscore/SLSLog.cpp: In member function ‘void CSLSLog::print_log(int, const char*, __va_list_tag*)’:
slscore/SLSLog.cpp:84:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   84 |     sls_gettime_fmt(cur_time, cur_time_sec, "%Y-%m-%d %H:%M:%S");
      |                                             ^~~~~~~~~~~~~~~~~~~
slscore/SLSLog.cpp:87:30: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   87 |     sprintf(buf_info, "%s:%03d %s %s: %s\n" , cur_time, cur_time_msec, APP_NAME, LOG_LEVEL_NAME[level], buf);
      |                           ~~~^                          ~~~~~~~~~~~~~
      |                              |                          |
      |                              int                        int64_t {aka long int}
      |                           %03ld
slscore/SLSLog.cpp:88:12: warning: format not a string literal and no format arguments [-Wformat-security]
   88 |     printf(buf_info);
      |            ^~~~~~~~
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
  120 | typedef struct ts_info {
      | ^~~~~~~
slscore/common.cpp: In function ‘void sls_gettime_default_string(char*)’:
slscore/common.cpp:102:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  102 |     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
  120 | typedef struct ts_info {
      | ^~~~~~~
slscore/conf.cpp:38:36: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   38 | sls_conf_base_t  sls_first_conf = {"", NULL, NULL} ;
      |                                    ^~
g++ -c -g slscore/SLSThread.cpp -o obj/SLSThread.o -I./ -I../ -I./slscore -I./include
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
  120 | typedef struct ts_info {
      | ^~~~~~~
g++ -c -g slscore/SLSEpollThread.cpp -o obj/SLSEpollThread.o -I./ -I../ -I./slscore -I./include
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
  120 | 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
   47 | 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
   45 | typedef struct HTTP_RESPONSE_INFO {
      | ^~~~~~~
slscore/SLSEpollThread.cpp: In member function ‘int CSLSEpollThread::init_epoll()’:
slscore/SLSEpollThread.cpp:60:26: error: ‘SRT_EPOLL_ENABLE_EMPTY’ was not declared in this scope
   60 |     srt_epoll_set(m_eid, SRT_EPOLL_ENABLE_EMPTY);
      |                          ^~~~~~~~~~~~~~~~~~~~~~
slscore/SLSEpollThread.cpp:60:5: error: ‘srt_epoll_set’ was not declared in this scope; did you mean ‘srt_epoll_wait’?
   60 |     srt_epoll_set(m_eid, SRT_EPOLL_ENABLE_EMPTY);
      |     ^~~~~~~~~~~~~
      |     srt_epoll_wait
make: *** [Makefile:73: obj/SLSEpollThread.o] Error 1
@Edward-Wu
Copy link
Owner

hi,
please use the srt 1.4.0 or later version.

@folterj
Copy link

folterj commented May 23, 2022

Hi,
I've just built from source following the instructions first installing the curren version of srt. Making srt works fine. Then making srt-live-server I receive similar error to the above (though many many more similar ones).
gcc 11.2.0
PS: I'm compiling for ARM / Raspberry Pi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants