ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.75k stars 5.28k forks source link

exec 'make srs_hls_ingester' failed #3862

Closed panda1986 closed 3 months ago

panda1986 commented 8 months ago

Describe the bug Machine Environment: MacOSX M1 Run ./configure Run make After compiling SRS, running 'make srs_hls_ingester' fails.

Version Develop branch, commit: 4a100616f Support build without cache to test if actions fail. v5.0.196 v6.0.96 (#3858)

To Reproduce Steps to reproduce the behavior:

  1. Enter the trunk directory
  2. Run ./configure
  3. Run make
  4. Run make srs_hls_ingester

Expected behavior The make srs_hls_ingester is successful, and it generates a binary file that can be used to test the srs hls ingester.

Screenshots

/Library/Developer/CommandLineTools/usr/bin/make --jobs=10 -f ./objs/Makefile srs_hls_ingester
g++ -c -std=c++11 -Wall -g -O0   \
    -I./src/main -I./src/core -I./src/kernel -I./src/protocol -I./src/app \
    -I./objs -I./objs/openssl/include -I./objs/srtp2/include -I./objs/ffmpeg/include \
    -o ./objs/src/main/srs_main_ingest_hls.o \
    ./src/main/srs_main_ingest_hls.cpp
./src/main/srs_main_ingest_hls.cpp:607:84: error: comparison between pointer and integer ('srs_error_t' (aka 'SrsCplxError *') and 'SrsErrorCode')
    if ((ret = client.initialize(uri.get_schema(), uri.get_host(), uri.get_port()) != ERROR_SUCCESS)) {
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/utility:584:1: note: candidate template ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>' against 'SrsCplxError *'
operator!=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iterator:819:1: note: candidate template ignored: could not match 'reverse_iterator<type-parameter-0-0>' against 'SrsCplxError *'
operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iterator:1041:1: note: candidate template ignored: could not match 'istream_iterator<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2, type-parameter-0-3>' against 'SrsCplxError *'
operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iterator:1152:6: note: candidate template ignored: could not match 'istreambuf_iterator<type-parameter-0-0, type-parameter-0-1>' against 'SrsCplxError *'
bool operator!=(const istreambuf_iterator<_CharT,_Traits>& __a,
     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iterator:1275:1: note: candidate template ignored: could not match 'move_iterator<type-parameter-0-0>' against 'SrsCplxError *'
operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iterator:1651:1: note: candidate template ignored: could not match '__wrap_iter<type-parameter-0-0>' against 'SrsCplxError *'
operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iterator:1683:1: note: candidate template ignored: could not match '__wrap_iter<type-parameter-0-0>' against 'SrsCplxError *'
operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/tuple:1185:1: note: candidate template ignored: could not match 'tuple<type-parameter-0-0...>' against 'SrsCplxError *'
operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory:1010:6: note: candidate template ignored: could not match 'allocator<type-parameter-0-0>' against 'SrsCplxError *'
bool operator!=(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return false;}
     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory:1948:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'SrsCplxError *'
operator!=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x == __y);}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory:1995:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'SrsCplxError *'
operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory:2003:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'SrsErrorCode'
operator!=(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory:3408:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'SrsCplxError *'
operator!=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory:3470:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'SrsCplxError *'
operator!=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory:3478:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'SrsErrorCode'
operator!=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/functional:2603:1: note: candidate template ignored: could not match 'function<type-parameter-0-0 (type-parameter-0-1...)>' against 'SrsCplxError *'
operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return (bool)__f;}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/functional:2608:1: note: candidate template ignored: could not match 'function<type-parameter-0-0 (type-parameter-0-1...)>' against 'SrsErrorCode'
operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return (bool)__f;}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string_view:682:6: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'SrsCplxError *'
bool operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string_view:691:6: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'SrsCplxError *'
bool operator!=(basic_string_view<_CharT, _Traits> __lhs,
     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string_view:701:6: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'SrsErrorCode'
bool operator!=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string:575:6: note: candidate template ignored: could not match 'fpos<type-parameter-0-0>' against 'SrsCplxError *'
bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y)
     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string:4090:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'SrsCplxError *'
operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string:4099:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'SrsErrorCode'
operator!=(const _CharT* __lhs,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string:4108:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'SrsCplxError *'
operator!=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:3346:1: note: candidate template ignored: could not match 'vector<type-parameter-0-0, type-parameter-0-1>' against 'SrsCplxError *'
operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/map:1614:1: note: candidate template ignored: could not match 'map<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2, type-parameter-0-3>' against 'SrsCplxError *'
operator!=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/map:2199:1: note: candidate template ignored: could not match 'multimap<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2, type-parameter-0-3>' against 'SrsCplxError *'
operator!=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
^
1 error generated.
make[1]: *** [objs/src/main/srs_main_ingest_hls.o] Error 1
make: *** [srs_hls_ingester] Error 2

Additional context Add any other context about the problem here.

TRANS_BY_GPT4

winlinvip commented 3 months ago

The HLS ingestor feature, a demo tool, enables users to build new binaries besides those from SRS. With the modularity feature of SRS, users can build more tools using SRS libraries and functions. However, since this feature is not being frequently used, I plan to deprecate and eventually eliminate it in the future.

If you wish to ingest HLS and convert it to an RTMP stream for publishing to SRS, you might consider using FFmpeg.

suzp1984 commented 3 months ago

same compiling error exist for src/main/srs_main_mp4_parser.cpp too.

suzp1984 commented 3 months ago

delete those demo tools completely or patch the compiling errors first, it's totally ok. I sent a PR anyway #4005