All,
k3b looks like it needs a lot of work. I vaguely recall fixing numerous out-of-scope issues when gcc 4.7 emerged, but have forgotten the details. Building k3d, the following are a number of errors resulting in the FTBFS. I have summarized the errors themselves below. From the summary it looks like the error: invalid use of incomplete type 'mpc_decoder {aka struct mpc_decoder_t}' at k3bmpcwrapper.cpp:77:28 starts the domino falling. If that could be fixed, then it may resolve a number of the remaining errors. So c++ gurus, "What is the proper way to do that?"
Summary of the errors:
k3bmpcwrapper.cpp:77:28: error: invalid use of incomplete type 'mpc_decoder /usr/include/mpc/mpcdec.h:55:16: error: forward declaration of 'mpc_decoder k3bmpcwrapper.cpp:88:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined k3bmpcwrapper.cpp:101:33: error: 'mpc_streaminfo_init' was not declared in this scope k3bmpcwrapper.cpp:102:47: error: 'mpc_streaminfo_read' was not declared in this scope k3bmpcwrapper.cpp:102:52: error: 'ERROR_CODE_OK' was not declared in this scope k3bmpcwrapper.cpp:107:46: error: 'mpc_decoder_setup' was not declared in this scope k3bmpcwrapper.cpp:108:54: error: 'mpc_decoder_initialize' was not declared in this scope k3bmpcwrapper.cpp:136:77: error: 'mpc_decoder_decode' was not declared in this scope k3bmpcwrapper.cpp:173:78: error: 'mpc_decoder_seek_seconds' was not declared in this scope
Errors in context:
k3bmpcwrapper.cpp:74:22: warning: invalid conversion from 'mpc_bool_t (*)(void*) {aka unsigned char (*)(void*)}' to 'mpc_bool_t (*)(mpc_reader*) {aka unsigned char (*)(mpc_reader_t*)}' [-fpermissive] m_reader->canseek = canseek_impl; ^ k3bmpcwrapper.cpp:77:28: error: invalid use of incomplete type 'mpc_decoder {aka struct mpc_decoder_t}' m_decoder = new mpc_decoder; ^ In file included from k3bmpcwrapper.h:27:0, from k3bmpcwrapper.cpp:16: /usr/include/mpc/mpcdec.h:55:16: error: forward declaration of 'mpc_decoder {aka struct mpc_decoder_t}' typedef struct mpc_decoder_t mpc_decoder; ^ k3bmpcwrapper.cpp: In destructor 'K3bMpcWrapper::~K3bMpcWrapper()': k3bmpcwrapper.cpp:88:10: warning: possible problem detected in invocation of delete operator: [enabled by default] delete m_decoder; ^ k3bmpcwrapper.cpp:88:10: warning: invalid use of incomplete type 'struct mpc_decoder_t' [enabled by default] In file included from k3bmpcwrapper.h:27:0, from k3bmpcwrapper.cpp:16: /usr/include/mpc/mpcdec.h:55:16: warning: forward declaration of 'struct mpc_decoder_t' [enabled by default] typedef struct mpc_decoder_t mpc_decoder; ^ k3bmpcwrapper.cpp:88:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined delete m_decoder; ^ k3bmpcwrapper.cpp: In member function 'bool K3bMpcWrapper::open(const TQString&)': k3bmpcwrapper.cpp:101:33: error: 'mpc_streaminfo_init' was not declared in this scope mpc_streaminfo_init( m_info ); ^ k3bmpcwrapper.cpp:102:47: error: 'mpc_streaminfo_read' was not declared in this scope if( mpc_streaminfo_read( m_info, m_reader ) != ERROR_CODE_OK ) { ^ k3bmpcwrapper.cpp:102:52: error: 'ERROR_CODE_OK' was not declared in this scope if( mpc_streaminfo_read( m_info, m_reader ) != ERROR_CODE_OK ) { ^ k3bmpcwrapper.cpp:107:46: error: 'mpc_decoder_setup' was not declared in this scope mpc_decoder_setup( m_decoder, m_reader ); ^ k3bmpcwrapper.cpp:108:54: error: 'mpc_decoder_initialize' was not declared in this scope if( !mpc_decoder_initialize( m_decoder, m_info ) ) { ^ k3bmpcwrapper.cpp: In member function 'int K3bMpcWrapper::decode(char*, int)': k3bmpcwrapper.cpp:136:77: error: 'mpc_decoder_decode' was not declared in this scope unsigned int samples = mpc_decoder_decode( m_decoder, sample_buffer, 0, 0 ); ^ k3bmpcwrapper.cpp: In member function 'bool K3bMpcWrapper::seek(const K3b::Msf&)': k3bmpcwrapper.cpp:173:78: error: 'mpc_decoder_seek_seconds' was not declared in this scope return mpc_decoder_seek_seconds( m_decoder, (double)msf.totalFrames()/75.0 ); ^ k3bmpcwrapper.cpp: In member function 'bool K3bMpcWrapper::open(const TQString&)': k3bmpcwrapper.cpp:122:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ k3bmpcwrapper.cpp: In member function 'bool K3bMpcWrapper::seek(const K3b::Msf&)': k3bmpcwrapper.cpp:174:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Makefile:639: recipe for target 'k3bmpcwrapper.lo' failed make[4]: *** [k3bmpcwrapper.lo] Error 1 make[4]: Leaving directory '/build/tde-k3b/src/k3b/plugins/decoder/musepack' Makefile:542: recipe for target 'all-recursive' failed make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory '/build/tde-k3b/src/k3b/plugins/decoder' Makefile:536: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/build/tde-k3b/src/k3b/plugins' Makefile:594: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/build/tde-k3b/src/k3b' Makefile:511: recipe for target 'all' failed make: *** [all] Error 2
On 01/22/2014 06:33 AM, David C. Rankin wrote:
All,
k3b looks like it needs a lot of work. I vaguely recall fixing numerous out-of-scope issues when gcc 4.7 emerged, but have forgotten the details. Building k3d, the following are a number of errors resulting in the FTBFS. I have summarized the errors themselves below. From the summary it looks like the error: invalid use of incomplete type 'mpc_decoder {aka struct mpc_decoder_t}' at k3bmpcwrapper.cpp:77:28 starts the domino falling. If that could be fixed, then it may resolve a number of the remaining errors. So c++ gurus, "What is the proper way to do that?"
Summary of the errors:
k3bmpcwrapper.cpp:77:28: error: invalid use of incomplete type 'mpc_decoder /usr/include/mpc/mpcdec.h:55:16: error: forward declaration of 'mpc_decoder k3bmpcwrapper.cpp:88:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined k3bmpcwrapper.cpp:101:33: error: 'mpc_streaminfo_init' was not declared in this scope k3bmpcwrapper.cpp:102:47: error: 'mpc_streaminfo_read' was not declared in this scope k3bmpcwrapper.cpp:102:52: error: 'ERROR_CODE_OK' was not declared in this scope k3bmpcwrapper.cpp:107:46: error: 'mpc_decoder_setup' was not declared in this scope k3bmpcwrapper.cpp:108:54: error: 'mpc_decoder_initialize' was not declared in this scope k3bmpcwrapper.cpp:136:77: error: 'mpc_decoder_decode' was not declared in this scope k3bmpcwrapper.cpp:173:78: error: 'mpc_decoder_seek_seconds' was not declared in this scope
The code complained of is in:
k3b/src/plugins/decoder/musepack/k3bmpcwrapper.cpp:
K3bMpcWrapper::K3bMpcWrapper() { m_input = new TQFile();
m_reader = new mpc_reader; m_reader->read = read_impl; m_reader->seek = seek_impl; m_reader->tell = tell_impl; m_reader->get_size = get_size_impl; m_reader->canseek = canseek_impl; m_reader->data = m_input;
m_decoder = new mpc_decoder; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ m_info = new mpc_streaminfo; }
The earlier warning complain of invalid conversions for each of the members in the constructor, but the error complains about the new mpc_decoder instance. I don't see what it is complaining about, it will take one of the smarter c++ guys looking at the code.
Filed as blocker since k3b must build in order for k9copy to build on nohal systems:
http://bugs.pearsoncomputing.net/show_bug.cgi?id=1858
On 01/23/2014 10:01 AM, David C. Rankin wrote:
On 01/22/2014 06:33 AM, David C. Rankin wrote:
All,
k3b looks like it needs a lot of work. I vaguely recall fixing numerous out-of-scope issues when gcc 4.7 emerged, but have forgotten the details. Building k3d, the following are a number of errors resulting in the FTBFS. I have summarized the errors themselves below. From the summary it looks like the error: invalid use of incomplete type 'mpc_decoder {aka struct mpc_decoder_t}' at k3bmpcwrapper.cpp:77:28 starts the domino falling. If that could be fixed, then it may resolve a number of the remaining errors. So c++ gurus, "What is the proper way to do that?"
Summary of the errors:
k3bmpcwrapper.cpp:77:28: error: invalid use of incomplete type 'mpc_decoder /usr/include/mpc/mpcdec.h:55:16: error: forward declaration of 'mpc_decoder k3bmpcwrapper.cpp:88:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined k3bmpcwrapper.cpp:101:33: error: 'mpc_streaminfo_init' was not declared in this scope k3bmpcwrapper.cpp:102:47: error: 'mpc_streaminfo_read' was not declared in this scope k3bmpcwrapper.cpp:102:52: error: 'ERROR_CODE_OK' was not declared in this scope k3bmpcwrapper.cpp:107:46: error: 'mpc_decoder_setup' was not declared in this scope k3bmpcwrapper.cpp:108:54: error: 'mpc_decoder_initialize' was not declared in this scope k3bmpcwrapper.cpp:136:77: error: 'mpc_decoder_decode' was not declared in this scope k3bmpcwrapper.cpp:173:78: error: 'mpc_decoder_seek_seconds' was not declared in this scope
The code complained of is in:
k3b/src/plugins/decoder/musepack/k3bmpcwrapper.cpp:
K3bMpcWrapper::K3bMpcWrapper() { m_input = new TQFile();
m_reader = new mpc_reader; m_reader->read = read_impl; m_reader->seek = seek_impl; m_reader->tell = tell_impl; m_reader->get_size = get_size_impl; m_reader->canseek = canseek_impl; m_reader->data = m_input;
m_decoder = new mpc_decoder; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ m_info = new mpc_streaminfo; }
The earlier warning complain of invalid conversions for each of the members in the constructor, but the error complains about the new mpc_decoder instance. I don't see what it is complaining about, it will take one of the smarter c++ guys looking at the code.
Filed as blocker since k3b must build in order for k9copy to build on nohal systems:
In all its glory. the problem was a bad header file in musepack-tools-svn (mpcdec.h) that ws an older version of the file. Replacing the headers with the proper files from libmpcdec allowed k3b to build!