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

Compilation on Nanopi board #194

Closed
JairoBit opened this issue Apr 13, 2023 · 3 comments
Closed

Compilation on Nanopi board #194

JairoBit opened this issue Apr 13, 2023 · 3 comments
Labels
build Issues related to building uvgRTP

Comments

@JairoBit
Copy link

Hello,

I downloaded and tried to compile the latest 2.3.0 release, but was unsuccessful. I'm trying to use it on a NanoPi board, the linux distribution is practically the same as Raspberry.

The first compilation error I solved with "cmake -DDISABLE_WERROR=1 ..":

/home/download/uvgRTP/src/reception_flow.cc:547:36: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (unsigned int i = 0; i < increase; ++i)
^
cc1plus: all warnings being treated as errors
CMakeFiles/uvgrtp.dir/build.make:173: recipe for target 'CMakeFiles/uvgrtp.dir/src/reception_flow.cc.o' failed
make[2]: *** [CMakeFiles/uvgrtp.dir/src/reception_flow.cc.o] Error 1
CMakeFiles/Makefile2:237: recipe for target 'CMakeFiles/uvgrtp.dir/all' failed
make[1]: *** [CMakeFiles/uvgrtp.dir/all] Error 2
Makefile:155: recipe for target 'all' failed
make: *** [all] Error 2

Solving the first one, a few more came up that I still couldn't solve:

