Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
electricsheep ebuild fails on libavformat
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sun Dec 04, 2011 2:27 am    Post subject: electricsheep ebuild fails on libavformat Reply with quote

I can't seem to get electricsheep to emerge again, and it won't run, either.

runtime error is:
Code:
electricsheep: error while loading shared libraries: libavformat.so.52: cannot open shared object file: No such file or directory


but compile fails on:
Code:
electricsheep.c: In function ‘copy_out_file’:
electricsheep.c:652:5: warning: ‘av_open_input_file’ is deprecated (declared at /usr/include/libavformat/avformat.h:1090)
electricsheep.c:665:6: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
electricsheep.c:665:6: note: each undeclared identifier is reported only once for each function it appears in
electricsheep.c:689:13: warning: assignment makes pointer from integer without a cast
electricsheep.c:691:7: warning: assignment makes pointer from integer without a cast
electricsheep.c:700:2: warning: ‘av_set_parameters’ is deprecated (declared at /usr/include/libavformat/avformat.h:1434)
electricsheep.c:718:2: warning: ‘url_fopen’ is deprecated (declared at /usr/include/libavformat/avio.h:279)
electricsheep.c:723:2: warning: ‘av_write_header’ is deprecated (declared at /usr/include/libavformat/avformat.h:1492)
electricsheep.c:733:22: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
electricsheep.c: In function ‘update_server_sheep’:
electricsheep.c:1766:2: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
make[1]: *** [electricsheep.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/x11-misc/electricsheep-2.7_beta11/work/electricsheep-2.7_beta11'
make: *** [all] Error 2
emake failed
 * ERROR: x11-misc/electricsheep-2.7_beta11 failed (compile phase):
 *   emake failed
 *
 * Call stack:
 *          ebuild.sh, line   84:  Called src_compile
 *        environment, line 3053:  Called _eapi2_src_compile
 *   phase-helpers.sh, line  570:  Called die
 * The specific snippet of code:
 *              emake || die "emake failed"
 *

so, normally, I would remerge electricsheep to link to the new version of libavformat, but it fails per the above.

Is there some other package I should be emerging?

Thanks,

EE
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Sat Dec 17, 2011 12:25 am    Post subject: Reply with quote

I ran into the same problem trying to install electricsheep and I don't have an answer. I tried using the 9999 ebuild from: https://bugs.gentoo.org/show_bug.cgi?id=339463

I then created a patch that fixed the CODEC_TYPE_VIDEO error. My patch to fix the PKT_FLAG_KEY did not work. It looks like a different library needs to be used now: https://github.com/bluecherrydvr/solo6x10/issues/16

I think a change to how the libraries are called could be the last step needed but I'm out of time.

FWIW, here are the two patches I made:
Code:
diff -r -u electricsheep-9999.orig/electricsheep.c electricsheep-9999/electricsheep.c
--- electricsheep-9999.orig/electricsheep.c   2011-12-16 17:06:28.000000000 -0700
+++ electricsheep-9999/electricsheep.c   2011-12-16 17:09:07.000000000 -0700
@@ -670,7 +670,7 @@
     input_stream_index = -1;
     for (j = 0; j < ictx->nb_streams; j++) {
    AVCodecContext *enc = ictx->streams[j]->codec;
-   if (CODEC_TYPE_VIDEO == enc->codec_type) {
+   if (AVMEDIA_TYPE_VIDEO == enc->codec_type) {
        input_stream_index = j;
        break;
    }

Code:
diff -r -u electricsheep-9999.orig/electricsheep.c electricsheep-9999/electricsheep.c
--- electricsheep-9999.orig/electricsheep.c   2011-12-16 17:10:29.000000000 -0700
+++ electricsheep-9999/electricsheep.c   2011-12-16 17:14:08.000000000 -0700
@@ -738,7 +738,7 @@
    av_init_packet(&opkt);
    if (av_parser_change(ictx->streams[input_stream_index]->parser, output_ctx->streams[0]->codec,
               &opkt.data, &opkt.size, ipkt.data, ipkt.size,
-              ipkt.flags & PKT_FLAG_KEY))
+              ipkt.flags & AV_PKT_TYPE_KEY))
        opkt.destruct= av_destruct_packet;
       
    if (-1 == av_interleaved_write_frame(output_ctx, &opkt)) {
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Mon Mar 04, 2013 7:27 pm    Post subject: Reply with quote

thanks for the patches, though I'm not really competent enough to apply them to an overlay live ebuild.

This is the error I get now with electricsheep-9999:

Code:
 * Package:    x11-misc/electricsheep-9999
 * Repository: x-portage
 * Maintainer: maintainer-needed@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   ccache sandbox
>>> Unpacking source...
 * subversion update start -->
 *      repository: http://electricsheep.googlecode.com/svn/trunk/client_generic
Updating '.':
At revision 137.
 *    working copy: /usr/portage/distfiles/svn-src/electricsheep/client_generic

>>> Source unpacked in /var/tmp/portage/x11-misc/electricsheep-9999/work
>>> Preparing source in /var/tmp/portage/x11-misc/electricsheep-9999/work/electricsheep-9999 ...
 * begin bootstrap -->
 *    bootstrap with a file: autogen.sh
Preparing the electricsheep build system...please wait

ac-wrapper: warning: invalid WANT_AUTOCONF 'latest'; ignoring.
Found GNU Autoconf version 2.69
Found GNU Automake version 1.13.1
Found GNU Libtool version 2.4.2

Automatically preparing build ... Warning: autoreconf failed
Attempting to run the preparation steps individually

Preparing build ... ERROR: aclocal -I mk/autoconf failed
 * ERROR: x11-misc/electricsheep-9999 failed (prepare phase):
 *   subversion: can't execute ESVN_BOOTSTRAP.
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_prepare
 *   environment, line 3355:  Called subversion_src_prepare
 *   environment, line 3676:  Called subversion_bootstrap
 *   environment, line 3509:  Called die
 * The specific snippet of code:
 *               eval "./${ESVN_BOOTSTRAP}" || die "${ESVN}: can't execute ESVN_BOOTSTRAP.";
 *
 * If you need support, post the output of `emerge --info '=x11-misc/electricsheep-9999'`,
 * the complete build log and the output of `emerge -pqv '=x11-misc/electricsheep-9999'`.
 * This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/x11-misc/electricsheep-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-misc/electricsheep-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-misc/electricsheep-9999/work/electricsheep-9999'


I wish the failing aclocal would give more information about why it failed.

Oh well. I'll keep pestering bugzilla about it.

Cheers,

EE
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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