Hi all,
I have used videoIO in the past with ubuntu 8.04 and everything worked fine. Now I have move to ubuntu 10.04 and I was trying to compile it once again on my machine. I followed the guide http://sourceforge.net/apps/trac/videoio/wiki/CompileOnUbuntu posted by peitschie but I get the following error during compilation
make
Could not find ffmpeg's dirac_encoder library
/bin/sh: cannot open arch: No such file
/opt/matlab2009a_i686/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m32 -o mexClientPopen2.mexglx.o' mexClientPopen2.cpp
/opt/matlab2009a_i686/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m32 -o debug.mexglx.o' debug.cpp
/opt/matlab2009a_i686/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m32 -o popen2.mexglx.o' popen2.cpp
/opt/matlab2009a_i686/bin/mex -cxx CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -fPIC -m32' mexClientPopen2.mexglx.o debug.mexglx.o popen2.mexglx.o -output echoPopen2.mexglx
g++ -c echo.cpp -o echo..o
g++ -c mexServerStdio.cpp -o mexServerStdio..o
g++ -c debug.cpp -o debug..o
g++ echo..o mexServerStdio..o debug..o -o echoPopen2Server
/opt/matlab2009a_i686/bin/mex -cxx CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -fPIC -m32' mexClientPopen2.mexglx.o debug.mexglx.o popen2.mexglx.o -output videoReader_ffmpegPopen2.mexglx
g++ -c videoReaderWrapper.cpp -o videoReaderWrapper..o
g++ -c Usage: /usr/bin/perl Options: Shows GCC options for compiling ffmpeg binaries Shows GCC options for linking ffmpeg binaries Shows GCC options for forced-static linking ffmpeg binaries. Note that unless Matlab and your OS use exactly the same version of GCC, statically-linked mex functions and even spawned executables will usually not load. Shows the runtime path for running ffmpeg binaries Shows the architectures for which binaries are found Uses Matlab-compatible architecture strings (e.g. "-glnx86" for 32-bit GNU/Linux, "-glnxa64" for 64-bit GNU/Linux, etc.) Force detection of 32-bit libraries (and not 64-bit) Force detection of 64-bit libraries (and not 32-bit) If an architecture is not explicitly specified, it is auto-detected. FfmpegIVideo.cpp -o FfmpegIVideo..o
/bin/sh: Syntax error: "(" unexpected
make: *** Error 2
Could someone help me on this.
Thanks in advance,
vmil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks to me like you are missing some of the required dev libraries there. A short list of ones I had to install was: libva-dev libdirac-dev libmp3lame-dev libopenjpeg-dev libvpx-dev libxvidcore-dev
Specifically, for your case you're lacking libdirac-dev . A good tip for finding these is looking at the first error thrown during the compile. In your case it says "Could not find ffmpeg's dirac_encoder library ". Generally most packages will be named lib<something>-dev… so in your case, libdirac-dev. Good luck, and feel free to let me know of any corrections that might be needed on the wiki :)
Cheers,
peitschie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-09-29
Hi peitschie,
I made it work thanks to your help.
First libva-dev does not exist as a package.
Secondly you need also libfaad-dev.
Generally point out that each library requested at start the user needs to install it. Originally I thought this libraries where part of ffmpeg, but they are independent.
I also install it on x64(ubuntu 10.04 again).
P.S. some other packages requested where
libvorbis-dev libtheora-dev libspeex-dev libgsm1-dev libfaad-dev libavformat-dev
P.S.2 Your guide for some reason is offline today.
Thanx again for the help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ahh… that would make sense. I just remembered I'm running on 10.10 beta, so there are likely some differences there. Thanks for the feedback, and glad things successfully worked for you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-10-18
Hi again,
I just updated to 10.10 to one of my machines and as it seams I need to recompile the videoIO to make it work. I installed an extra lib required (libva-dev) and since g++-4.1 is no longer in the distro package, I used cpp-4.1 and when I try to build it I get the following strange error:
/opt/matlab2009a_x86_64/bin/mex -c CC=/usr/bin/cpp-4.1 CXX=/usr/bin/cpp-4.1 LD=/usr/bin/cpp-4.1 ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o echo.mexa64.o' echo.cpp
cpp-4.1: "-c" is not a valid option to the preprocessor
mex: compile of ' "echo.cpp"' failed.
make: *** Error 1
should i download g++-4.1 from lucid and try again? (actually I thought there was no difference between the 2)
Thank you in advance,
vmil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-10-18
Hi,
I have been making some tests to bypass the problem. The thing I have found out is that if you install libva-dev, don't clean the complied source and keep from the upgrade procedure the obsolete packages (actually the one you need is libavutil49) the testAll runs ok but in the output you get some extra.
vop not coded (repetaed many times)
<<< doMultiFullReadTest('intersection147.25fps.xvid.avi',…)
>>> doMultiFullReadTest('intersection256.25fps.xvid.avi',…)
>>> doFullRead('intersection256.25fps.xvid.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doFullRead('intersection256.25fps.xvid.avi',…)
Last message repeated 126 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doMultiFullReadTest('intersection256.25fps.xvid.avi',…)
>>> doMultiFullReadTest('intersection300.10fps.ffdshowXvid.avi',…)
>>> doFullRead('intersection300.10fps.ffdshowXvid.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
slice end not reached but screenspace end (-9 left 008EB9, score= -278)
concealing 300 DC, 300 AC, 300 MV errors
<<< doFullRead('intersection300.10fps.ffdshowXvid.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
slice end not reached but screenspace end (-9 left 008EB9, score= -278)
concealing 300 DC, 300 AC, 300 MV errors
slice end not reached but screenspace end (-9 left 008EB9, score= -278)
concealing 300 DC, 300 AC, 300 MV errors
<<< doMultiFullReadTest('intersection300.10fps.ffdshowXvid.avi',…)
>>> doMultiFullReadTest('intersection300.10fps.wmv3.avi',…)
>>> doFullRead('intersection300.10fps.wmv3.avi',…)
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('intersection300.10fps.wmv3.avi',…)
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('intersection300.10fps.wmv3.avi',…)
>>> doMultiFullReadTest('intersection300.10fps.xvid.avi',…)
>>> doFullRead('intersection300.10fps.xvid.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doFullRead('intersection300.10fps.xvid.avi',…)
Last message repeated 148 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doMultiFullReadTest('intersection300.10fps.xvid.avi',…)
>>> doMultiFullReadTest('intersection300.25fps.xvid.avi',…)
>>> doFullRead('intersection300.25fps.xvid.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded
<<< doFullRead('intersection300.25fps.xvid.avi',…)
Last message repeated 148 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doMultiFullReadTest('intersection300.25fps.xvid.avi',…)
>>> doMultiFullReadTest('intersection300.orig.revel.avi',…)
>>> doFullRead('intersection300.orig.revel.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('intersection300.orig.revel.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('intersection300.orig.revel.avi',…)
>>> doMultiFullReadTest('numbers.3ivx.avi',…)
>>> doFullRead('numbers.3ivx.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.3ivx.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('numbers.3ivx.avi',…)
>>> doMultiFullReadTest('numbers.divx611.avi',…)
>>> doFullRead('numbers.divx611.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.divx611.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('numbers.divx611.avi',…)
>>> doMultiFullReadTest('numbers.uncompressed.avi',…)
>>> doFullRead('numbers.uncompressed.avi',…)
<<< doFullRead('numbers.uncompressed.avi',…)
<<< doMultiFullReadTest('numbers.uncompressed.avi',…)
>>> doMultiFullReadTest('numbers.uncompressed.rgba.avi',…)
>>> doFullRead('numbers.uncompressed.rgba.avi',…)
<<< doFullRead('numbers.uncompressed.rgba.avi',…)
<<< doMultiFullReadTest('numbers.uncompressed.rgba.avi',…)
>>> doMultiFullReadTest('numbers.wmv3.avi',…)
>>> doFullRead('numbers.wmv3.avi',…)
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.wmv3.avi',…)
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('numbers.wmv3.avi',…)
>>> doMultiFullReadTest('numbers.x264.10fps.avi',…)
>>> doFullRead('numbers.x264.10fps.avi',…)
max_analyze_duration reached
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.x264.10fps.avi',…)
max_analyze_duration reached
max_analyze_duration reached
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('numbers.x264.10fps.avi',…)
>>> doMultiFullReadTest('numbers.x264.29_97fps.avi',…)
>>> doFullRead('numbers.x264.29_97fps.avi',…)
max_analyze_duration reached
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.x264.29_97fps.avi',…)
max_analyze_duration reached
max_analyze_duration reached
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
Is this correct or should I recompile it and how.
Thanks again,
vmil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Gentlemen,
I am a PhD student working on movies in linux and Matlab (2009).
I was using videoio in Matlab in Linux ubuntu 10.04 without any problem, but when I upgraded to 12.04 it did not work. After studying some documents I understood that I need to ciompile videio again (I do not know too much about the Linux).
I used the wiki page below : http://sourceforge.net/apps/trac/videoio/wiki/CompileOnUbuntu#Settingupthecompiler
to install videoio but it could not be installed and returned below errors:
Could not find ffmpeg's z library
/bin/sh: 1: cannot open arch: No such file
/usr/local/matlabR2009b/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o debug.mexa64.o' debug.cpp
Warning: You are using gcc version "4.6.3-1ubuntu5)". The earliest gcc version supported
with mex is "4.1". The latest version tested for use with mex is "4.2".
To download a different version of gcc, visit http://gcc.gnu.org
In file included from /usr/include/stdio.h:931:0,
from /usr/local/matlabR2009b/extern/include/mex.h:163,
from debug.h:194,
from debug.cpp:44:
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::fgetc_unlocked(FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:56:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:56:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:56:10: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__uflow(VideoIO::_IO_FILE*)’
/usr/include/x86_64-linux-gnu/bits/stdio.h:56:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::getc_unlocked(FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:66:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:66:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:66:10: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__uflow(VideoIO::_IO_FILE*)’
/usr/include/x86_64-linux-gnu/bits/stdio.h:66:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::fputc_unlocked(int, FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:91:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:91:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:91:10: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__overflow(VideoIO::_IO_FILE*, int)’
/usr/include/x86_64-linux-gnu/bits/stdio.h:91:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::putc_unlocked(int, FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:101:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:101:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:101:10: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__overflow(VideoIO::_IO_FILE*, int)’
/usr/include/x86_64-linux-gnu/bits/stdio.h:101:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::feof_unlocked(FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:128:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::ferror_unlocked(FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:135:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
In file included from /usr/include/stdio.h:934:0,
from /usr/local/matlabR2009b/extern/include/mex.h:163,
from debug.h:194,
from debug.cpp:44:
/usr/include/x86_64-linux-gnu/bits/stdio2.h: In function ‘int VideoIO::vprintf(const char*, __va_list_tag*)’:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:118:70: error: cannot convert ‘VideoIO::_IO_FILE*’ to ‘FILE* {aka _IO_FILE*}’ for argument ‘1’ to ‘int VideoIO::__vfprintf_chk(FILE*, int, const char*, __va_list_tag*)’
/usr/include/x86_64-linux-gnu/bits/stdio2.h: In function ‘size_t VideoIO::fread_unlocked(void*, size_t, size_t, FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:364:14: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio2.h:364:14: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio2.h:364:14: error: cannot convert ‘FILE* __restrict__ {aka _IO_FILE* __restrict__}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__uflow(VideoIO::_IO_FILE*)’
/usr/include/x86_64-linux-gnu/bits/stdio2.h:364:14: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
mex: compile of ' "debug.cpp"' failed.
make: *** Error 1
Then I tried to install the older version of gcc compiler using same Wiki page's command ($ sudo apt-get install gcc-4.1 g++-4.1 cpp-4.1) but this time I 've got this error:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package cpp-4.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package gcc-4.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-4.1' has no installation candidate
E: Unable to locate package g++-4.1
E: Couldn't find any package by regex 'g++-4.1'
E: Package 'cpp-4.1' has no installation candidate
Please help me to solve this pain problem , it is very important and part of several peoples study subject.
Regards,
Siamak
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If your Ubuntu package manager doesn't have gcc-4.1 (or gcc-4.2) any more, you may need to build gcc from scratch by downloading the source from http://gcc.gnu.org . That said, the popen2 videoIO plugin was written to be as robust to gcc version mismatches as possible, so you might be able to get away with v4.6.
One thing to try would be to add something like
LDFLAGS=-lz
to the linker command. The "-l" tells the linker to include another library. The "z" says to include the "z" library that it seems to be saying is missing. This needs to correspond to a libz.a or libz.so file in the paths specified through -L linker arguments.
I unfortunately no longer have access to Matlab, so this is all from memory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Gerald,
Unfortunately it is there and the same response:
Could not find ffmpeg's z library
/bin/sh: 1: cannot open arch: No such file
/usr/local/matlabR2009b/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexa64.o' mexClientPopen2.cpp
Warning: You are using gcc version "4.6.3-1ubuntu5)". The earliest gcc version supported
with mex is "4.1". The latest version tested for use with mex is "4.2".
To download a different version of gcc, visit http://gcc.gnu.org
In file included from mexClientPopen2.cpp:46:0:
matarray.h:246:10: error: ‘auto_ptr’ in namespace ‘std’ does not name a type
matarray.h:253:10: error: ‘auto_ptr’ in namespace ‘std’ does not name a type
mex: compile of ' "mexClientPopen2.cpp"' failed.
make: *** Error 1
when I anted to install gcc 4.1.2 it took 2 days from me and still I am not sure whether I have installed it correctly
many thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I encountered the same problem, but I got around it by modifying ffmpeg-config-internal.pl. It seems to me that this script looks for libz.so or libz.a, but (at least on my system), libz is actually called libz.so.1. So I updated line 237:
foreach my $ext ("so","a") {
So (as a very inelegant fix) I added ,"so.1", and then it found my libz.so. It failed again for a few other libraries, which were so.0, so.2, etc, but after adding a few times, it found all the libraries it was looking for. Hope that helps!
(Mind you, I encountered more problems further down the line, because I have gcc 4.7, any my installation of Matlab does not support it, but that is a different story).
Best regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I have used videoIO in the past with ubuntu 8.04 and everything worked fine. Now I have move to ubuntu 10.04 and I was trying to compile it once again on my machine. I followed the guide http://sourceforge.net/apps/trac/videoio/wiki/CompileOnUbuntu posted by peitschie but I get the following error during compilation
make
Could not find ffmpeg's dirac_encoder library
/bin/sh: cannot open arch: No such file
/opt/matlab2009a_i686/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m32 -o mexClientPopen2.mexglx.o' mexClientPopen2.cpp
/opt/matlab2009a_i686/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m32 -o debug.mexglx.o' debug.cpp
/opt/matlab2009a_i686/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m32 -o popen2.mexglx.o' popen2.cpp
/opt/matlab2009a_i686/bin/mex -cxx CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -fPIC -m32' mexClientPopen2.mexglx.o debug.mexglx.o popen2.mexglx.o -output echoPopen2.mexglx
g++ -c echo.cpp -o echo..o
g++ -c mexServerStdio.cpp -o mexServerStdio..o
g++ -c debug.cpp -o debug..o
g++ echo..o mexServerStdio..o debug..o -o echoPopen2Server
/opt/matlab2009a_i686/bin/mex -cxx CC=g++ CXX=g++ LD=g++ ARCH=glnx86 CXXFLAGS\#'-O2 -g -fPIC -m32' mexClientPopen2.mexglx.o debug.mexglx.o popen2.mexglx.o -output videoReader_ffmpegPopen2.mexglx
g++ -c videoReaderWrapper.cpp -o videoReaderWrapper..o
g++ -c Usage: /usr/bin/perl Options: Shows GCC options for compiling ffmpeg binaries Shows GCC options for linking ffmpeg binaries Shows GCC options for forced-static linking ffmpeg binaries. Note that unless Matlab and your OS use exactly the same version of GCC, statically-linked mex functions and even spawned executables will usually not load. Shows the runtime path for running ffmpeg binaries Shows the architectures for which binaries are found Uses Matlab-compatible architecture strings (e.g. "-glnx86" for 32-bit GNU/Linux, "-glnxa64" for 64-bit GNU/Linux, etc.) Force detection of 32-bit libraries (and not 64-bit) Force detection of 64-bit libraries (and not 32-bit) If an architecture is not explicitly specified, it is auto-detected. FfmpegIVideo.cpp -o FfmpegIVideo..o
/bin/sh: Syntax error: "(" unexpected
make: *** Error 2
Could someone help me on this.
Thanks in advance,
vmil
Hi vmil,
It looks to me like you are missing some of the required dev libraries there. A short list of ones I had to install was: libva-dev libdirac-dev libmp3lame-dev libopenjpeg-dev libvpx-dev libxvidcore-dev
Specifically, for your case you're lacking libdirac-dev . A good tip for finding these is looking at the first error thrown during the compile. In your case it says "Could not find ffmpeg's dirac_encoder library ". Generally most packages will be named lib<something>-dev… so in your case, libdirac-dev. Good luck, and feel free to let me know of any corrections that might be needed on the wiki :)
Cheers,
peitschie
Hi peitschie,
I made it work thanks to your help.
First libva-dev does not exist as a package.
Secondly you need also libfaad-dev.
Generally point out that each library requested at start the user needs to install it. Originally I thought this libraries where part of ffmpeg, but they are independent.
I also install it on x64(ubuntu 10.04 again).
P.S. some other packages requested where
libvorbis-dev libtheora-dev libspeex-dev libgsm1-dev libfaad-dev libavformat-dev
P.S.2 Your guide for some reason is offline today.
Thanx again for the help
Hi vmil,
Ahh… that would make sense. I just remembered I'm running on 10.10 beta, so there are likely some differences there. Thanks for the feedback, and glad things successfully worked for you!
Hi again,
I just updated to 10.10 to one of my machines and as it seams I need to recompile the videoIO to make it work. I installed an extra lib required (libva-dev) and since g++-4.1 is no longer in the distro package, I used cpp-4.1 and when I try to build it I get the following strange error:
/opt/matlab2009a_x86_64/bin/mex -c CC=/usr/bin/cpp-4.1 CXX=/usr/bin/cpp-4.1 LD=/usr/bin/cpp-4.1 ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o echo.mexa64.o' echo.cpp
cpp-4.1: "-c" is not a valid option to the preprocessor
mex: compile of ' "echo.cpp"' failed.
make: *** Error 1
should i download g++-4.1 from lucid and try again? (actually I thought there was no difference between the 2)
Thank you in advance,
vmil
Hi,
I have been making some tests to bypass the problem. The thing I have found out is that if you install libva-dev, don't clean the complied source and keep from the upgrade procedure the obsolete packages (actually the one you need is libavutil49) the testAll runs ok but in the output you get some extra.
vop not coded (repetaed many times)
<<< doMultiFullReadTest('intersection147.25fps.xvid.avi',…)
>>> doMultiFullReadTest('intersection256.25fps.xvid.avi',…)
>>> doFullRead('intersection256.25fps.xvid.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doFullRead('intersection256.25fps.xvid.avi',…)
Last message repeated 126 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doMultiFullReadTest('intersection256.25fps.xvid.avi',…)
>>> doMultiFullReadTest('intersection300.10fps.ffdshowXvid.avi',…)
>>> doFullRead('intersection300.10fps.ffdshowXvid.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
slice end not reached but screenspace end (-9 left 008EB9, score= -278)
concealing 300 DC, 300 AC, 300 MV errors
<<< doFullRead('intersection300.10fps.ffdshowXvid.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
slice end not reached but screenspace end (-9 left 008EB9, score= -278)
concealing 300 DC, 300 AC, 300 MV errors
slice end not reached but screenspace end (-9 left 008EB9, score= -278)
concealing 300 DC, 300 AC, 300 MV errors
<<< doMultiFullReadTest('intersection300.10fps.ffdshowXvid.avi',…)
>>> doMultiFullReadTest('intersection300.10fps.wmv3.avi',…)
>>> doFullRead('intersection300.10fps.wmv3.avi',…)
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('intersection300.10fps.wmv3.avi',…)
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('intersection300.10fps.wmv3.avi',…)
>>> doMultiFullReadTest('intersection300.10fps.xvid.avi',…)
>>> doFullRead('intersection300.10fps.xvid.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doFullRead('intersection300.10fps.xvid.avi',…)
Last message repeated 148 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doMultiFullReadTest('intersection300.10fps.xvid.avi',…)
>>> doMultiFullReadTest('intersection300.25fps.xvid.avi',…)
>>> doFullRead('intersection300.25fps.xvid.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded
<<< doFullRead('intersection300.25fps.xvid.avi',…)
Last message repeated 148 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
vop not coded (repetaed many times)
<<< doMultiFullReadTest('intersection300.25fps.xvid.avi',…)
>>> doMultiFullReadTest('intersection300.orig.revel.avi',…)
>>> doFullRead('intersection300.orig.revel.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('intersection300.orig.revel.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('intersection300.orig.revel.avi',…)
>>> doMultiFullReadTest('numbers.3ivx.avi',…)
>>> doFullRead('numbers.3ivx.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.3ivx.avi',…)
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('numbers.3ivx.avi',…)
>>> doMultiFullReadTest('numbers.divx611.avi',…)
>>> doFullRead('numbers.divx611.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.divx611.avi',…)
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
Invalid and inefficient vfw-avi packed B frames detected
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('numbers.divx611.avi',…)
>>> doMultiFullReadTest('numbers.uncompressed.avi',…)
>>> doFullRead('numbers.uncompressed.avi',…)
<<< doFullRead('numbers.uncompressed.avi',…)
<<< doMultiFullReadTest('numbers.uncompressed.avi',…)
>>> doMultiFullReadTest('numbers.uncompressed.rgba.avi',…)
>>> doFullRead('numbers.uncompressed.rgba.avi',…)
<<< doFullRead('numbers.uncompressed.rgba.avi',…)
<<< doMultiFullReadTest('numbers.uncompressed.rgba.avi',…)
>>> doMultiFullReadTest('numbers.wmv3.avi',…)
>>> doFullRead('numbers.wmv3.avi',…)
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.wmv3.avi',…)
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
Extra data: 16 bits left, value: 401F
Last message repeated 1 times
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('numbers.wmv3.avi',…)
>>> doMultiFullReadTest('numbers.x264.10fps.avi',…)
>>> doFullRead('numbers.x264.10fps.avi',…)
max_analyze_duration reached
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.x264.10fps.avi',…)
max_analyze_duration reached
max_analyze_duration reached
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doMultiFullReadTest('numbers.x264.10fps.avi',…)
>>> doMultiFullReadTest('numbers.x264.29_97fps.avi',…)
>>> doFullRead('numbers.x264.29_97fps.avi',…)
max_analyze_duration reached
No accelerated colorspace conversion found from yuv420p to bgr24.
<<< doFullRead('numbers.x264.29_97fps.avi',…)
max_analyze_duration reached
max_analyze_duration reached
No accelerated colorspace conversion found from yuv420p to bgr24.
No accelerated colorspace conversion found from yuv420p to bgr24.
Is this correct or should I recompile it and how.
Thanks again,
vmil
Hi Gentlemen,
I am a PhD student working on movies in linux and Matlab (2009).
I was using videoio in Matlab in Linux ubuntu 10.04 without any problem, but when I upgraded to 12.04 it did not work. After studying some documents I understood that I need to ciompile videio again (I do not know too much about the Linux).
I used the wiki page below :
http://sourceforge.net/apps/trac/videoio/wiki/CompileOnUbuntu#Settingupthecompiler
to install videoio but it could not be installed and returned below errors:
Could not find ffmpeg's z library
/bin/sh: 1: cannot open arch: No such file
/usr/local/matlabR2009b/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o debug.mexa64.o' debug.cpp
Warning: You are using gcc version "4.6.3-1ubuntu5)". The earliest gcc version supported
with mex is "4.1". The latest version tested for use with mex is "4.2".
To download a different version of gcc, visit http://gcc.gnu.org
In file included from /usr/include/stdio.h:931:0,
from /usr/local/matlabR2009b/extern/include/mex.h:163,
from debug.h:194,
from debug.cpp:44:
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::fgetc_unlocked(FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:56:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:56:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:56:10: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__uflow(VideoIO::_IO_FILE*)’
/usr/include/x86_64-linux-gnu/bits/stdio.h:56:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::getc_unlocked(FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:66:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:66:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:66:10: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__uflow(VideoIO::_IO_FILE*)’
/usr/include/x86_64-linux-gnu/bits/stdio.h:66:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::fputc_unlocked(int, FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:91:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:91:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:91:10: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__overflow(VideoIO::_IO_FILE*, int)’
/usr/include/x86_64-linux-gnu/bits/stdio.h:91:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::putc_unlocked(int, FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:101:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:101:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h:101:10: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__overflow(VideoIO::_IO_FILE*, int)’
/usr/include/x86_64-linux-gnu/bits/stdio.h:101:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::feof_unlocked(FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:128:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio.h: In function ‘int VideoIO::ferror_unlocked(FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio.h:135:10: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
In file included from /usr/include/stdio.h:934:0,
from /usr/local/matlabR2009b/extern/include/mex.h:163,
from debug.h:194,
from debug.cpp:44:
/usr/include/x86_64-linux-gnu/bits/stdio2.h: In function ‘int VideoIO::vprintf(const char*, __va_list_tag*)’:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:118:70: error: cannot convert ‘VideoIO::_IO_FILE*’ to ‘FILE* {aka _IO_FILE*}’ for argument ‘1’ to ‘int VideoIO::__vfprintf_chk(FILE*, int, const char*, __va_list_tag*)’
/usr/include/x86_64-linux-gnu/bits/stdio2.h: In function ‘size_t VideoIO::fread_unlocked(void*, size_t, size_t, FILE*)’:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:364:14: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio2.h:364:14: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
/usr/include/x86_64-linux-gnu/bits/stdio2.h:364:14: error: cannot convert ‘FILE* __restrict__ {aka _IO_FILE* __restrict__}’ to ‘VideoIO::_IO_FILE*’ for argument ‘1’ to ‘int VideoIO::__uflow(VideoIO::_IO_FILE*)’
/usr/include/x86_64-linux-gnu/bits/stdio2.h:364:14: error: invalid use of incomplete type ‘FILE {aka struct _IO_FILE}’
/usr/include/stdio.h:45:8: error: forward declaration of ‘FILE {aka struct _IO_FILE}’
mex: compile of ' "debug.cpp"' failed.
make: *** Error 1
Then I tried to install the older version of gcc compiler using same Wiki page's command ($ sudo apt-get install gcc-4.1 g++-4.1 cpp-4.1) but this time I 've got this error:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package cpp-4.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package gcc-4.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-4.1' has no installation candidate
E: Unable to locate package g++-4.1
E: Couldn't find any package by regex 'g++-4.1'
E: Package 'cpp-4.1' has no installation candidate
Please help me to solve this pain problem , it is very important and part of several peoples study subject.
Regards,
Siamak
Siamak,
If your Ubuntu package manager doesn't have gcc-4.1 (or gcc-4.2) any more, you may need to build gcc from scratch by downloading the source from http://gcc.gnu.org . That said, the popen2 videoIO plugin was written to be as robust to gcc version mismatches as possible, so you might be able to get away with v4.6.
One thing to try would be to add something like
LDFLAGS=-lz
to the linker command. The "-l" tells the linker to include another library. The "z" says to include the "z" library that it seems to be saying is missing. This needs to correspond to a libz.a or libz.so file in the paths specified through -L linker arguments.
I unfortunately no longer have access to Matlab, so this is all from memory.
Many thanks Gerald,
I will give it a try and let you know the result soon.
thanks for response , great !
Hi Gerald,
Unfortunately it is there and the same response:
Could not find ffmpeg's z library
/bin/sh: 1: cannot open arch: No such file
/usr/local/matlabR2009b/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexa64.o' mexClientPopen2.cpp
Warning: You are using gcc version "4.6.3-1ubuntu5)". The earliest gcc version supported
with mex is "4.1". The latest version tested for use with mex is "4.2".
To download a different version of gcc, visit http://gcc.gnu.org
In file included from mexClientPopen2.cpp:46:0:
matarray.h:246:10: error: ‘auto_ptr’ in namespace ‘std’ does not name a type
matarray.h:253:10: error: ‘auto_ptr’ in namespace ‘std’ does not name a type
mex: compile of ' "mexClientPopen2.cpp"' failed.
make: *** Error 1
when I anted to install gcc 4.1.2 it took 2 days from me and still I am not sure whether I have installed it correctly
many thanks
Hi Siamakla,
I encountered the same problem, but I got around it by modifying ffmpeg-config-internal.pl. It seems to me that this script looks for libz.so or libz.a, but (at least on my system), libz is actually called libz.so.1. So I updated line 237:
foreach my $ext ("so","a") {
So (as a very inelegant fix) I added ,"so.1", and then it found my libz.so. It failed again for a few other libraries, which were so.0, so.2, etc, but after adding a few times, it found all the libraries it was looking for. Hope that helps!
(Mind you, I encountered more problems further down the line, because I have gcc 4.7, any my installation of Matlab does not support it, but that is a different story).
Best regards