/home/download/uvgRTP/src/rtcp.cc: In member function ‘uvgrtp::frame::rtcp_sender_report* uvgrtp::rtcp::get_sender_packet(uint32_t)’:
/home/download/uvgRTP/src/rtcp.cc:760:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘uvgrtp::frame::rtcp_receiver_report* uvgrtp::rtcp::get_receiver_packet(uint32_t)’:
/home/download/uvgRTP/src/rtcp.cc:776:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘uvgrtp::frame::rtcp_sdes_packet* uvgrtp::rtcp::get_sdes_packet(uint32_t)’:
/home/download/uvgRTP/src/rtcp.cc:792:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘uvgrtp::frame::rtcp_app_packet* uvgrtp::rtcp::get_app_packet(uint32_t)’:
/home/download/uvgRTP/src/rtcp.cc:808:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘std::vector uvgrtp::rtcp::get_participants() const’:
/home/download/uvgRTP/src/rtcp.cc:829:25: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘bool uvgrtp::rtcp::is_participant(uint32_t) const’:
/home/download/uvgRTP/src/rtcp.cc:886:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::init_participant_seq(uint32_t, uint16_t)’:
/home/download/uvgRTP/src/rtcp.cc:980:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::update_participant_seq(uint32_t, uint16_t)’:
/home/download/uvgRTP/src/rtcp.cc:995:22: error: missing template arguments before ‘prtcp_lock’
std::unique_lock prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc:1015:16: error: ‘prtcp_lock’ was not declared in this scope
prtcp_lock.unlock();
^
/home/download/uvgRTP/src/rtcp.cc:1040:12: error: ‘prtcp_lock’ was not declared in this scope
prtcp_lock.unlock();
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::reset_rtcp_state(uint32_t)’:
/home/download/uvgRTP/src/rtcp.cc:1057:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘bool uvgrtp::rtcp::collision_detected(uint32_t) const’:
/home/download/uvgRTP/src/rtcp.cc:1070:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘void uvgrtp::rtcp::update_session_statistics(const uvgrtp::frame::rtp_frame*)’:
/home/download/uvgRTP/src/rtcp.cc:1076:21: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::handle_receiver_report_packet(uint8_t*, size_t&, size_t, uvgrtp::frame::rtcp_header&)’:
/home/download/uvgRTP/src/rtcp.cc:1409:25: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::handle_sender_report_packet(uint8_t*, size_t&, size_t, uvgrtp::frame::rtcp_header&)’:
/home/download/uvgRTP/src/rtcp.cc:1463:25: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::handle_sdes_packet(uint8_t*, size_t&, size_t, uvgrtp::frame::rtcp_header&, uint32_t)’:
/home/download/uvgRTP/src/rtcp.cc:1531:25: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::handle_app_packet(uint8_t*, size_t&, size_t, uvgrtp::frame::rtcp_header&)’:
/home/download/uvgRTP/src/rtcp.cc:1629:25: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::send_rtcp_packet_to_participants(uint8_t*, uint32_t, bool)’:
/home/download/uvgRTP/src/rtcp.cc:1664:25: error: missing template arguments before ‘prtcp_lock’
std::lock_guard prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::generate_report()’:
/home/download/uvgRTP/src/rtcp.cc:1768:22: error: missing template arguments before ‘prtcp_lock’
std::unique_lock prtcp_lock(participants_mutex_);
^
/home/download/uvgRTP/src/rtcp.cc:1780:20: error: expected unqualified-id before ‘[’ token
for (auto& [name, hook] : outgoing_app_hooks_) {
^
/home/download/uvgRTP/src/rtcp.cc:1780:20: error: expected ‘;’ before ‘[’ token
/home/download/uvgRTP/src/rtcp.cc:1780:21: error: ‘name’ was not declared in this scope
for (auto& [name, hook] : outgoing_app_hooks_) {
^
/home/download/uvgRTP/src/rtcp.cc:1780:27: error: ‘hook’ was not declared in this scope
for (auto& [name, hook] : outgoing_app_hooks_) {
^
/home/download/uvgRTP/src/rtcp.cc: In lambda function:
/home/download/uvgRTP/src/rtcp.cc:1780:33: error: expected ‘{’ before ‘:’ token
for (auto& [name, hook] : outgoing_app_hooks_) {
^
/home/download/uvgRTP/src/rtcp.cc: In member function ‘rtp_error_t uvgrtp::rtcp::generate_report()’:
/home/download/uvgRTP/src/rtcp.cc:1780:33: error: expected ‘;’ before ‘:’ token
/home/download/uvgRTP/src/rtcp.cc:1780:33: error: expected primary-expression before ‘:’ token
/home/download/uvgRTP/src/rtcp.cc:1780:33: error: expected ‘)’ before ‘:’ token
/home/download/uvgRTP/src/rtcp.cc:1780:33: error: expected primary-expression before ‘:’ token
/home/download/uvgRTP/src/rtcp.cc:1875:20: error: ‘clamp’ is not a member of ‘std’
lost = std::clamp(lost, uint32_t(8388607), uint32_t(8388608));
^
/home/download/uvgRTP/src/rtcp.cc:1912:5: error: ‘prtcp_lock’ was not declared in this scope
prtcp_lock.unlock(); // End of critical section involving participants_
^
CMakeFiles/uvgrtp.dir/build.make:229: recipe for target 'CMakeFiles/uvgrtp.dir/src/rtcp.cc.o' failed
make[2]: *** [CMakeFiles/uvgrtp.dir/src/rtcp.cc.o] Error 1
CMakeFiles/Makefile2:237: recipe for target 'CMakeFiles/uvgrtp.dir/all' failed
make[1]: *** [CMakeFiles/uvgrtp.dir/all] Error 2
Makefile:155: recipe for target 'all' failed
make: *** [all] Error 2

@jrsnen jrsnen added the build Issues related to building uvgRTP label Apr 14, 2023
@jrsnen
Copy link
Member

jrsnen commented Apr 14, 2023

Hi!

Which C++ standard does your compiler support? We do use some C++17 features, but try to keep so that uvgRTP also compiles with C++14, but it seems some changes have broken this.

I'll ask @tampsa to look into this more closely.

BR,
Joni Räsänen

@JairoBit
Copy link
Author

Hi,
The board had GCC 5.4.0 which supports up to C++14.
It was possible to update to GCC 7.4.0 and now everything worked fine, it compiled without errors.
Thanks

@tampsa
Copy link
Collaborator

tampsa commented May 4, 2023

Hi, C++14 compiler errors are fixed by commit 62839d8.

-Heikki

@tampsa tampsa closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to building uvgRTP
Projects
None yet
Development

No branches or pull requests

3 participants