<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 59: Compile against newer ffmpeg fails because of avutil/time.h</title><link href="https://sourceforge.net/p/ffmpeg-php/bugs/59/" rel="alternate"/><link href="https://sourceforge.net/p/ffmpeg-php/bugs/59/feed.atom" rel="self"/><id>https://sourceforge.net/p/ffmpeg-php/bugs/59/</id><updated>2014-04-20T21:15:22.517000Z</updated><subtitle>Recent changes to 59: Compile against newer ffmpeg fails because of avutil/time.h</subtitle><entry><title>Compile against newer ffmpeg fails because of avutil/time.h</title><link href="https://sourceforge.net/p/ffmpeg-php/bugs/59/" rel="alternate"/><published>2014-04-20T21:15:22.517000Z</published><updated>2014-04-20T21:15:22.517000Z</updated><author><name>Casper Langemeijer</name><uri>https://sourceforge.net/u/langemeijer/</uri></author><id>https://sourceforge.net8ffd2bf445538f3b6436c8ae52612720452a5f2e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Compiling this extension against a newer ffmpeg library (at least the one on ubuntu trusty) aborts with the following errors:&lt;/p&gt;
&lt;p&gt;In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:105:0,&lt;br /&gt;
                 from /usr/include/php5/main/php_streams.h:28,&lt;br /&gt;
                 from /usr/include/php5/main/php.h:395,&lt;br /&gt;
                 from /root/ffmpeg-php-0.7.0/ffmpeg-php.c:40:&lt;br /&gt;
/usr/include/x86_64-linux-gnu/bits/stat.h:91:21: error: field 'st_atim' has incomplete type&lt;br /&gt;
     struct timespec st_atim;  /&lt;em&gt; Time of last access.  &lt;/em&gt;/&lt;br /&gt;
                     ^&lt;br /&gt;
/usr/include/x86_64-linux-gnu/bits/stat.h:92:21: error: field 'st_mtim' has incomplete type&lt;br /&gt;
     struct timespec st_mtim;  /&lt;em&gt; Time of last modification.  &lt;/em&gt;/&lt;br /&gt;
                     ^&lt;br /&gt;
/usr/include/x86_64-linux-gnu/bits/stat.h:93:21: error: field 'st_ctim' has incomplete type&lt;br /&gt;
     struct timespec st_ctim;  /&lt;em&gt; Time of last status change.  &lt;/em&gt;/&lt;br /&gt;
                     ^&lt;br /&gt;
/usr/include/x86_64-linux-gnu/bits/stat.h:152:21: error: field 'st_atim' has incomplete type&lt;br /&gt;
     struct timespec st_atim;  /&lt;em&gt; Time of last access.  &lt;/em&gt;/&lt;br /&gt;
                     ^&lt;br /&gt;
/usr/include/x86_64-linux-gnu/bits/stat.h:153:21: error: field 'st_mtim' has incomplete type&lt;br /&gt;
     struct timespec st_mtim;  /&lt;em&gt; Time of last modification.  &lt;/em&gt;/&lt;br /&gt;
                     ^&lt;br /&gt;
/usr/include/x86_64-linux-gnu/bits/stat.h:154:21: error: field 'st_ctim' has incomplete type&lt;br /&gt;
     struct timespec st_ctim;  /&lt;em&gt; Time of last status change.  &lt;/em&gt;/&lt;br /&gt;
                     ^&lt;br /&gt;
In file included from /usr/include/php5/main/php_streams.h:28:0,&lt;br /&gt;
                 from /usr/include/php5/main/php.h:395,&lt;br /&gt;
                 from /root/ffmpeg-php-0.7.0/ffmpeg-php.c:40:&lt;br /&gt;
/usr/include/x86_64-linux-gnu/sys/stat.h:365:31: error: array type has incomplete element type&lt;br /&gt;
         const struct timespec &lt;strong&gt;times&lt;span&gt;&lt;span&gt;[2]&lt;/span&gt;&lt;/span&gt;,&lt;br /&gt;
                               ^&lt;br /&gt;
/usr/include/x86_64-linux-gnu/sys/stat.h:372:54: error: array type has incomplete element type&lt;br /&gt;
 extern int futimens (int &lt;/strong&gt;fd, const struct timespec &lt;strong&gt;times&lt;span&gt;&lt;span&gt;[2]&lt;/span&gt;&lt;/span&gt;) &lt;/strong&gt;THROW;&lt;br /&gt;
                                                      ^&lt;br /&gt;
In file included from /usr/include/php5/main/php.h:401:0,&lt;br /&gt;
                 from /root/ffmpeg-php-0.7.0/ffmpeg-php.c:40:&lt;br /&gt;
/usr/include/php5/TSRM/tsrm_virtual_cwd.h:218:2: error: unknown type name 'time_t'&lt;br /&gt;
  time_t                         expires;&lt;br /&gt;
  ^&lt;br /&gt;
/usr/include/php5/TSRM/tsrm_virtual_cwd.h:246:86: error: unknown type name 'time_t'&lt;br /&gt;
 CWD_API realpath_cache_bucket&lt;em&gt; realpath_cache_lookup(const char &lt;/em&gt;path, int path_len, time_t t TSRMLS_DC);&lt;br /&gt;
                                                                                      ^&lt;br /&gt;
/root/ffmpeg-php-0.7.0/ffmpeg-php.c: In function 'zm_info_ffmpeg':&lt;br /&gt;
/root/ffmpeg-php-0.7.0/ffmpeg-php.c:194:38: warning: cast from pointer to integer of different size &lt;span&gt;[-Wpointer-to-int-cast]&lt;/span&gt;&lt;br /&gt;
     m_codec_list&lt;span&gt;[m_codec_list_len]&lt;/span&gt; = (char)NULL;&lt;br /&gt;
                                      ^&lt;/p&gt;
&lt;p&gt;Found the solution to the problem here:&lt;br /&gt;
&lt;a href="http://trac.osgeo.org/grass/ticket/2017#comment:12" rel="nofollow"&gt;http://trac.osgeo.org/grass/ticket/2017#comment:12&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The reason is that /usr/include/libavutil already contains time.h header file&lt;br /&gt;
It appears that they really don't want anyone else to use their library.&lt;/p&gt;
&lt;p&gt;I've implemented the suggestions as made in &lt;a href="http://trac.osgeo.org/grass/ticket/2017#comment:13" rel="nofollow"&gt;http://trac.osgeo.org/grass/ticket/2017#comment:13&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Apply the patchfile as attached to solve this problem.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>