ffmpeg-php installation shows error in centos - linux

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 :
phpize
./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 !!!

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

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.

Related

Installation of Kaldi, error on compiling gst-kaldi-nnet2-online on ubuntu 16.04

What i try to do is to install silvius-backend on my ubuntu 16.04 virtual machine, but unfortunately it is not working without the proper compile of both of kaldi and gst-kaldi-nnet2-online .
I have compiled kaldi successfully but I am experiencing a error when i try to compile gst-kaldi-nnet2-online.
I follow these instructions.
Here is what i do:
I am using Ubuntu 16.04.
I have compiled kaldi successfully with the following commands:
in kaldi/tools --> sudo make CXX=g++-5
in kaldi/src --> sudo CXX=g++-5 ./configure --shared, sudo make clean CXX=g++-5 ,sudo make depend CXX=g++-5 ,sudo make CXX=g++-5
I tried to do sudo make depend from ~/gst-kaldi-nnet2-online/src and i got an error like this:
Makefile:6: * Cannot find Kaldi's makefile /home/tanel/tools/kaldi- trunk/src/kaldi.mk. Specify Kaldi's root directory using KALDI_ROOT when issuing make, e.g.: KALDI_ROOT=/home/tanel/tools/kaldi-trunk make . Stop.
So In this path i have changed the path to: "KALDI_ROOT=~/kaldi"
And now i am getting an error like this :
g++-5 -M -std=c++11 -I.. -I/home/silvius/kaldi/tools/openfst/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_ATLAS -I/home/silvius/kaldi/tools/ATLAS_headers/include -msse -msse2 -pthread -g -fPIC -I~/kaldi/src *.cc > .depend.mk
In file included from gst-audio-source.cc:22:0:
./gst-audio-source.h:23:33: fatal error: matrix/kaldi-vector.h: No such file or directory
compilation terminated.
In file included from ./gstkaldinnet2onlinedecoder.h:26:0,
from gstkaldinnet2onlinedecoder.cc:49:
././simple-options-gst.h:25:33: fatal error: util/simple-options.h: No such file or directory
compilation terminated.
In file included from simple-options-gst.cc:20:0:
./simple-options-gst.h:25:33: fatal error: util/simple-options.h: No such file or directory
compilation terminated.
Makefile:76: recipe for target 'depend' failed
make: [depend] Error 1 (ignored)
You can see the error on a picture aswell on this link
PS: the path to my Folders is that ones:
`~/kaldi` for kaldi's folder , and
`~/gst-kaldi-nnet2-online` for the gst-kaldi-nnet2-online.
(i cloned them from github inside `~/` in separated folders)
I dont know what to do next or what is the problem. I've been looking for a solution since days on the internet but i found nothing. Can someone help me?

Cross compile perl for QNX 6.6.0 armle v7

