-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation issue #12
Comments
Hi, CHAO. same problem with me, do you solve it yet? |
root@ubun:/usr/local/transformation/build# make |
Hi Jesse,
I still cannot figure it out. However, a new guess comes out. My FFmpeg is
actually built with gcc 4.8. Even though I updated system gcc to version 5
+, it may still cause the problem. After reinstalling the whole FFmpeg, I
will let you know the result.
Chao
…On Wed, Feb 8, 2017 at 10:31 PM, JesseYang-CQ ***@***.***> wrote:
***@***.***:/usr/local/transformation/build# make
[ 6%] Building CXX object LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/
VideoWriter.cpp.o
In file included from /usr/local/transformation/
LibAvWrapper/src/VideoWriter.cpp:1:0:
/usr/local/transformation/LibAvWrapper/inc/VideoWriter.hpp: In member
function ‘void IMT::LibAv::VideoWriter::Init(std::string,
std::array<unsigned int, nbStreams>, std::array<unsigned int, nbStreams>,
unsigned int, unsigned int, std::array<unsigned int, nbStreams>)’:
/usr/local/transformation/LibAvWrapper/inc/VideoWriter.hpp:58:96: error:
there are no arguments to ‘avformat_alloc_output_context2’ that depend on
a template parameter, so a declaration of ‘avformat_alloc_output_context2’
must be available [-fpermissive] avformat_alloc_output_context2(&m_fmt_ctx,
NULL, NULL, m_outputFileName.c_str());
/usr/local/transformation/LibAvWrapper/inc/VideoWriter.hpp:58:96: note:
(if you use ‘-fpermissive’, G++ will accept your code, but allowing the use
of an undeclared name is deprecated)
/usr/local/transformation/LibAvWrapper/inc/VideoWriter.hpp:105:38: error:
‘struct AVCodecContext’ has no member named ‘refcounted_frames’m_codec_ctx[id]->refcounted_frames
= 1;
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp: In member
function ‘void IMT::LibAv::VideoWriter::EncodeAndWrite(const cv::Mat&,
int)’:
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:113:37: error:
‘av_frame_alloc’ was not declared in this scope
AVFrame* frame = av_frame_alloc();
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp: In member
function ‘void IMT::LibAv::VideoWriter::EncodeAndWrite(AVFrame*, int)’:
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:148:62: error:
‘avcodec_send_frame’ was not declared in this scope
int ret = avcodec_send_frame(m_codec_ctx[streamId], frame);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:165:67: error:
‘avcodec_receive_packet’ was not declared in this scope
ret = avcodec_receive_packet(m_codec_ctx[streamId], &pkt);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:171:115:
error: ‘av_rescale_q’ was not declared in this scope
pkt.pts = av_rescale_q(pkt.pts, m_codec_ctx[streamId]->time_base,
m_vstream[streamId]->time_base);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:175:115:
error: ‘av_rescale_q’ was not declared in this scope
pkt.dts = av_rescale_q(pkt.dts, m_codec_ctx[streamId]->time_base,
m_vstream[streamId]->time_base);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:185:35: error:
‘av_packet_unref’ was not declared in this scope
av_packet_unref(&pkt); //The pkt is not usefull anymore
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:190:33: error:
‘av_packet_unref’ was not declared in this scope
av_packet_unref(&pkt);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:198:27: error:
‘av_frame_unref’ was not declared in this scope
av_frame_unref(frame);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:200:27: error:
‘av_frame_free’ was not declared in this scope
av_frame_free(&frame);
make[2]: *** [LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/VideoWriter.cpp.o]
Error 1
make[1]: *** [LibAvWrapper/CMakeFiles/LibAvWrapper.dir/all] Error 2
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVRRb7yhfj7e9-yFrcNkfzJC-S7uiUt3ks5raoiggaJpZM4L7dgN>
.
|
Hi Chao, |
Hi Chao,
Does it work when you reinstalling the whole FFmpeg?
Jesse
|
NameJunchao Yang
[email protected]
Chongqing University of Posts and Telecommunications (CQUPT)
Chongwen Rd., Nan'an District, Chongqing 400065, P. R. China
+86 189 9604 8118
+86-23-62460390
|
扫描该二维码,可以将电子名片迅速保存到手机 使用帮助
|
At 2017-02-09 22:50:30, "chaozhou5" <[email protected]> wrote:
Hi Jesse,
I still cannot figure it out. However, a new guess comes out. My FFmpeg is
actually built with gcc 4.8. Even though I updated system gcc to version 5
+, it may still cause the problem. After reinstalling the whole FFmpeg, I
will let you know the result.
Chao
On Wed, Feb 8, 2017 at 10:31 PM, JesseYang-CQ ***@***.***> wrote:
***@***.***:/usr/local/transformation/build# make
[ 6%] Building CXX object LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/
VideoWriter.cpp.o
In file included from /usr/local/transformation/
LibAvWrapper/src/VideoWriter.cpp:1:0:
/usr/local/transformation/LibAvWrapper/inc/VideoWriter.hpp: In member
function ‘void IMT::LibAv::VideoWriter::Init(std::string,
std::array<unsigned int, nbStreams>, std::array<unsigned int, nbStreams>,
unsigned int, unsigned int, std::array<unsigned int, nbStreams>)’:
/usr/local/transformation/LibAvWrapper/inc/VideoWriter.hpp:58:96: error:
there are no arguments to ‘avformat_alloc_output_context2’ that depend on
a template parameter, so a declaration of ‘avformat_alloc_output_context2’
must be available [-fpermissive] avformat_alloc_output_context2(&m_fmt_ctx,
NULL, NULL, m_outputFileName.c_str());
/usr/local/transformation/LibAvWrapper/inc/VideoWriter.hpp:58:96: note:
(if you use ‘-fpermissive’, G++ will accept your code, but allowing the use
of an undeclared name is deprecated)
/usr/local/transformation/LibAvWrapper/inc/VideoWriter.hpp:105:38: error:
‘struct AVCodecContext’ has no member named ‘refcounted_frames’m_codec_ctx[id]->refcounted_frames
= 1;
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp: In member
function ‘void IMT::LibAv::VideoWriter::EncodeAndWrite(const cv::Mat&,
int)’:
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:113:37: error:
‘av_frame_alloc’ was not declared in this scope
AVFrame* frame = av_frame_alloc();
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp: In member
function ‘void IMT::LibAv::VideoWriter::EncodeAndWrite(AVFrame*, int)’:
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:148:62: error:
‘avcodec_send_frame’ was not declared in this scope
int ret = avcodec_send_frame(m_codec_ctx[streamId], frame);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:165:67: error:
‘avcodec_receive_packet’ was not declared in this scope
ret = avcodec_receive_packet(m_codec_ctx[streamId], &pkt);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:171:115:
error: ‘av_rescale_q’ was not declared in this scope
pkt.pts = av_rescale_q(pkt.pts, m_codec_ctx[streamId]->time_base,
m_vstream[streamId]->time_base);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:175:115:
error: ‘av_rescale_q’ was not declared in this scope
pkt.dts = av_rescale_q(pkt.dts, m_codec_ctx[streamId]->time_base,
m_vstream[streamId]->time_base);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:185:35: error:
‘av_packet_unref’ was not declared in this scope
av_packet_unref(&pkt); //The pkt is not usefull anymore
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:190:33: error:
‘av_packet_unref’ was not declared in this scope
av_packet_unref(&pkt);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:198:27: error:
‘av_frame_unref’ was not declared in this scope
av_frame_unref(frame);
/usr/local/transformation/LibAvWrapper/src/VideoWriter.cpp:200:27: error:
‘av_frame_free’ was not declared in this scope
av_frame_free(&frame);
make[2]: *** [LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/VideoWriter.cpp.o]
Error 1
make[1]: *** [LibAvWrapper/CMakeFiles/LibAvWrapper.dir/all] Error 2
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVRRb7yhfj7e9-yFrcNkfzJC-S7uiUt3ks5raoiggaJpZM4L7dgN>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi Jesse, No, it still doesn't work. I have no clue what's going on with this issue :( |
Hi Chao |
Hi Jesse,
Could you provide more detail about your reinstall process? I did the same
thing but nothing changed. Thanks a lot.
Chao
…On Mon, Feb 13, 2017 at 5:05 PM, JesseYang-CQ ***@***.***> wrote:
Hi Chao
i reinstall my Gcc and FFmpeg, seams like works, But, anther prolem is
coming, like this:
ideoWriter::EncodeAndWrite(cv::Mat const&, int)':
VideoWriter.cpp:(.text+0x2b9): undefined reference to av_frame_alloc'
../LibAvWrapper/libLibAvWrapper.a(VideoReader.cpp.o): In functionToMat(AVCodecContext*,
AVFrame*)':
VideoReader.cpp:(.text+0x8de): undefined reference to av_frame_alloc'
VideoReader.cpp:(.text+0xc8d): undefined reference toav_frame_unref'
VideoReader.cpp:(.text+0xc97): undefined reference to av_frame_free'
../LibAvWrapper/libLibAvWrapper.a(VideoReader.cpp.o): In function
IMT::LibAv::VideoReader::DecodeNextStep()':
VideoReader.cpp:(.text+0x109b): undefined reference to av_frame_alloc'
VideoReader.cpp:(.text+0x10c4): undefined reference toavcodec_send_packet'
VideoReader.cpp:(.text+0x10e1): undefined reference to avcodec_receive_frame'
VideoReader.cpp:(.text+0x126d): undefined reference toav_frame_unref'
VideoReader.cpp:(.text+0x12d9): undefined reference to av_frame_free'
VideoReader.cpp:(.text+0x12e3): undefined reference toav_packet_unref'
VideoReader.cpp:(.text+0x133f): undefined reference to avcodec_send_packet'
VideoReader.cpp:(.text+0x135c): undefined reference toav_frame_alloc'
VideoReader.cpp:(.text+0x1418): undefined reference to avcodec_receive_frame'
VideoReader.cpp:(.text+0x1479): undefined reference toav_frame_free'
VideoReader.cpp:(.text+0x153d): undefined reference to `av_frame_unref'
collect2: error: ld returned 1 exit status
make[2]: *** [MainProject/trans] Error 1
make[1]: *** [MainProject/CMakeFiles/trans.dir/all] Error 2
make: *** [all] Error 2
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVRRb2eYY_TS-Nk00BJdXqwVNTDrWDkwks5rcNO1gaJpZM4L7dgN>
.
|
Hi chao, Jesse |
Hi @JesseYang-CQ, we are facing the same issue. How did you finally fix this? |
Hi,
Thanks a lot for your work. I am trying to compile the code and test some videos. However, I end up with the error shows below. After spend hours on this error, I still cannot pass it. Could you please help me and take a look at this error?
I working at ubuntu 14.04 with gcc 5.4.1, opencv 3.1.0, boost 1.54.0.1, cmake 3.2.2
[ 6%] Building CXX object LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/VideoWriter.cpp.o In file included from /home/chao/VR/360Transformations/transformation/LibAvWrapper/src/VideoWriter.cpp:1:0: /home/chao/VR/360Transformations/transformation/LibAvWrapper/inc/VideoWriter.hpp: In member function ‘void IMT::LibAv::VideoWriter::Init(std::string, std::array<unsigned int, nbStreams>, std::array<unsigned int, nbStreams>, unsigned int, unsigned int, std::array<unsigned int, nbStreams>)’: /home/chao/VR/360Transformations/transformation/LibAvWrapper/inc/VideoWriter.hpp:59:96: error: there are no arguments to ‘avformat_alloc_output_context2’ that depend on a template parameter, so a declaration of ‘avformat_alloc_output_context2’ must be available [-fpermissive] avformat_alloc_output_context2(&m_fmt_ctx, NULL, NULL, m_outputFileName.c_str()); ^ /home/chao/VR/360Transformations/transformation/LibAvWrapper/inc/VideoWriter.hpp:59:96: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) /home/chao/VR/360Transformations/transformation/LibAvWrapper/src/VideoWriter.cpp: In member function ‘void IMT::LibAv::VideoWriter::PrivateWrite(std::shared_ptr<IMT::LibAv::Packet>, int)’: /home/chao/VR/360Transformations/transformation/LibAvWrapper/src/VideoWriter.cpp:77:105: error: ‘av_rescale_q’ was not declared in this scope pkt.pts = av_rescale_q(pkt.pts, m_codec_ctx[streamId]->time_base, m_vstream[streamId]->time_base); ^ /home/chao/VR/360Transformations/transformation/LibAvWrapper/src/VideoWriter.cpp:81:105: error: ‘av_rescale_q’ was not declared in this scope pkt.dts = av_rescale_q(pkt.dts, m_codec_ctx[streamId]->time_base, m_vstream[streamId]->time_base); ^ make[2]: *** [LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/VideoWriter.cpp.o] Error 1 make[1]: *** [LibAvWrapper/CMakeFiles/LibAvWrapper.dir/all] Error 2 make: *** [all] Error 2
Chao
The text was updated successfully, but these errors were encountered: