Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge retroshare 0.6.4 fails with use flag voip [patched]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4613
Location: Bavaria

PostPosted: Thu Apr 16, 2020 2:31 pm    Post subject: emerge retroshare 0.6.4 fails with use flag voip [patched] Reply with quote

I have a stable amd64 gentoo installation. I can/have emerge stable retroshare (=0.6.4) wihtout USE-flag "voip". (I also have stable ffmpeg 4.2.2)

emerge fails when it tries to compile "RetroShare-0.6.4/plugins/VOIP/gui/VideoProcessor.cpp" =>
Code:
gui/VideoProcessor.cpp: In constructor ‘FFmpegVideo::FFmpegVideo()’:
gui/VideoProcessor.cpp:456:40: error: ‘CODEC_CAP_TRUNCATED’ was not declared in this scope; did you mean ‘AV_CODEC_CAP_TRUNCATED’?
  456 |     if (encoding_codec->capabilities & CODEC_CAP_TRUNCATED)
      |                                        ^~~~~~~~~~~~~~~~~~~
      |                                        AV_CODEC_CAP_TRUNCATED
x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -Wno-deprecated -Wno-deprecated-declarations -Wno-cpp -D__STDC_CONSTANT_MACROS -Wall -std=gnu++11 -D_REENTRANT -Wall -Wextra -fPIC -DRS_ENABLE_GXS -DENABLE_WEBUI -DRS_NO_WARN_DEPRECATED -DRS_NO_WARN_CPP -DRS_GXS_TRANS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../libretroshare/src -I../../retroshare-gui/src -I../../retroshare-gui/src/temp/ui -isystem /usr/include/opencv -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o AudioInputConfig.o gui/AudioInputConfig.cpp
gui/VideoProcessor.cpp:457:36: error: ‘CODEC_FLAG_TRUNCATED’ was not declared in this scope; did you mean ‘AV_CODEC_FLAG_TRUNCATED’?
  457 |         encoding_context->flags |= CODEC_FLAG_TRUNCATED;
      |                                    ^~~~~~~~~~~~~~~~~~~~
      |                                    AV_CODEC_FLAG_TRUNCATED
gui/VideoProcessor.cpp:458:32: error: ‘CODEC_FLAG_PSNR’ was not declared in this scope; did you mean ‘AV_CODEC_FLAG_PSNR’?
  458 |     encoding_context->flags |= CODEC_FLAG_PSNR;//Peak signal-to-noise ratio
      |                                ^~~~~~~~~~~~~~~
      |                                AV_CODEC_FLAG_PSNR
gui/VideoProcessor.cpp:459:32: error: ‘CODEC_CAP_PARAM_CHANGE’ was not declared in this scope; did you mean ‘AV_CODEC_CAP_PARAM_CHANGE’?
  459 |     encoding_context->flags |= CODEC_CAP_PARAM_CHANGE;
      |                                ^~~~~~~~~~~~~~~~~~~~~~
      |                                AV_CODEC_CAP_PARAM_CHANGE
gui/VideoProcessor.cpp:552:39: error: ‘CODEC_CAP_TRUNCATED’ was not declared in this scope; did you mean ‘AV_CODEC_CAP_TRUNCATED’?
  552 |     if(decoding_codec->capabilities & CODEC_CAP_TRUNCATED)
      |                                       ^~~~~~~~~~~~~~~~~~~
      |                                       AV_CODEC_CAP_TRUNCATED
gui/VideoProcessor.cpp:553:36: error: ‘CODEC_FLAG_TRUNCATED’ was not declared in this scope; did you mean ‘AV_CODEC_FLAG_TRUNCATED’?
  553 |         decoding_context->flags |= CODEC_FLAG_TRUNCATED; // we do not send complete frames
      |                                    ^~~~~~~~~~~~~~~~~~~~
      |                                    AV_CODEC_FLAG_TRUNCATED
gui/VideoProcessor.cpp:555:33: error: ‘CODEC_FLAG2_CHUNKS’ was not declared in this scope; did you mean ‘AV_CODEC_FLAG2_CHUNKS’?
  555 |     decoding_context->flags2 |= CODEC_FLAG2_CHUNKS;
      |                                 ^~~~~~~~~~~~~~~~~~
      |                                 AV_CODEC_FLAG2_CHUNKS