I'm trying to cross compile perl 5.24 using following method since the target machine does not have ssh installed.
https://github.com/arsv/perl-cross
Just for Fyi, my local machine is ubuntu x86_64 GNU/Linux.
I configure the toolchain with the following option:
./configure -Dsysroot=$QNX_TARGET -Dcc=ntoarmv7-gcc -Dtargetarch=armle -Dprefix=$HOME/localperl -Duseshrplib
The reason I think the above scripts worked just fine because it generates the makefile with the following message:
Generating config.h
Extracting config.h (with variable substitutions)
Generating Makefile.config
Configuration completed for native build
platform: x86_64-
c compiler: ntoarmv7-gcc
ld: ntoarmv7-gcc
ar: ar
ranlib: ranlib
when i run the make -j4 option i end up getting either of the following 2 results:
./generate_uudmap uudmap.h bitcount.h mg_data.h
./generate_uudmap: 1: ./generate_uudmap: Syntax error: word unexpected (expecting ")")
make: *** [uudmap.h] Error 2
OR
cp -f op.c opmini.c
cp -f perl.c perlmini.c
cp -f ext/re/re.pm lib/re.pm
sh cflags.SH
cp -f dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp lib/ExtUtils/xsubpp
ntoarmv7-gcc -DPERL_CORE --sysroot=/opt/qnx650/target/qnx6 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -Wno-unused-function -c -o op.o op.c
./miniperl_top lib/unicore/mktables -w -C lib/unicore -P pod -maketest -makelist -p
./miniperl_top: no ./miniperl found; build it before using miniperl_top
make: *** [lib/unicore/CombiningClass.pl] Error 1
I couldn't find much info on how to resolve the above issues. Could it be because i have not provided correct setting options for ./configure ?? If so, can you provide more insight on this.
EDIT:
It looks like i was passing the wrong information to ./configure script (it was considering it as the native rather than cross), I updated it with the following and was able to make bit of progress.
./configure -Dsysroot=/opt/qnx6 -Dcc=arm-unknown-nto-qnx6.6.0eabi-gcc --target-tools-prefix=arm-unknown-nto-qnx6.6.0eabi- --target=arm-unknown-nto-qnx6.6.0eabi --host=arm-unknown-nto-qnx6.6.0eabi -Dprefix=$HOME/localperl
with this, the configuration was successfull for the cross platform. Now when I perform the make, it runs fine for a bit and I run it following error
arm-unknown-nto-qnx6.6.0eabi-ar cru libperl.a op.o perl.o gv.o toke.o perly.o pad.o regcomp.o dump.o dquote.o util.o mg.o reentr.o mro_core.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o keywords.o caretx.o time64.o DynaLoader.o
arm-unknown-nto-qnx6.6.0eabi-ranlib libperl.a
./miniperl_top statars > static.list
./miniperl_top extlibs > ext.libs
arm-unknown-nto-qnx6.6.0eabi-gcc -DPERL_CORE --sysroot=/opt/qnx6 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o perlmain.o perlmain.c
arm-unknown-nto-qnx6.6.0eabi-gcc --sysroot=/opt/qnx6 -Wl,-E -o perl perlmain.o libperl.a
libperl.a(pp.o): In function `Perl_pp_crypt':
pp.c:(.text+0xffd8): warning: The 'crypt' function has been deprecated in libc. Link against liblogin for extended algorithm support.
libperl.a(toke.o): In function `Perl_scan_num':
toke.c:(.text+0x27b82): undefined reference to `pow'
libperl.a(util.o): In function `Perl_drand48_r':
util.c:(.text+0xa36e): undefined reference to `ldexp'
libperl.a(sv.o): In function `S_hextract':
sv.c:(.text+0x13ca0): undefined reference to `frexp'
libperl.a(sv.o): In function `Perl_sv_vcatpvfn_flags':
sv.c:(.text+0x16cc0): undefined reference to `frexp'
libperl.a(time64.o): In function `Perl_gmtime64_r':
time64.c:(.text+0x338c): undefined reference to `fmod'
.
.
time64.c:(.text+0x359c): undefined reference to `floor'
time64.c:(.text+0x37e6): undefined reference to `ceil'
collect2: error: ld returned 1 exit status
make: *** [perl] Error 1
final problem was related to linking the libraries. adding -lm fixed the problem
arm-unknown-nto-qnx6.6.0eabi-gcc --sysroot=/opt/qnx660/target/qnx6 -Wl,-rpath,/home/swgroup/localperl/lib/perl5/5.24.0/arm-/CORE -Wl,-E -o perl perlmain.o libperl.so -lm

Make failed : make: *** [sub-corelib-install_subtargets-ordered] Error 2

I am using the Ubuntu 14.04 in virtual box and 64 bit OS
I try to cross compile Qt-everywhere 4.8.6 with a 'gcc-linaro-arm-linux-gnueabihf-4.7' cross compiler and get the following error while doing the 'make'
make[1]: Entering directory `/home/user/qt-everywhere-opensource-src-4.8.6
/src/corelib'
/usr/local/linaro/bin/arm-linux-gnueabihf-gcc (The path depends where the Toolchain has been installed) -c -pipe -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -fvisibility=hidden -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -I../../mkspecs/qws/linux-arm-linaro-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-static-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-static-emb-arm -o .obj/release-static-emb-arm/adler32.o ../3rdparty/zlib/adler32.c
/bin/sh: 1: Syntax error: word unexpected (expecting ")")
make[1]: *** [.obj/release-static-emb-arm/adler32.o] Error 2
make[1]: Leaving directory `/home/user/qt-everywhere-opensource-src-4.8.6/src/corelib'
make: *** [sub-corelib-install_subtargets-ordered] Error 2
The .configure script has no problems
Can anyone help out, what causes this?
This text doesn't belong in your call to gcc:
(The path depends where the Toolchain has been installed)
Remove that to get rid of the error.

/bin/sh: 1: arm-linux-gcc: not found on ubuntu

I m trying to build using gcc arm cross compiler and i get following error
Building file: ../src/application.c
Invoking: GCC C Compiler
arm-linux-gcc -O3 -Wall -c -I -fmessage-length=0 -MMD -MP -MF"src/application.d" -MT"src/application.d" -o "src/application.o" "../src/application.c"
/bin/sh: 1: arm-linux-gcc: not found
i also check my path setting and i had proper valid path to the arm-linux-gcc
and also linux "which" command gives the correct path of arm-linux-gcc..
could some one let me know what i am doing wrong..?
i figured it out,very silly mistake. i was trying to run 32-bit binary on a 64-bit system.

Can't make node.js ubuntu 13.10

I'm trying to install node.js, so I've cloned the repo and ./configure it. However, when I run make I get this ridiculous infinite loop of errors:
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/ubuntu/nodejs/node/out'
g++ '-DOPENSSL_NO_SSL2=1' '-DV8_TARGET_ARCH_X64' '-DENABLE_DEBUGGER_SUPPORT' -I../deps/v8/src -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-strict-aliasing -m64 -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -MMD -MF /home/ubuntu/nodejs/node/out/Release/.deps//home/ubuntu/nodejs/node/out/Release/obj.target/v8_base.x64/deps/v8/src/runtime.o.d.raw -c -o /home/ubuntu/nodejs/node/out/Release/obj.target/v8_base.x64/deps/v8/src/runtime.o ../deps/v8/src/runtime.cc
In file included from ../deps/v8/src/v8.h:52:0,
from ../deps/v8/src/runtime.cc:31:
../deps/v8/src/../include/v8.h: In member function ‘void v8::ReturnValue<T>::Set(uint32_t)’:
../deps/v8/src/../include/v8.h:5816:31: warning: typedef ‘I’ locally defined but not used [-Wunused-local-typedefs]
typedef internal::Internals I;
^
In file included from ../deps/v8/src/v8globals.h:32:0,
from ../deps/v8/src/v8.h:53,
from ../deps/v8/src/runtime.cc:31:
../deps/v8/src/v8utils.h: In function ‘void v8::internal::CopyWords(T*, const T*, size_t)’:
../deps/v8/src/checks.h:271:22: warning: typedef ‘__StaticAssertTypedef__131’ locally defined but not used [-Wunused-local-typedefs]
SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
^
../deps/v8/src/checks.h:261:39: note: in definition of macro ‘SEMI_STATIC_JOIN_HELPER’
#define SEMI_STATIC_JOIN_HELPER(a, b) a##b
^
../deps/v8/src/checks.h:271:5: note: in expansion of macro ‘SEMI_STATIC_JOIN’
SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
^
../deps/v8/src/checks.h:319:30: note: in expansion of macro ‘STATIC_CHECK’
#define STATIC_ASSERT(test) STATIC_CHECK(test)
This seems to be a bug but I have g++4.8.1 gcc-4.8.1 which are the latest versions that I know of. Please let me know how I can fix this. Thanks.
There is an easier way than bringing old g++, as mentioned in V8 bug report discussion:
http://code.google.com/p/v8/issues/detail?id=2149
You could set additional flag for g++ before using make:
export CXX="g++ -Wno-unused-local-typedefs"
I've had problems with g++ 4.8 compiling v8 (which Node uses), and a bunch of other stuff, so I use 4.7. First install g++-4.7 using apt-get (which I trust you know how to do), and then:
CXX=g++-4.7 make [... etc...]

Resources