<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 61: Getting errors while compiling with php 7.1 or above</title><link href="https://sourceforge.net/p/ffmpeg-php/bugs/61/" rel="alternate"/><link href="https://sourceforge.net/p/ffmpeg-php/bugs/61/feed.atom" rel="self"/><id>https://sourceforge.net/p/ffmpeg-php/bugs/61/</id><updated>2023-12-27T11:14:21.067000Z</updated><subtitle>Recent changes to 61: Getting errors while compiling with php 7.1 or above</subtitle><entry><title>Getting errors while compiling with php 7.1 or above</title><link href="https://sourceforge.net/p/ffmpeg-php/bugs/61/" rel="alternate"/><published>2023-12-27T11:14:21.067000Z</published><updated>2023-12-27T11:14:21.067000Z</updated><author><name>Adesh Rane</name><uri>https://sourceforge.net/u/adeshrane/</uri></author><id>https://sourceforge.net055c6521f09eebd15e1e8a2fdb146ac9dd000b8a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi &lt;/p&gt;
&lt;p&gt;Iam trying to compile this extension with php 7.1 and php 8.1 but getting below error&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[root@localhost ffmpeg-php-0.6.0]&lt;/span&gt;# make&lt;br/&gt;
/bin/sh /setups/ffmpeg-php-0.6.0/libtool --mode=compile cc -I. -I/setups/ffmpeg-php-0.6.0 -I/setups/ffmpeg-php-0.6.0/include -I/setups/ffmpeg-php-0.6.0/main -I/setups/ffmpeg-php-0.6.0 -I/usr/local/apps/php81/include/php -I/usr/local/apps/php81/include/php/main -I/usr/local/apps/php81/include/php/TSRM -I/usr/local/apps/php81/include/php/Zend -I/usr/local/apps/php81/include/php/ext -I/usr/local/apps/php81/include/php/ext/date/lib -I/usr/local/apps/ffmpeg//include/libavcodec/ -I/usr/local/apps/ffmpeg//include/libavformat/ -I/usr/local/apps/ffmpeg//include/libavutil/ -I/usr/local/apps/ffmpeg//include/libswscale/ -I/usr/local/apps/ffmpeg//include/libavfilter/ -I/usr/local/apps/ffmpeg//include/libavdevice/  -I/usr/local/apps/ffmpeg/include -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing    -DZEND_COMPILE_DL_EXT=1 -c /setups/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo  -MMD -MF ffmpeg-php.dep -MT ffmpeg-php.lo&lt;br/&gt;
mkdir .libs&lt;br/&gt;
 cc -I. -I/setups/ffmpeg-php-0.6.0 -I/setups/ffmpeg-php-0.6.0/include -I/setups/ffmpeg-php-0.6.0/main -I/setups/ffmpeg-php-0.6.0 -I/usr/local/apps/php81/include/php -I/usr/local/apps/php81/include/php/main -I/usr/local/apps/php81/include/php/TSRM -I/usr/local/apps/php81/include/php/Zend -I/usr/local/apps/php81/include/php/ext -I/usr/local/apps/php81/include/php/ext/date/lib -I/usr/local/apps/ffmpeg//include/libavcodec/ -I/usr/local/apps/ffmpeg//include/libavformat/ -I/usr/local/apps/ffmpeg//include/libavutil/ -I/usr/local/apps/ffmpeg//include/libswscale/ -I/usr/local/apps/ffmpeg//include/libavfilter/ -I/usr/local/apps/ffmpeg//include/libavdevice/ -I/usr/local/apps/ffmpeg/include -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -DZEND_COMPILE_DL_EXT=1 -c /setups/ffmpeg-php-0.6.0/ffmpeg-php.c -MMD -MF ffmpeg-php.dep -MT ffmpeg-php.lo  -fPIC -DPIC -o .libs/ffmpeg-php.o&lt;br/&gt;
