[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-octave-devel] video pkg fails to compile



Sorry about my previous out-of-scope mail, here goes the problem and solution.

Tried to install octave package from octave-forge: video-1.0.1  (file: video-1.0.1 .tar.gz)

octave:31> pkg install video-1.0.1.tar.gz
AVHandler.cc: In destructor 'AVHandler::~AVHandler()':
AVHandler.cc:53: error: base operand of '->' has non-pointer type 'ByteIOContext'
AVHandler.cc:56: error: cannot convert 'ByteIOContext' to 'ByteIOContext*' for argument '1' to 'int url_fclose(ByteIOContext*)'
AVHandler.cc: In member function 'int AVHandler::write_frame()':
AVHandler.cc:229: warning: 'img_convert' is deprecated (declared at /usr/include/ffmpeg/avcodec.h:2575)
AVHandler.cc:231: warning: 'img_convert' is deprecated (declared at /usr/include/ffmpeg/avcodec.h:2575)
AVHandler.cc: In member function 'int AVHandler::read_frame(unsigned int)':
AVHandler.cc:317: error: cannot convert 'ByteIOContext' to 'ByteIOContext*' for argument '1' to 'int url_feof(ByteIOContext*)'
AVHandler.cc:337: warning: 'img_convert' is deprecated (declared at /usr/include/ffmpeg/avcodec.h:2575)
AVHandler.cc:339: warning: 'img_convert' is deprecated (declared at /usr/include/ffmpeg/avcodec.h:2575)
make: *** [AVHandler.o] Error 1
error: 'make' returned the following error: make: Entering directory `/tmp/oct-0CQzFd/video-1.0.1/src'
mkoctfile -v -c -DHAVE_FFMPEG_AVFORMAT_H -DHAVE_FFMPEG_AVCODEC_H -I/usr/include/ffmpeg   AVHandler.cc -o AVHandler.o
g++ -c -fPIC -I/usr/include/octave-3.0.0 -I/usr/include/octave-3.0.0/octave -mieee-fp -O2 -I/usr/include/ffmpeg -DHAVE_FFMPEG_AVFORMAT_H -DHAVE_FFMPEG_AVCODEC_H AVHandler.cc -o AVHandler.o
make: Leaving directory `/tmp/oct-0CQzFd/video-1.0.1/src'
error: called from `pkg:configure_make' in file /usr/share/octave/3.0.0/m/pkg/pkg.m near line 1058, column 2
octave:31>

Looking at the compile error you can see, it is trivial to fix it. I just fixed a few lines (changed some parameters  to pointers) in  AVHandler.cc (from video-1.0.1 package) and compile succeeded. Haven't tried if all package functions work (in Octave), but so far it looks ok.
If you need exact versions of Octave/ffmpeg/libavformat etc.. and/or the fix let me know.

Regards,
   Sash

Reply to: