mehedi
mehedi

Reputation: 3

ffmpeg-php installation shows error in centos

I am a newbie in Centos. I installed ffmpeg in my server using yum command. I want to install ffmpeg-php. I downloaded the source file from :

http://ffmpeg-php.svn.sourceforge.net/viewvc/ffmpeg-php/trunk/ffmpeg-php/?view=tar

After extraction I use the following commands :

  1. phpize
  2. ./configure --enable-shared

But when I try to make the build it gets the following error :

/bin/sh /usr/local/src/ffmpeg-php-0.6.0/libtool --mode=compile cc  -I. -I/usr/local

/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing   -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo 
libtool: compile:  cc -I. -I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c  -fPIC -DPIC -o .libs/ffmpeg-php.o
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:405,
                 from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/bits/stat.h:73: error: field ‘st_atim’ has incomplete type
/usr/include/bits/stat.h:74: error: field ‘st_mtim’ has incomplete type
/usr/include/bits/stat.h:75: error: field ‘st_ctim’ has incomplete type
/usr/include/bits/stat.h:119: error: field ‘st_atim’ has incomplete type
/usr/include/bits/stat.h:120: error: field ‘st_mtim’ has incomplete type
/usr/include/bits/stat.h:121: 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:405,
                 from /usr/local/src/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:411,
                 from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/php/TSRM/tsrm_virtual_cwd.h:212: error: expected specifier-qualifier-list before ‘time_t’
/usr/include/php/TSRM/tsrm_virtual_cwd.h:240: error: expected declaration specifiers or ‘...’ before ‘time_t’
In file included from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:46:
/usr/local/include/libswscale/swscale.h:140: warning: ‘enum AVPixelFormat’ declared inside parameter list
/usr/local/include/libswscale/swscale.h:146: warning: ‘enum AVPixelFormat’ declared inside parameter list
/usr/local/include/libswscale/swscale.h:189: warning: ‘enum AVPixelFormat’ declared inside parameter list
/usr/local/include/libswscale/swscale.h:316: warning: ‘enum AVPixelFormat’ declared inside parameter list
make: *** [ffmpeg-php.lo] Error 1

Please help !!!

Upvotes: 0

Views: 2806

Answers (2)

Lakshmikandan
Lakshmikandan

Reputation: 4647

I am not sure is this right solution,

In your ffmpeg-php* folder change all the files with extensions '.loT' to extension 'lo'

Just download the package from the ffmpeg site by git command and configure it,

# yum install git
#  git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
# ./configure --enable-shared ... ...

I hope the issue should be solved.

Upvotes: 0

aurys
aurys

Reputation: 11

In your ffmpeg-php* folder change all the files with extensions '.loT' to extension 'lo'

Upvotes: 1

Related Questions