In file included from /usr/include/sys/stat.h:106:0,&lt;br/&gt;
                 from /usr/local/apps/php81/include/php/Zend/zend_stream.h:26,&lt;br/&gt;
                 from /usr/local/apps/php81/include/php/Zend/zend.h:38,&lt;br/&gt;
                 from /usr/local/apps/php81/include/php/main/php.h:31,&lt;br/&gt;
                 from /setups/ffmpeg-php-0.6.0/ffmpeg-php.c:40:&lt;br/&gt;
/usr/include/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/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/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/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/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/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/local/apps/php81/include/php/Zend/zend_stream.h:26:0,&lt;br/&gt;
                 from /usr/local/apps/php81/include/php/Zend/zend.h:38,&lt;br/&gt;
                 from /usr/local/apps/php81/include/php/main/php.h:31,&lt;br/&gt;
                 from /setups/ffmpeg-php-0.6.0/ffmpeg-php.c:40:&lt;br/&gt;
/usr/include/sys/stat.h:366:31: error: array type has incomplete element type&lt;br/&gt;
         const struct timespec __times&lt;span&gt;[2]&lt;/span&gt;,&lt;br/&gt;
                               ^&lt;br/&gt;
/usr/include/sys/stat.h:373:54: error: array type has incomplete element type&lt;br/&gt;
 extern int futimens (int __fd, const struct timespec __times&lt;span&gt;[2]&lt;/span&gt;) __THROW;&lt;br/&gt;
                                                      ^&lt;br/&gt;
In file included from /usr/local/apps/php81/include/php/main/php.h:423:0,&lt;br/&gt;
                 from /setups/ffmpeg-php-0.6.0/ffmpeg-php.c:40:&lt;br/&gt;
/usr/local/apps/php81/include/php/Zend/zend_virtual_cwd.h:209:2: error: unknown type name ‘time_t’&lt;br/&gt;
  time_t                         expires;&lt;br/&gt;
  ^&lt;br/&gt;
/usr/local/apps/php81/include/php/Zend/zend_virtual_cwd.h:240:89: 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, size_t path_len, time_t t);&lt;br/&gt;
                                                                                         ^&lt;br/&gt;
In file included from /usr/local/apps/ffmpeg/include/libavutil/avutil.h:301:0,&lt;br/&gt;
                 from /usr/local/apps/ffmpeg//include/libavcodec/avcodec.h:32,&lt;br/&gt;
                 from /setups/ffmpeg-php-0.6.0/ffmpeg-php.c:42:&lt;br/&gt;
/usr/local/apps/ffmpeg/include/libavutil/common.h: In function ‘av_sat_add64_c’:&lt;br/&gt;
/usr/local/apps/ffmpeg/include/libavutil/common.h:354:20: warning: suggest parentheses around arithmetic in operand of ‘|’ &lt;span&gt;[-Wparentheses]&lt;/span&gt;&lt;br/&gt;
     if ((int64_t)(a^b | ~s^b) &amp;gt;= 0)&lt;br/&gt;
                    ^&lt;br/&gt;
/setups/ffmpeg-php-0.6.0/ffmpeg-php.c: In function ‘zm_startup_ffmpeg’:&lt;br/&gt;
/setups/ffmpeg-php-0.6.0/ffmpeg-php.c:94:5: warning: implicit declaration of function ‘avcodec_init’ &lt;span&gt;[-Wimplicit-function-declaration]&lt;/span&gt;&lt;br/&gt;
     avcodec_init();&lt;br/&gt;
     ^&lt;br/&gt;
/setups/ffmpeg-php-0.6.0/ffmpeg-php.c:97:5: warning: implicit declaration of function ‘av_register_all’ &lt;span&gt;[-Wimplicit-function-declaration]&lt;/span&gt;&lt;br/&gt;
     av_register_all();&lt;br/&gt;
     ^&lt;br/&gt;
make: *** &lt;span&gt;[ffmpeg-php.lo]&lt;/span&gt; Error 1&lt;/p&gt;
&lt;p&gt;can you please provide any solution ??&lt;/p&gt;
&lt;p&gt;thanks for helping in advance.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>