make: *** [ffmpeg_movie.lo] Error 1 when compiling

2019-04-17 10:33发布

问题:

I've basically exhausted myself searching Google and trying to address an error I get when compiling ffmpeg-php on a CentOS / 6.4-64 with PHP 5.4.20 and Apache v2.2.25 (cgi-fcgi).

I end up getting the following when trying to compile. Does anyone have any ideas on how to fix/address this?

/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:311: error: âlist_entryâ undeclared (first use in this function)

/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:311: error: (Each undeclared identifier is reported only once /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:311: error: for each function it appears in.) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:311: error: âleâ undeclared (first use in this function) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:346: error: expected â;â before ânew_leâ /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:356: error: ânew_leâ undeclared (first use in this function) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function âzim_ffmpeg_movie_getCommentâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:531: warning: âcommentâ is deprecated (declared at /usr/local/include/l ibavformat/avformat.h:760) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:531: warning: âcommentâ is deprecated (declared at /usr/local/include/l ibavformat/avformat.h:760) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function âzim_ffmpeg_movie_getTitleâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:546: warning: âtitleâ is deprecated (declared at /usr/local/include/lib avformat/avformat.h:757) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:546: warning: âtitleâ is deprecated (declared at /usr/local/include/lib avformat/avformat.h:757) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function âzim_ffmpeg_movie_getAuthorâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:561: warning: âauthorâ is deprecated (declared at /usr/local/include/li bavformat/avformat.h:758) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:561: warning: âauthorâ is deprecated (declared at /usr/local/include/li bavformat/avformat.h:758) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function âzim_ffmpeg_movie_getCopyrightâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:575: warning: âcopyrightâ is deprecated (declared at /usr/local/include /libavformat/avformat.h:759) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:575: warning: âcopyrightâ is deprecated (declared at /usr/local/include /libavformat/avformat.h:759) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function âzim_ffmpeg_movie_getAlbumâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:590: warning: âalbumâ is deprecated (declared at /usr/local/include/lib avformat/avformat.h:761) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:590: warning: âalbumâ is deprecated (declared at /usr/local/include/lib avformat/avformat.h:761) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function âzim_ffmpeg_movie_getGenreâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:604: warning: âgenreâ is deprecated (declared at /usr/local/include/lib avformat/avformat.h:764) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:604: warning: âgenreâ is deprecated (declared at /usr/local/include/lib avformat/avformat.h:764) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function âzim_ffmpeg_movie_getTrackNumberâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:619: warning: âtrackâ is deprecated (declared at /usr/local/include/libavformat/avformat.h:763) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function âzim_ffmpeg_movie_getYearâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:632: warning: âyearâ is deprecated (declared at /usr/local/include/libavformat/avformat.h:762) /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function â_php_read_av_frameâ: /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:1215: warning: âavcodec_decode_videoâ is deprecated (declared at /usr/l ocal/include/libavcodec/avcodec.h:3656) make: * [ffmpeg_movie.lo] Error 1

回答1:

after ripping my eyeballs out... this will fix the problem:

Changes in ffmpeg_movie.c:

  • row 311: list_entry *le; to zend_rsrc_list_entry *le;
  • row 346: list_entry new_le; to zend_rsrc_list_entry new_le;
  • row 360: hashkey_length+1, (void *)&new_le, sizeof(list_entry), to hashkey_length+1, (void *)&new_le,sizeof(zend_rsrc_list_entry),

Thats all... change it and make it