x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -Wno-deprecated -Wno-deprecated-declarations -Wno-cpp -D__STDC_CONSTANT_MACROS -Wall -std=gnu++11 -D_REENTRANT -Wall -Wextra -fPIC -DRS_ENABLE_GXS -DENABLE_WEBUI -DRS_NO_WARN_DEPRECATED -DRS_NO_WARN_CPP -DRS_GXS_TRANS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../libretroshare/src -I../../retroshare-gui/src -I../../retroshare-gui/src/temp/ui -isystem /usr/include/opencv -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o AudioStats.o gui/AudioStats.cpp
make: *** [Makefile:1545: VideoProcessor.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/var/tmp/portage/portage/net-p2p/retroshare-0.6.4/work/RetroShare-0.6.4/plugins/VOIP'
 * ERROR: net-p2p/retroshare-0.6.4::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-p2p/retroshare-0.6.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-p2p/retroshare-0.6.4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/portage/net-p2p/retroshare-0.6.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/portage/net-p2p/retroshare-0.6.4/temp/environment'.
 * Working directory: '/var/tmp/portage/portage/net-p2p/retroshare-0.6.4/work/RetroShare-0.6.4'
 * S: '/var/tmp/portage/portage/net-p2p/retroshare-0.6.4/work/RetroShare-0.6.4'

>>> Failed to emerge net-p2p/retroshare-0.6.4, Log file:

For me it looks like this retroshare-plugin uses old names. Is it possible to patch this ?


Last edited by pietinger on Tue May 05, 2020 11:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Thu Apr 16, 2020 3:27 pm    Post subject: Reply with quote

I found this bug report, but I'm not sure it's the same issue.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4613
Location: Bavaria

PostPosted: Thu Apr 16, 2020 5:44 pm    Post subject: Reply with quote

fturco wrote:
I found this bug report, but I'm not sure it's the same issue.

Thanks for this link (I strangely didnt found), it helped a lot. I made this patch (and copied it into: /etc/portage/patches/net-p2p/retroshare-0.6.4/user.patch):
Code:
--- a/plugins/VOIP/gui/VideoProcessor.cpp
+++ b/plugins/VOIP/gui/VideoProcessor.cpp
@@ -453,10 +453,10 @@
     encoding_context->rc_max_rate = 0;
     encoding_context->rc_buffer_size = 0;
 #endif
-    if (encoding_codec->capabilities & CODEC_CAP_TRUNCATED)
-        encoding_context->flags |= CODEC_FLAG_TRUNCATED;
-    encoding_context->flags |= CODEC_FLAG_PSNR;//Peak signal-to-noise ratio
-    encoding_context->flags |= CODEC_CAP_PARAM_CHANGE;
+    if (encoding_codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+        encoding_context->flags |= AV_CODEC_FLAG_TRUNCATED;
+    encoding_context->flags |= AV_CODEC_FLAG_PSNR;//Peak signal-to-noise ratio
+    encoding_context->flags |= AV_CODEC_CAP_PARAM_CHANGE;
     encoding_context->i_quant_factor = 0.769f;
     encoding_context->b_quant_factor = 1.4f;
     encoding_context->time_base.num = 1;
@@ -549,10 +549,10 @@
     decoding_context->pix_fmt = AV_PIX_FMT_YUV420P;
 #endif
 
-    if(decoding_codec->capabilities & CODEC_CAP_TRUNCATED)
-        decoding_context->flags |= CODEC_FLAG_TRUNCATED; // we do not send complete frames
+    if(decoding_codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+        decoding_context->flags |= AV_CODEC_FLAG_TRUNCATED; // we do not send complete frames
     //we can receive truncated frames
-    decoding_context->flags2 |= CODEC_FLAG2_CHUNKS;
+    decoding_context->flags2 |= AV_CODEC_FLAG2_CHUNKS;
 
     AVDictionary* dictionary = NULL;
     if(avcodec_open2(decoding_context, decoding_codec, &dictionary) < 0)

After this I had to copy libVOIP.so from /usr/lib64/retroshare/extensions6 to /usr/lib/retroshare/extensions6 (or to ~/.retroshare/extensions6/).
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4613
Location: Bavaria

PostPosted: Mon Apr 27, 2020 1:18 pm    Post subject: Reply with quote

The same problem with 0.6.4-r1. I had to move my existing directory with my user patch:
Code:
# mv /etc/portage/patches/net-p2p/retroshare-0.6.4 /etc/portage/patches/net-p2p/retroshare-0.6.4-r1
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31094
Location: here

PostPosted: Mon Apr 27, 2020 1:22 pm    Post subject: Reply with quote

Someone opened a new bug report in gentoo with patch to solve issue?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4613
Location: Bavaria

PostPosted: Mon Apr 27, 2020 1:51 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Someone opened a new bug report in gentoo with patch to solve issue?

Done :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum