[php-maint] Bug#694143: php5-ffmpeg: FTBFS because of deprecated functions

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Tue Apr 29 10:44:05 UTC 2014


On 28.04.2014 23:37, Mikael Nordfeldth wrote:
> Hello, I would like to present a patch which will help build
> 'php5-ffmpeg' against libav-0.9, after passing a hurdle which is not
> handled by the patch.

thanks for the patch, it works. ;)

> The hurdle is that 'libavutil-dev' has the header file 'time.h':
>     $ apt-file search libavutil/time.h
>     libavutil-dev: /usr/include/libavutil/time.h
>     [...]
> The include path /usr/include/libavutil is added when the build scripts
> configure ffmpeg-php, so the "<time.h>" references in various system
> libraries get pointed to the _wrong_ time.h. The workaround I came up
> with (because I did not come up with a proper solution) was to add:
>     #include "/usr/include/time.h"
> into /usr/include/libavutil/time.h
> If the wrong time.h is read, as is the case for the first issue of this
> FTBFS, several declarations of structs such as 'time_t' are missing.

There is a patch for this in the upstream bug tracker [1], but most of 
this patch is irrelevant for the version in Debian (which probably 
should be updated), as it seems not to include headers from libavutil. 
Attached is a stripped down version, that allows (together with 
building ffmpeg-php with libav9.

> The attached patch fixes the problems which occur _after_ the time.h
> issue is fixed. The patch is designed to be put into the
> 'debian/patches' directory and added last in the 'debian/patches/series'
> file. I don't currently know much more on how to package patches for
> Debian projects :)

This package could use an update to source format 3.0 (quilt) [2].

> While this makes it build alright, there is some kind of problem
> remaining. I get bad frame counts on the getFrameCount() call (45888
> frames instead of something like 190), while referencing frames with
> getFrame(n) still fetches properly, in my test case the last fetchable
> frame being 188.
> So if someone else could please have a look at how to make it build with
> the colliding libavutil/time.h we're soon able to have this package back
> in the repositories :)

I'm wondering if this package should be back in jessie, because upstream 
seems to be dead since 2009 and even with these patches it fails to 
build with FFmpeg2.2/libav10, that are coming to Debian now [3][4]:

/tmp/buildd/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 
/tmp/buildd/ffmpeg-php-0.6.0/ffmpeg_movie.c:955:28: error: 
'AVCodecContext' has no member named 'sub_id'
              if (decoder_ctx->sub_id == 2)
/tmp/buildd/ffmpeg-php-0.6.0/ffmpeg_movie.c:957:33: error: 
'AVCodecContext' has no member named 'sub_id'
              else if (decoder_ctx->sub_id == 1)

sub_id got deprecated and subsequently removed, because "this field is 
unused" [5].

I think, what this package needs is a new upstream.

Best regards,

1: http://sourceforge.net/p/ffmpeg-php/bugs/59/
2: https://wiki.debian.org/Projects/DebSrc3.0
3: https://bugs.debian.org/729203
4: https://bugs.debian.org/739079
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libavutil-time.patch
Type: text/x-diff
Size: 478 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20140429/c247ee07/attachment-0001.patch>

More information about the pkg-php-maint mailing list