Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: error: field ‘st_atim’ has incomplete type FFMPEG  (Read 5617 times)

0 Members and 1 Guest are viewing this topic.

jominj

  • Guest
error: field ‘st_atim’ has incomplete type FFMPEG
« on: June 28, 2015, 12:05:59 am »
While installing ffmpeg-php-0.6.0  on centos server, if you may came across the below error:
Code: [Select]
In file included from /usr/include/sys/stat.h:107,
 from /usr/include/php/main/php_streams.h:28,
 from /usr/include/php/main/php.h:395,
 from /root/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/bits/stat.h:91: error: field ‘st_atim’ has incomplete type
/usr/include/bits/stat.h:92: error: field ‘st_mtim’ has incomplete type
/usr/include/bits/stat.h:93: error: field ‘st_ctim’ has incomplete type
/usr/include/bits/stat.h:152: error: field ‘st_atim’ has incomplete type
/usr/include/bits/stat.h:153: error: field ‘st_mtim’ has incomplete type
/usr/include/bits/stat.h:154: error: field ‘st_ctim’ has incomplete type
In file included from /usr/include/php/main/php_streams.h:28,
 from /usr/include/php/main/php.h:395,
 from /root/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/sys/stat.h:367: error: array type has incomplete element type
/usr/include/sys/stat.h:374: error: array type has incomplete element type
In file included from /usr/include/php/main/php.h:401,
 from /root/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/php/TSRM/tsrm_virtual_cwd.h:218: error: expected specifier-qualifier-list before ‘time_t’
/usr/include/php/TSRM/tsrm_virtual_cwd.h:246: error: expected declaration specifiers or ‘...’ before ‘time_t’
/root/ffmpeg-php-0.6.0/ffmpeg-php.c: In function ‘zm_startup_ffmpeg’:
/root/ffmpeg-php-0.6.0/ffmpeg-php.c:94: warning: implicit declaration of function ‘avcodec_init’

This error is due to problem with time.h file in ffmpeg-php and the OS time.h file. FFmpeg-php is not being updated for a long time. We can install this bug fixed version from github, please follow below steps:
Code: [Select]
# git clone https://github.com/tony2001/ffmpeg-php.git
# cd ffmpeg-php
# phpize
# ./configure
# make && make install

That's it !