c/c++ <stl> folks,
I have tried to fix rosegarden in a manner similar to the other packages that rely on stl by adding the 'this->' where the errors said. I have done that, but now the build fails complaining that:
Rosegarden::Segment, true>::PitchGreater' has no member named 'getAsEvent'
Apparently, gcc47 doesn't accept the instantation in the same way gcc46 did. rosegarden built fine with gcc46.
The patch I applied to Sets.h to fix the 'this->' complaints is attached. The error (with -fpermissive given) is:
[ 6%] Building CXX object src/CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddFingeringMarkCommand.cpp.o
cd /build/src/build/src && /usr/bin/c++ -DHAVE_XFT -DHAVE_ALSA -DHAVE_LIBJACK -DHAVE_DSSI -DHAVE_LIBLO -DHAVE_LIBLRDF -DHAVE_LADSPA -DHAVE_FFTW3F -DHAVE_CONFIG_H -fpermissive -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -O2 -w -fexceptions -DNDEBUG -include tqt.h -I/opt/tqt3/include -I/usr/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/rosegarden/src -I/build/src/rosegarden/src/base -I/usr/include/alsa -I/usr/include/freetype2 -I/usr/include/raptor2 -D'VERSION="1.7.0"' -o CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddFingeringMarkCommand.cpp.o -c /build/src/rosegarden/src/commands/notation/AddFingeringMarkCommand.cpp In file included from /build/src/rosegarden/src/commands/notation/AddFingeringMarkCommand.cpp:33:0: /build/src/rosegarden/src/base/Sets.h: In instantiation of 'bool Rosegarden::GenericChord<Element, Container, singleStaff>::PitchGreater::operator()(const Iterator&, const Iterator&) [with Element = Rosegarden::Event; Container = Rosegarden::Segment; bool singleStaff = true; Rosegarden::GenericChord<Element, Container, singleStaff>::Iterator = std::_Rb_tree_const_iteratorRosegarden::Event*]':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:2142:4: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::_Rb_tree_const_iteratorRosegarden::Event**, std::vector<std::_Rb_tree_const_iteratorRosegarden::Event* > >; _Compare = Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater]' /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:3492:4: required from 'void std::__inplace_stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::_Rb_tree_const_iteratorRosegarden::Event**, std::vector<std::_Rb_tree_const_iteratorRosegarden::Event* > >; _Compare = Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater]' /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:5683:2: required from 'void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::_Rb_tree_const_iteratorRosegarden::Event**, std::vector<std::_Rb_tree_const_iteratorRosegarden::Event* > >; _Compare = Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater]' /build/src/rosegarden/src/base/Sets.h:386:9: required from 'Rosegarden::GenericChord<Element, Container, singleStaff>::GenericChord(Container&, Rosegarden::GenericChord<Element, Container, singleStaff>::Iterator, const Rosegarden::Quantizer*, Rosegarden::PropertyName) [with Element = Rosegarden::Event; Container = Rosegarden::Segment; bool singleStaff = true; Rosegarden::GenericChord<Element, Container, singleStaff>::Iterator = std::_Rb_tree_const_iteratorRosegarden::Event*]' /build/src/rosegarden/src/commands/notation/AddFingeringMarkCommand.cpp:76:69: required from here /build/src/rosegarden/src/base/Sets.h:680:70: error: 'class Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater' has no member named 'getAsEvent' /build/src/rosegarden/src/base/Sets.h:681:70: error: 'class Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater' has no member named 'getAsEvent' /usr/bin/cmake -E cmake_progress_report /build/src/build/CMakeFiles [ 6%] Building CXX object src/CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddIndicationCommand.cpp.o cd /build/src/build/src && /usr/bin/c++ -DHAVE_XFT -DHAVE_ALSA -DHAVE_LIBJACK -DHAVE_DSSI -DHAVE_LIBLO -DHAVE_LIBLRDF -DHAVE_LADSPA -DHAVE_FFTW3F -DHAVE_CONFIG_H -fpermissive -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -O2 -w -fexceptions -DNDEBUG -include tqt.h -I/opt/tqt3/include -I/usr/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/rosegarden/src -I/build/src/rosegarden/src/base -I/usr/include/alsa -I/usr/include/freetype2 -I/usr/include/raptor2 -D'VERSION="1.7.0"' -o CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddIndicationCommand.cpp.o -c /build/src/rosegarden/src/commands/notation/AddIndicationCommand.cpp make[2]: *** [src/CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddFingeringMarkCommand.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/build/src/build' make[1]: *** [src/CMakeFiles/RosegardenCommands-static.dir/all] Error 2 make[1]: Leaving directory `/build/src/build' make: *** [all] Error 2
I have no idea how to chase this error through the stl container, etc....
On Wed, 11 Apr 2012 13:23:00 -0500 "David C. Rankin" drankinatty@suddenlinkmail.com wrote:
c/c++ <stl> folks,
I have tried to fix rosegarden in a manner similar to the other packages that rely on stl by adding the 'this->' where the errors said. I have done that, but now the build fails complaining that:
Rosegarden::Segment, true>::PitchGreater' has no member named 'getAsEvent'
Apparently, gcc47 doesn't accept the instantation in the same way gcc46 did. rosegarden built fine with gcc46.
The patch I applied to Sets.h to fix the 'this->' complaints is attached. The error (with -fpermissive given) is:
[ 6%] Building CXX object src/CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddFingeringMarkCommand.cpp.o
cd /build/src/build/src
&& /usr/bin/c++ -DHAVE_XFT -DHAVE_ALSA -DHAVE_LIBJACK -DHAVE_DSSI -DHAVE_LIBLO -DHAVE_LIBLRDF -DHAVE_LADSPA -DHAVE_FFTW3F -DHAVE_CONFIG_H -fpermissive -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -O2 -w -fexceptions -DNDEBUG -include tqt.h -I/opt/tqt3/include -I/usr/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/rosegarden/src -I/build/src/rosegarden/src/base -I/usr/include/alsa -I/usr/include/freetype2 -I/usr/include/raptor2 -D'VERSION="1.7.0"' -o CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddFingeringMarkCommand.cpp.o -c /build/src/rosegarden/src/commands/notation/AddFingeringMarkCommand.cpp In file included from /build/src/rosegarden/src/commands/notation/AddFingeringMarkCommand.cpp:33:0: /build/src/rosegarden/src/base/Sets.h: In instantiation of 'bool Rosegarden::GenericChord<Element, Container, singleStaff>::PitchGreater::operator()(const Iterator&, const singleStaff>Iterator&) [with Element = Rosegarden::Event; Container = Rosegarden::Segment; bool singleStaff = true; Rosegarden::GenericChord<Element, Container, singleStaff>::Iterator = singleStaff>std::_Rb_tree_const_iteratorRosegarden::Event*]':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:2142:4: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::_Rb_tree_const_iteratorRosegarden::Event**, std::vector<std::_Rb_tree_const_iteratorRosegarden::Event* > >; _Compare = Rosegarden::GenericChordRosegarden::Event, Rosegarden::Segment, true::PitchGreater]' /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:3492:4: required from 'void std::__inplace_stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::_Rb_tree_const_iteratorRosegarden::Event**, std::vector<std::_Rb_tree_const_iteratorRosegarden::Event* > >; _Compare = Rosegarden::GenericChordRosegarden::Event, Rosegarden::Segment, true::PitchGreater]' /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:5683:2: required from 'void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::_Rb_tree_const_iteratorRosegarden::Event**, std::vector<std::_Rb_tree_const_iteratorRosegarden::Event* > >; _Compare = Rosegarden::GenericChordRosegarden::Event, Rosegarden::Segment, true::PitchGreater]' /build/src/rosegarden/src/base/Sets.h:386:9: required from 'Rosegarden::GenericChord<Element, Container, singleStaff>::GenericChord(Container&, singleStaff>Rosegarden::GenericChord<Element, Container, singleStaff>::Iterator, const Rosegarden::Quantizer*, Rosegarden::PropertyName) [with Element = Rosegarden::Event; Container = Rosegarden::Segment; bool singleStaff = true; Rosegarden::GenericChord<Element, Container, singleStaff>::Iterator = std::_Rb_tree_const_iteratorRosegarden::Event*]' /build/src/rosegarden/src/commands/notation/AddFingeringMarkCommand.cpp:76:69: required from here /build/src/rosegarden/src/base/Sets.h:680:70: error: 'class Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater' has no member named 'getAsEvent' /build/src/rosegarden/src/base/Sets.h:681:70: error: 'class Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater' has no member named 'getAsEvent' /usr/bin/cmake -E cmake_progress_report /build/src/build/CMakeFiles [ 6%] Building CXX object src/CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddIndicationCommand.cpp.o cd /build/src/build/src && /usr/bin/c++ -DHAVE_XFT -DHAVE_ALSA -DHAVE_LIBJACK -DHAVE_DSSI -DHAVE_LIBLO -DHAVE_LIBLRDF -DHAVE_LADSPA -DHAVE_FFTW3F -DHAVE_CONFIG_H -fpermissive -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -O2 -w -fexceptions -DNDEBUG -include tqt.h -I/opt/tqt3/include -I/usr/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/rosegarden/src -I/build/src/rosegarden/src/base -I/usr/include/alsa -I/usr/include/freetype2 -I/usr/include/raptor2 -D'VERSION="1.7.0"' -o CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddIndicationCommand.cpp.o -c /build/src/rosegarden/src/commands/notation/AddIndicationCommand.cpp make[2]: *** [src/CMakeFiles/RosegardenCommands-static.dir/commands/notation/AddFingeringMarkCommand.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/build/src/build' make[1]: *** [src/CMakeFiles/RosegardenCommands-static.dir/all] Error 2 make[1]: Leaving directory `/build/src/build' make: *** [all] Error 2
I have no idea how to chase this error through the stl container, etc....
getAsEvent here is a static member function of AbstractSet, this is why this-> doesn't work. Here getAsEvent(x) can be changed to AbstractSet::getAsEvent(x) (there is no reference to an actual AbstractSet since the member function is static). If it still doesn't work (I'm not a template guru...) you can also try AbstractSet<Element,Container>::getAsEvent(x).
On 04/11/2012 01:59 PM, /dev/ammo42 wrote: <snip>
I have no idea how to chase this error through the stl container, etc....
getAsEvent here is a static member function of AbstractSet, this is why this-> doesn't work. Here getAsEvent(x) can be changed to AbstractSet::getAsEvent(x) (there is no reference to an actual AbstractSet since the member function is static). If it still doesn't work (I'm not a template guru...) you can also try AbstractSet<Element,Container>::getAsEvent(x).
/dev/ammo42
It required the 'AbstractSet<Element,Container>::getAsEvent(x)' type fix and other related fixes to 'this->push_back' to get past the initial errors. It built smoothly after that until it hit (a now very familiar looking) redeclaration error:
[ 53%] Building CXX object src/CMakeFiles/RosegardenExtended-static.dir/document/RosegardenGUIDoc.cpp.o cd /build/src/build/src && /usr/bin/c++ -DHAVE_XFT -DHAVE_ALSA -DHAVE_LIBJACK -DHAVE_DSSI -DHAVE_LIBLO -DHAVE_LIBLRDF -DHAVE_LADSPA -DHAVE_FFTW3F -DHAVE_CONFIG_H -fpermissive -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -O2 -w -fexceptions -DNDEBUG -include tqt.h -I/opt/tqt3/include -I/usr/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/rosegarden/src -I/build/src/rosegarden/src/base -I/usr/include/alsa -I/usr/include/freetype2 -I/usr/include/raptor2 -D'VERSION="1.7.0"' -o CMakeFiles/RosegardenExtended-static.dir/document/RosegardenGUIDoc.cpp.o -c /build/src/rosegarden/src/document/RosegardenGUIDoc.cpp /build/src/rosegarden/src/document/RosegardenGUIDoc.cpp: In member function 'void Rosegarden::RosegardenGUIDoc::stopRecordingMidi()': /build/src/rosegarden/src/document/RosegardenGUIDoc.cpp:2152:27: error: redeclaration of 'std::multisetRosegarden::Event*, Rosegarden::Event::EventCmp::iterator i' /build/src/rosegarden/src/document/RosegardenGUIDoc.cpp:2147:40: error: 'std::map<unsigned int, Rosegarden::Segment*>::iterator i' previously declared here make[2]: *** [src/CMakeFiles/RosegardenExtended-static.dir/document/RosegardenGUIDoc.cpp.o] Error 1 make[2]: Leaving directory `/build/src/build' make[1]: *** [src/CMakeFiles/RosegardenExtended-static.dir/all] Error 2 make[1]: Leaving directory `/build/src/build' make: *** [all] Error 2
That brings rosegarden to the point where my knowledge is exhausted. However, it is on par with the other failures in:
tde-kipi-plugins - error: redeclaration of 'TQListViewItemIterator it'
tde-tdepim - error: redeclaration of 'TQMap<TQGuardedPtr<KMFolder>, int>::Iterator it'
tde-k3b - error: redeclaration of 'K3bAudioEditorWidget::Range* r'
digiam - still dead with libpng15 issue.
What is your thought on the redeclaration issue??
On 04/12/2012 03:59 PM, David C. Rankin wrote:
On 04/11/2012 01:59 PM, /dev/ammo42 wrote:
<snip> >> I have no idea how to chase this error through the stl container, >> etc.... >> > getAsEvent here is a static member function of AbstractSet, this is why > this-> doesn't work. > Here getAsEvent(x) can be changed to AbstractSet::getAsEvent(x) (there > is no reference to an actual AbstractSet since the member function is > static). If it still doesn't work (I'm not a template guru...) you can > also try AbstractSet<Element,Container>::getAsEvent(x). >
/dev/ammo42
It required the 'AbstractSet<Element,Container>::getAsEvent(x)' type fix and other related fixes to 'this->push_back' to get past the initial errors. It built smoothly after that until it hit (a now very familiar looking) redeclaration error:
<snip>
That brings rosegarden to the point where my knowledge is exhausted. However, it is on par with the other failures in:
tde-kipi-plugins - error: redeclaration of 'TQListViewItemIterator it'
tde-tdepim - error: redeclaration of 'TQMap<TQGuardedPtr<KMFolder>, int>::Iterator it'
tde-k3b - error: redeclaration of 'K3bAudioEditorWidget::Range* r'
digiam - still dead with libpng15 issue.
What is your thought on the redeclaration issue??
Oops, forgot to attach the patch that got us this far....
On 04/12/2012 04:01 PM, David C. Rankin wrote:
On 04/12/2012 03:59 PM, David C. Rankin wrote:
On 04/11/2012 01:59 PM, /dev/ammo42 wrote:
<snip> >> I have no idea how to chase this error through the stl container, >> etc.... >> > getAsEvent here is a static member function of AbstractSet, this is why > this-> doesn't work. > Here getAsEvent(x) can be changed to AbstractSet::getAsEvent(x) (there > is no reference to an actual AbstractSet since the member function is > static). If it still doesn't work (I'm not a template guru...) you can > also try AbstractSet<Element,Container>::getAsEvent(x). >
/dev/ammo42
It required the 'AbstractSet<Element,Container>::getAsEvent(x)' type fix and other related fixes to 'this->push_back' to get past the initial errors. It built smoothly after that until it hit (a now very familiar looking) redeclaration error:
<snip> > > That brings rosegarden to the point where my knowledge is exhausted. However, > it is on par with the other failures in: > > tde-kipi-plugins - error: redeclaration of 'TQListViewItemIterator it' > > tde-tdepim - error: redeclaration of 'TQMap<TQGuardedPtr<KMFolder>, > int>::Iterator it' > > tde-k3b - error: redeclaration of 'K3bAudioEditorWidget::Range* r' > > digiam - still dead with libpng15 issue. > > What is your thought on the redeclaration issue?? >
Oops, forgot to attach the patch that got us this far....
OK,
I have solved the rosegarden build problem by basically backporting the current rosegarden-11.11.42-gcc-4.7.patch patch to the TDE version. There were files that didn't exist in our version, so I just used the sourceforge patch as a guide, but I think I have found all the gcc47 issues in the TDE version. (which foreshadows quite a bit of tedious work for the remaining TDE apps - not difficult, just a bit time consuming...)
I need somebody to signoff and push the patch to the GIT tree. Let me know what you think.
If a lawyer can do it, the rest of you coders will have no problem.... ;-)
I have solved the rosegarden build problem by basically backporting the current rosegarden-11.11.42-gcc-4.7.patch patch to the TDE version. There were files that didn't exist in our version, so I just used the sourceforge patch as a guide, but I think I have found all the gcc47 issues in the TDE version. (which foreshadows quite a bit of tedious work for the remaining TDE apps - not difficult, just a bit time consuming...)
I need somebody to signoff and push the patch to the GIT tree. Let me know what you think.
If a lawyer can do it, the rest of you coders will have no problem.... ;-)
This one of those "anal" C++ patches, right? That is, the patch will not cause problems with gcc < 4.7?
I will test here with gcc 4.4.4. My challenge is I don't have a clue how to test rosegarden for usability possible breakage.
Darrell
On 04/13/2012 03:49 PM, Darrell Anderson wrote:
This one of those "anal" C++ patches, right? That is, the patch will not cause problems with gcc < 4.7?
I will test here with gcc 4.4.4. My challenge is I don't have a clue how to test rosegarden for usability possible breakage.
Darrell
100% anal C++ issues. If you look, the largest part is just changing 'i'->'j' or adding the class reference (eg: 'GenericChord::') in front of the various members so gcc47 will quit complaining. With the pickiness of gcc47, it makes you wonder "how the hell did this stuff even run before?" I guess it always knew which 'i' it was supposed to use, but now gcc makes you tell it explicitly.
Absolutely 'zarro' substantive change to the code. Where loops used to run:
for(this::i=x;i<something;i++) {
for(i=y;i<something_else;i++) { stuff }
}
The patched loops run like:
for(this::i=x;i<something;i++) {
for(j=y;j<something_else;j++) { stuff }
}
The other changes were just to #include <unistd.h> where needed... Should be good to push.
100% anal C++ issues. If you look, the largest part is just changing 'i'->'j' or adding the class reference (eg: 'GenericChord::') in front of the various members so gcc47 will quit complaining. With the pickiness of gcc47, it makes you wonder "how the hell did this stuff even run before?" I guess it always knew which 'i' it was supposed to use, but now gcc makes you tell it explicitly.
Absolutely 'zarro' substantive change to the code. Where loops used to run:
for(this::i=x;i<something;i++) {
for(i=y;i<something_else;i++) { stuff }
}
The patched loops run like:
for(this::i=x;i<something;i++) {
for(j=y;j<something_else;j++) { stuff }
}
The other changes were just to #include <unistd.h> where needed... Should be good to push.
Over my head, but to be expected when I have barely dented my C++ text book. :(
I just rebuilt rosegarden with your patch (gcc 4.4.4). The package starts without noticeable problems. I'll push the patch to GIT, although as I mentioned, I have no idea what or how to test.
We should have a basic usability test plan for these patches....
With that said, I touched the digikam patch with some preprocessor checks like I did in the gwenview patch. I don't know whether that will make a difference for you with libpng 1.5. I built digikam here with the updated patch against libpng 1.4.9. Basic usability testing indicates the package built and runs. Yet again, I don't know specifically what the patch affects and I can't test that aspect for usability.
Please test the updated digikam patch:
http://humanreadable.nfshost.com/trinity/patches/digikam/digikam-libpng15.di...
I'll be glad if the patch works but I won't be heart broken if the patch fails. Much like you, I'm a C++ blind guy walking in the dark....
Darrell
Rosegarden gcc 4.7 patch merged in GIT hash 15276f36.
Darrell
If a lawyer can do it, the rest of you coders will have no problem.... ;-)
Doesn't promise much --- lawyers are good at twistifying just about anything.... Like the meaning of "is." :)
Darrell