I tried to emerge amarok and gpac dumps this error. This is due to ffmpeg being emerge after gpac. As you can see x264 depends on gpac with the "mp4" use flag turned on and ffmpeg depends on x264 with the use flag turned on and in return gpac with ffmpeg depends on ffmpeg. This looks like a cyclic dependency. [ebuild N ] media-video/gpac-0.4.2 USE="aac amr ffmpeg ft jpeg mad ogg opengl oss png sdl ssl theora truetype vorbis xml xvid -debug -javascript -wxwindows" 0 kB [ebuild N ] media-libs/x264-svn-20060612 USE="mp4 threads -debug" 296 kB [ebuild N ] media-video/ffmpeg-0.4.9_p20060530 USE="a52 aac amr dts encode ieee1394 imlib mmx network ogg oss sdl theora threads truetype vorbis x264 xvid zlib -debug -doc -test -v4l" 2,290 kB ffmpeg_decode.c:570: error: 'FFDec' has no member named 'ctx' ffmpeg_decode.c:571: error: 'PIX_FMT_YUV420P' undeclared (first use in this function) ffmpeg_decode.c:572: error: 'FFDec' has no member named 'frame' ffmpeg_decode.c:573: warning: implicit declaration of function 'avpicture_deinterlace' ffmpeg_decode.c:573: error: expected expression before ')' token ffmpeg_decode.c:578: warning: implicit declaration of function 'img_convert' ffmpeg_decode.c:578: error: expected expression before ')' token ffmpeg_decode.c: In function 'FFDEC_CanHandleStream': ffmpeg_decode.c:620: error: 'CODEC_ID_MP2' undeclared (first use in this function) ffmpeg_decode.c:626: error: 'CODEC_ID_MPEG4' undeclared (first use in this function) ffmpeg_decode.c:628: error: 'CODEC_ID_H264' undeclared (first use in this function) ffmpeg_decode.c:638: error: 'CODEC_ID_MPEG2VIDEO' undeclared (first use in this function) ffmpeg_decode.c:652: warning: comparison between pointer and integer ffmpeg_decode.c:653: warning: comparison between pointer and integer ffmpeg_decode.c: In function 'FFDEC_GetCodecName': ffmpeg_decode.c:661: error: 'FFDec' has no member named 'codec' ffmpeg_decode.c:662: error: 'FFDec' has no member named 'codec' ffmpeg_decode.c:662: error: 'FFDec' has no member named 'codec' ffmpeg_decode.c:662: error: 'FFMPEG_VERSION' undeclared (first use in this function) ffmpeg_decode.c: In function 'FFDEC_Load': ffmpeg_decode.c:674: warning: implicit declaration of function 'avcodec_init' ffmpeg_decode.c:675: warning: implicit declaration of function 'avcodec_register_all' ffmpeg_decode.c: In function 'FFDEC_Delete': ffmpeg_decode.c:698: error: 'FFDec' has no member named 'ctx' ffmpeg_decode.c:698: error: 'FFDec' has no member named 'ctx' make[2]: *** [ffmpeg_decode.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/gpac-0.4.2/work/gpac/modules/ffmpeg_in' make[1]: *** [plugs] Error 2 make[1]: Leaving directory `/var/tmp/portage/gpac-0.4.2/work/gpac/modules' make: *** [mods] Error 2 !!! ERROR: media-video/gpac-0.4.2 failed. Call stack: ebuild.sh, line 1543: Called dyn_compile ebuild.sh, line 938: Called src_compile gpac-0.4.2.ebuild, line 135: Called die
This is a workaround. "USE="-ffmpeg" emerge gpac" Once that's done, emerge ffmpeg as normal, then re-merge gpac with ffmpeg. (In reply to comment #0) > I tried to emerge amarok and gpac dumps this error. This is due to ffmpeg being > emerge after gpac. As you can see x264 depends on gpac with the "mp4" use flag > turned on and ffmpeg depends on x264 with the use flag turned on and in return > gpac with ffmpeg depends on ffmpeg. This looks like a cyclic dependency. > > > [ebuild N ] media-video/gpac-0.4.2 USE="aac amr ffmpeg ft jpeg mad ogg > opengl oss png sdl ssl theora truetype vorbis xml xvid -debug -javascript > -wxwindows" 0 kB > [ebuild N ] media-libs/x264-svn-20060612 USE="mp4 threads -debug" 296 kB > [ebuild N ] media-video/ffmpeg-0.4.9_p20060530 USE="a52 aac amr dts encode > ieee1394 imlib mmx network ogg oss sdl theora threads truetype vorbis x264 xvid > zlib -debug -doc -test -v4l" 2,290 kB > > > ffmpeg_decode.c:570: error: 'FFDec' has no member named 'ctx' > ffmpeg_decode.c:571: error: 'PIX_FMT_YUV420P' undeclared (first use in this > function) > ffmpeg_decode.c:572: error: 'FFDec' has no member named 'frame' > ffmpeg_decode.c:573: warning: implicit declaration of function > 'avpicture_deinterlace' > ffmpeg_decode.c:573: error: expected expression before ')' token > ffmpeg_decode.c:578: warning: implicit declaration of function 'img_convert' > ffmpeg_decode.c:578: error: expected expression before ')' token > ffmpeg_decode.c: In function 'FFDEC_CanHandleStream': > ffmpeg_decode.c:620: error: 'CODEC_ID_MP2' undeclared (first use in this > function) > ffmpeg_decode.c:626: error: 'CODEC_ID_MPEG4' undeclared (first use in this > function) > ffmpeg_decode.c:628: error: 'CODEC_ID_H264' undeclared (first use in this > function) > ffmpeg_decode.c:638: error: 'CODEC_ID_MPEG2VIDEO' undeclared (first use in this > function) > ffmpeg_decode.c:652: warning: comparison between pointer and integer > ffmpeg_decode.c:653: warning: comparison between pointer and integer > ffmpeg_decode.c: In function 'FFDEC_GetCodecName': > ffmpeg_decode.c:661: error: 'FFDec' has no member named 'codec' > ffmpeg_decode.c:662: error: 'FFDec' has no member named 'codec' > ffmpeg_decode.c:662: error: 'FFDec' has no member named 'codec' > ffmpeg_decode.c:662: error: 'FFMPEG_VERSION' undeclared (first use in this > function) > ffmpeg_decode.c: In function 'FFDEC_Load': > ffmpeg_decode.c:674: warning: implicit declaration of function 'avcodec_init' > ffmpeg_decode.c:675: warning: implicit declaration of function > 'avcodec_register_all' > ffmpeg_decode.c: In function 'FFDEC_Delete': > ffmpeg_decode.c:698: error: 'FFDec' has no member named 'ctx' > ffmpeg_decode.c:698: error: 'FFDec' has no member named 'ctx' > make[2]: *** [ffmpeg_decode.o] Error 1 > make[2]: Leaving directory > `/var/tmp/portage/gpac-0.4.2/work/gpac/modules/ffmpeg_in' > make[1]: *** [plugs] Error 2 > make[1]: Leaving directory `/var/tmp/portage/gpac-0.4.2/work/gpac/modules' > make: *** [mods] Error 2 > > !!! ERROR: media-video/gpac-0.4.2 failed. > Call stack: > ebuild.sh, line 1543: Called dyn_compile > ebuild.sh, line 938: Called src_compile > gpac-0.4.2.ebuild, line 135: Called die >
This workaround works for me.
I'm not sure which package is important so I'll list all: media-video/gpac-0.4.2 media-video/ffmpeg-0.4.9_p20060816 media-libs/x264-svn-20060810 With this set workaround does not work, to successfully emerge gpac with USE="ffmpeg" you have to add following line to the ebuild: sed -i -e 's:FFMPEG_VERSION:"LIBAVCODEC_VERSION":' "${S}/modules/ffmpeg_in/ffmpeg_decode.c" then it emerges fine as long as ffmpeg is already emerged.
The same problem with me.
Hi, the problem with FFMPEG_VERSION is a different one and is independant of the circular dependency problem, I've submitted a patch for it, see bug #148939 And, unless there is some behaviors of the C preprocessor that I'm not aware of, using "LIBAVCODEC_VERSION" instead of FFMPEG_VERSION will only produce a string containing "LIBAVCODEC_VERSION" instead of a string where the version has been replaced by the correct version number when the source is compiled.
*** Bug 157081 has been marked as a duplicate of this bug. ***
(In reply to comment #3) > I'm not sure which package is important so I'll list all: > media-video/gpac-0.4.2 > media-video/ffmpeg-0.4.9_p20060816 > media-libs/x264-svn-20060810 > With this set workaround does not work, to successfully emerge > gpac with USE="ffmpeg" you have to add following line to the ebuild: > sed -i -e 's:FFMPEG_VERSION:"LIBAVCODEC_VERSION":' > "${S}/modules/ffmpeg_in/ffmpeg_decode.c" > then it emerges fine as long as ffmpeg is already emerged. > I used USE="-*" emerge x264-svn as a workaround for me
x264-svn ebuilds have been splitted in ~arch, media-libs/x264-svn now install only the x264 libraries and media-video/x264-svn-encoder the encoder part that needs gpac. This solves the circular dependencies problem. Now, we have to wait a little bit and then I'll backport this to the stable x264-svn and we'll get rid of this bug.
x264-svn-20060612[0]: x264-svn-20061014[0]: x264-svn-20061014-r1[0]: alpha amd64 ppc ppc64 sparc x86 ffmpeg-0.4.9_p20050226-r3[0]: ~mips ffmpeg-0.4.9_p20051216[0]: -* arm ffmpeg-0.4.9_p20060302[0]: ~arm ~ppc-macos ffmpeg-0.4.9_p20060530[0]: -* ffmpeg-0.4.9_p20060816[0]: -* ffmpeg-0.4.9_p20061016[0]: -* alpha amd64 hppa ia64 ppc ppc64 sparc x86 ffmpeg-0.4.9_p20070129[0]: -* ~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd gpac-0.4.0[0]: (M) ~x86 ~ppc gpac-0.4.1_pre20060122[0]: gpac-0.4.1_pre20060122-r1[0]: gpac-0.4.2[0]: gpac-0.4.2-r1[0]: ~alpha amd64 ppc ppc64 x86 ~x86-fbsd this should be fine now, thus closing.