Want to subscribe to topics you're interested in?
Become a Member

Beta Branch update addons/ffmpeg.sh check for unsupported php 7 installs in 123.0…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jan 29, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    2:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    update addons/ffmpeg.sh check for unsupported php 7 installs in 123.09beta01

    ffmpeg php extension code doesn't support PHP 7.0 or 7.1 branches so added check for it to prevent ffmpeg php extension from trying to install.

    example ffmpeg php extension errors with PHP 7
    Code (Text):
    /usr/local/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
    ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1336:5: error: too many arguments to function ‘zend_hash_find’
    GET_MOVIE_RESOURCE(ffmovie_ctx);
    ^
    In file included from /usr/local/include/php/Zend/zend.h:36:0,
    from /usr/local/include/php/main/php.h:35,
    from /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:36:
    /usr/local/include/php/Zend/zend_hash.h:161:30: note: declared here
    ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:56:62: warning: comparison between pointer and integer [enabled by default]
    sizeof("ffmpeg_movie"), (void **)&_tmp_zval) == FAILURE) {\
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1336:5: note: in expansion of macro ‘GET_MOVIE_RESOURCE’
    GET_MOVIE_RESOURCE(ffmovie_ctx);
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:61:40: error: expected expression before ‘ff_movie_context’
    ZEND_FETCH_RESOURCE2(ff_movie_ctx, ff_movie_context*, _tmp_zval, -1,\
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1336:5: note: in expansion of macro ‘GET_MOVIE_RESOURCE’
    GET_MOVIE_RESOURCE(ffmovie_ctx);
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getPixelAspectRatio’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1401:5: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default]
    GET_MOVIE_RESOURCE(ffmovie_ctx);
    ^
    In file included from /usr/local/include/php/Zend/zend.h:36:0,
    from /usr/local/include/php/main/php.h:35,
    from /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:36:
    /usr/local/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
    ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1401:5: error: too many arguments to function ‘zend_hash_find’
    GET_MOVIE_RESOURCE(ffmovie_ctx);
    ^
    In file included from /usr/local/include/php/Zend/zend.h:36:0,
    from /usr/local/include/php/main/php.h:35,
    from /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:36:
    /usr/local/include/php/Zend/zend_hash.h:161:30: note: declared here
    ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:56:62: warning: comparison between pointer and integer [enabled by default]
    sizeof("ffmpeg_movie"), (void **)&_tmp_zval) == FAILURE) {\
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1401:5: note: in expansion of macro ‘GET_MOVIE_RESOURCE’
    GET_MOVIE_RESOURCE(ffmovie_ctx);
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:61:40: error: expected expression before ‘ff_movie_context’
    ZEND_FETCH_RESOURCE2(ff_movie_ctx, ff_movie_context*, _tmp_zval, -1,\
    ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1401:5: note: in expansion of macro ‘GET_MOVIE_RESOURCE’
    GET_MOVIE_RESOURCE(ffmovie_ctx);
    ^
    make: *** [ffmpeg_movie.lo] Error 1
    
    


    Continue reading...

    123.09beta01 branch
     
    Last edited: Jan 29, 2017
  2. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    2:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    php 5.6.30 works with ffmpeg php extension though
    Code (Text):
    php -v
    PHP 5.6.30 (cli) (built: Jan 28 2017 22:48:11) 
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologie
    

    Code (Text):
    /opt/bin/ffmpeg -version
    ffmpeg version git-2017-01-28-dce8634 Copyright (c) 2000-2017 the FFmpeg developers
    built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
    configuration: --prefix=/opt/ffmpeg --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --bindir=/opt/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-swscale --enable-shared
    libavutil      55. 45.100 / 55. 45.100
    libavcodec     57. 75.100 / 57. 75.100
    libavformat    57. 65.100 / 57. 65.100
    libavdevice    57.  2.100 / 57.  2.100
    libavfilter     6. 71.100 /  6. 71.100
    libswscale      4.  3.101 /  4.  3.101
    libswresample   2.  4.100 /  2.  4.100
    libpostproc    54.  2.100 / 54.  2.100
    

    Code (Text):
    php --ri ffmpeg
    
    ffmpeg
    
    ffmpeg-php version => 0.7.0
    ffmpeg-php built on => Jan 28 2017 22:50:26
    ffmpeg-php gd support  => disabled
    ffmpeg libavcodec version => Lavc57.75.100
    ffmpeg libavcodec license => nonfree and unredistributable
    ffmpeg libavformat version => Lavf57.65.100
    ffmpeg libavformat license => nonfree and unredistributable
    ffmpeg swscaler version => SwS4.3.101
    ffmpeg swscaler license => nonfree and unredistributable
    ffmpeg codec_list => a64multi(v), a64multi5(v), aasc(v), aic(v), alias_pix(v), alias_pix(v), amv(v), amv(v), anm(v), ansi(v), apng(v), apng(v), asv1(v), asv1(v), asv2(v), asv2(v), aura(v), aura2(v), avrp(v), avrp(v), avrn(v), avs(v), avui(v), avui(v), ayuv(v), ayuv(v), bethsoftvid(v), bfi(v), binkvideo(v), bmp(v), bmp(v), bmv_video(v), brender_pix(v), c93(v), cavs(v), cdgraphics(v), cdxl(v), cfhd(v), cinepak(v), cinepak(v), cljr(v), cljr(v), cllc(v), comfortnoise(a), comfortnoise(a), cpia(v), camstudio(v), cyuv(v), dds(v), dfa(v), dirac(v), dnxhd(v), dnxhd(v), dpx(v), dpx(v), dsicinvideo(v), dvaudio(a), dvvideo(v), dvvideo(v), dxa(v), dxtory(v), dxv(v), eacmv(v), eamad(v), eatgq(v), eatgv(v), eatqi(v), 8bps(v), 8svx_exp(a), 8svx_fib(a), escape124(v), escape130(v), exr(v), ffv1(v), ffv1(v), ffvhuff(v), ffvhuff(v), fic(v), flashsv(v), flashsv(v), flashsv2(v), flashsv2(v), flic(v), flv(v), flv(v), 4xm(v), fraps(v), frwu(v), g2m(v), gif(v), gif(v), h261(v), h261(v), h263(v), h263(v), h263i(v), h263p(v), h263p(v), h264(v), hap(v), hevc(v), hnm4video(v), hq_hqa(v), hqx(v), huffyuv(v), huffyuv(v), idcinvideo(v), iff(v), indeo2(v), indeo3(v), indeo4(v), indeo5(v), interplayvideo(v), jpeg2000(v), jpeg2000(v), jpegls(v), jpegls(v), jv(v), kgv1(v), kmvc(v), lagarith(v), ljpeg(v), loco(v), m101(v), magicyuv(v), mdec(v), mimic(v), mjpeg(v), mjpeg(v), mjpegb(v), mmvideo(v), motionpixels(v), mpeg1video(v), mpeg1video(v), mpeg2video(v), mpeg2video(v), mpeg4(v), mpeg4(v), mpegvideo(v), msa1(v), msmpeg4v1(v), msmpeg4v2(v), msmpeg4v2(v), msmpeg4(v), msmpeg4(v), msrle(v), mss1(v), mss2(v), msvideo1(v), msvideo1(v), mszh(v), mts2(v), mvc1(v), mvc2(v), mxpeg(v), nuv(v), paf_video(v), pam(v), pam(v), pbm(v), pbm(v), pcx(v), pcx(v), pgm(v), pgm(v), pgmyuv(v), pgmyuv(v), pictor(v), pixlet(v), png(v), png(v), ppm(v), ppm(v), prores(v), prores(v), prores_aw(v), prores_ks(v), prores_lgpl(v), psd(v), ptx(v), qdraw(v), qpeg(v), qtrle(v), qtrle(v), r10k(v), r10k(v), r210(v), r210(v), rawvideo(v), rawvideo(v), rl2(v), roqvideo(v), roqvideo(v), rpza(v), rscc(v), rv10(v), rv10(v), rv20(v), rv20(v), rv30(v), rv40(v), s302m(a), s302m(a), sanm(v), screenpresso(v), sdx2_dpcm(a), sgi(v), sgi(v), sgirle(v), sheervideo(v), smackvid(v), smc(v), smvjpeg(v), snow(v), snow(v), sp5x(v), speedhq(v), sunrast(v), sunrast(v), svq1(v), svq1(v), svq3(v), targa(v), targa(v), targa_y216(v), tdsc(v), theora(v), thp(v), tiertexseqvideo(v), tiff(v), tiff(v), tmv(v), truemotion1(v), truemotion2(v), truemotion2rt(v), camtasia(v), tscc2(v), txd(v), ultimotion(v), utvideo(v), utvideo(v), v210(v), v210(v), v210x(v), v308(v), v308(v), v408(v), v408(v), v410(v), v410(v), vb(v), vble(v), vc1(v), vc1image(v), vc2(v), vcr1(v), vmdvideo(v), vmnc(v), vp3(v), vp5(v), vp6(v), vp6a(v), vp6f(v), vp7(v), vp8(v), vp9(v), vqavideo(v), webp(v), wrapped_avframe(v), wmv1(v), wmv1(v), wmv2(v), wmv2(v), wmv3(v), wmv3image(v), wnv1(v), xan_wc3(v), xan_wc4(v), xbm(v), xbm(v), xface(v), xface(v), xl(v), xwd(v), xwd(v), y41p(v), y41p(v), ylc(v), yop(v), yuv4(v), yuv4(v), 012v(v), zerocodec(v), zlib(v), zlib(v), zmbv(v), zmbv(v), aac(a), aac(a), aac_fixed(a), aac_latm(a), ac3(a), ac3(a), ac3_fixed(a), ac3_fixed(a), alac(a), alac(a), als(a), amrnb(a), amrwb(a), ape(a), atrac1(a), atrac3(a), atrac3plus(a), binkaudio_dct(a), binkaudio_rdft(a), bmv_audio(a), cook(a), dca(a), dca(a), dsd_lsbf(a), dsd_msbf(a), dsd_lsbf_planar(a), dsd_msbf_planar(a), dsicinaudio(a), dss_sp(a), dst(a), eac3(a), eac3(a), evrc(a), wavesynth(a), flac(a), flac(a), g723_1(a), g723_1(a), g729(a), gsm(a), gsm_ms(a), iac(a), imc(a), interplayacm(a), mace3(a), mace6(a), metasound(a), mlp(a), mlp(a), mp1(a), mp1float(a), mp2(a), mp2(a), mp2float(a), mp2fixed(a), mp3(a), mp3float(a), mp3adu(a), mp3adufloat(a), mp3on4(a), mp3on4float(a), mpc7(a), mpc8(a), nellymoser(a), nellymoser(a), on2avc(a), opus(a), paf_audio(a), qcelp(a), qdm2(a), qdmc(a), real_144(a), real_144(a), real_288(a), ralf(a), shorten(a), sipr(a), smackaud(a), sonic(a), sonic(a), sonicls(a), tak(a), truehd(a), truehd(a), truespeech(a), tta(a), tta(a), twinvq(a), vmdaudio(a), vorbis(a), vorbis(a), wavpack(a), wavpack(a), wmalossless(a), wmapro(a), wmav1(a), wmav1(a), wmav2(a), wmav2(a), wmavoice(a), ws_snd1(a), xma1(a), xma2(a), pcm_alaw(a), pcm_alaw(a), pcm_bluray(a), pcm_dvd(a), pcm_f16le(a), pcm_f24le(a), pcm_f32be(a), pcm_f32be(a), pcm_f32le(a), pcm_f32le(a), pcm_f64be(a), pcm_f64be(a), pcm_f64le(a), pcm_f64le(a), pcm_lxf(a), pcm_mulaw(a), pcm_mulaw(a), pcm_s8(a), pcm_s8(a), pcm_s8_planar(a), pcm_s8_planar(a), pcm_s16be(a), pcm_s16be(a), pcm_s16be_planar(a), pcm_s16be_planar(a), pcm_s16le(a), pcm_s16le(a), pcm_s16le_planar(a), pcm_s16le_planar(a), pcm_s24be(a), pcm_s24be(a), pcm_s24daud(a), pcm_s24daud(a), pcm_s24le(a), pcm_s24le(a), pcm_s24le_planar(a), pcm_s24le_planar(a), pcm_s32be(a), pcm_s32be(a), pcm_s32le(a), pcm_s32le(a), pcm_s32le_planar(a), pcm_s32le_planar(a), pcm_s64be(a), pcm_s64be(a), pcm_s64le(a), pcm_s64le(a), pcm_u8(a), pcm_u8(a), pcm_u16be(a), pcm_u16be(a), pcm_u16le(a), pcm_u16le(a), pcm_u24be(a), pcm_u24be(a), pcm_u24le(a), pcm_u24le(a), pcm_u32be(a), pcm_u32be(a), pcm_u32le(a), pcm_u32le(a), pcm_zork(a), interplay_dpcm(a), roq_dpcm(a), roq_dpcm(a), sol_dpcm(a), xan_dpcm(a), adpcm_4xm(a), adpcm_adx(a), adpcm_adx(a), adpcm_afc(a), adpcm_aica(a), adpcm_ct(a), adpcm_dtk(a), adpcm_ea(a), adpcm_ea_maxis_xa(a), adpcm_ea_r1(a), adpcm_ea_r2(a), adpcm_ea_r3(a), adpcm_ea_xas(a), g722(a), g722(a), g726(a), g726(a), g726le(a), adpcm_ima_amv(a), adpcm_ima_apc(a), adpcm_ima_dat4(a), adpcm_ima_dk3(a), adpcm_ima_dk4(a), adpcm_ima_ea_eacs(a), adpcm_ima_ea_sead(a), adpcm_ima_iss(a), adpcm_ima_oki(a), adpcm_ima_qt(a), adpcm_ima_qt(a), adpcm_ima_rad(a), adpcm_ima_smjpeg(a), adpcm_ima_wav(a), adpcm_ima_wav(a), adpcm_ima_ws(a), adpcm_ms(a), adpcm_ms(a), adpcm_mtaf(a), adpcm_psx(a), adpcm_sbpro_2(a), adpcm_sbpro_3(a), adpcm_sbpro_4(a), adpcm_swf(a), adpcm_swf(a), adpcm_thp(a), adpcm_thp_le(a), adpcm_vima(a), adpcm_xa(a), adpcm_yamaha(a), adpcm_yamaha(a), ssa(s), ssa(s), ass(s), ass(s), cc_dec(s), dvbsub(s), dvbsub(s), dvdsub(s), dvdsub(s), jacosub(s), microdvd(s), mov_text(s), mov_text(s), mpl2(s), pgssub(s), pjs(s), realtext(s), sami(s), srt(s), srt(s), stl(s), subrip(s), subrip(s), subviewer(s), subviewer1(s), text(s), text(s), vplayer(s), webvtt(s), webvtt(s), xsub(s), xsub(s), libfdk_aac(a), libfdk_aac(a), libmp3lame(a), libopus(a), libopus(a), libvorbis(a), libvorbis(a), libvpx(v), libvpx(v), libvpx-vp9(v), libvpx-vp9(v), libx264(v), libx264rgb(v), libx265(v), bintext(v), xbin(v), idf(v), h264_cuvid(v), h264_nvenc(v), nvenc(v), nvenc_h264(v), nvenc_hevc(v), hevc_cuvid(v), hevc_nvenc(v), mjpeg_cuvid(v), mpeg1_cuvid(v), mpeg2_cuvid(v), mpeg4_cuvid(v), vc1_cuvid(v), vp8_cuvid(v), vp9_cuvid(v),
    
    Directive => Local Value => Master Value
    ffmpeg.allow_persistent => 0 => 0
    ffmpeg.show_warnings => 0 => 0
    
     
    Last edited: Jan 29, 2017