Ardour3 - Build failed

Anyone get this error at build stage of Ardour 3?

What could be?

[265/624] cxx: libs/ardour/port_set.cc -> build/default/libs/ardour/port_set_1.o
/usr/include/c++/4.2/bits/stl_iterator.h: In function ‘bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) [with _IteratorL = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > > >, _IteratorR = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits, std::allocator > > >]’:
/usr/include/c++/4.2/bits/stl_iterator.h:346: instantiated from ‘bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) [with _IteratorL = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > > >, _IteratorR = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits, std::allocator > > >]’
…/libs/ardour/port_set.cc:41: instantiated from here
/usr/include/c++/4.2/bits/stl_iterator.h:334: error: no match for ‘operator==’ in ‘((const std::reverse_iterator<Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > > > >)__x)->std::reverse_iterator<_Iterator>::base with _Iterator = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > > > == std::reverse_iterator<_Iterator>::base() const with _Iterator = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits, std::allocator > > >
/usr/include/glibmm-2.4/glibmm/timeval.h:182: note: candidates are: bool Glib::operator==(const Glib::TimeVal&, const Glib::TimeVal&)
/usr/include/glibmm-2.4/glibmm/ustring.h:1430: note: bool Glib::operator==(const char
, const Glib::ustring&)
/usr/include/glibmm-2.4/glibmm/ustring.h:1426: note: bool Glib::operator==(const Glib::ustring&, const char*)
/usr/include/glibmm-2.4/glibmm/ustring.h:1422: note: bool Glib::operator==(const Glib::ustring&, const Glib::ustring&)
Waf: Leaving directory `/home/joe/Desktop/3.0/build’
Build failed
-> task failed (err #1):
{task: cxx port_set.cc -> port_set_1.o}

This is a bug in some component of gcc/g++ (possibly the standard template library). It is solved in newer distributions. I am considering adding a workaround to the code, but haven’t decided yet.

ah OK! Thanks, Paul, just curious here.

I’ll probably try to fix the gcc-g+±build essential,etc on my side, if I break my system I think I’ll even be happy since I’ll have the excuse to do a descent switch.

I had almost the same error:

[265/624] cxx: libs/ardour/port_set.cc -> build/default/libs/ardour/port_set_1.o
/usr/include/c++/4.3/bits/stl_iterator.h: In function ‘bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) [with _IteratorL = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > > >, _IteratorR = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits, std::allocator > > >]’:
/usr/include/c++/4.3/bits/stl_iterator.h:347: instantiated from ‘bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) [with _IteratorL = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > > >, _IteratorR = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits, std::allocator > > >]’
…/libs/ardour/port_set.cc:41: instantiated from here
/usr/include/c++/4.3/bits/stl_iterator.h:335:37: error: no match for ‘operator==’ in ‘((const std::reverse_iterator<Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > > > >)__x)->std::reverse_iterator<_Iterator>::base with _Iterator = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > > > == std::reverse_iterator<_Iterator>::base() const with _Iterator = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits, std::allocator > > >
/usr/include/glibmm-2.4/glibmm/timeval.h:182:55: note: candidates are: bool Glib::operator==(const Glib::TimeVal&, const Glib::TimeVal&)
/usr/include/glibmm-2.4/glibmm/ustring.h:1472:59: note: bool Glib::operator==(const char
, const Glib::ustring&)
/usr/include/glibmm-2.4/glibmm/ustring.h:1468:59: note: bool Glib::operator==(const Glib::ustring&, const char*)
/usr/include/glibmm-2.4/glibmm/ustring.h:1464:62: note: bool Glib::operator==(const Glib::ustring&, const Glib::ustring&)
Waf: Leaving directory `/home/ks/tmp/ardour3/3.0/build’
Build failed
-> task failed (err #1):
{task: cxx port_set.cc -> port_set_1.o}

I updated glibmm2
old version: 2.18.1
new version: 2.22.1

now it fails here:
[357/624] cxx: libs/gtkmm2ext/tearoff.cc -> build/default/libs/gtkmm2ext/tearoff_1.o
…/libs/gtkmm2ext/stateful_button.cc: In member function ‘void Gtkmm2ext::StateButton::avoid_prelight_on_style_changed(const Glib::RefPtrGtk::Style&, GtkWidget*)’:
…/libs/gtkmm2ext/stateful_button.cc:88:41: error: ‘gtk_widget_get_state’ was not declared in this scope
…/libs/gtkmm2ext/stateful_button.cc: In member function ‘void Gtkmm2ext::StateButton::avoid_prelight_on_state_changed(Gtk::StateType, GtkWidget*)’:
…/libs/gtkmm2ext/stateful_button.cc:119:58: error: ‘gtk_widget_get_state’ was not declared in this scope
Waf: Leaving directory `/home/ks/tmp/ardour3/3.0/build’
Build failed
-> task failed (err #1):
{task: cxx stateful_button.cc -> stateful_button_1.o}

I had this error, related to aubio:

>>> Compiling source in /var/tmp/portage/media-sound/ardour-3.9999/work/ardour-3.9999 ... e[32;01m*e[0m ./waf --freedesktop --prefix=/usr --aubio --nls --lv2 --freesound --vst --fpu-optimization waf [command] [options] Main commands (example: ./waf build -j4) build : builds the project clean : removes the build files configure: configures the project dist : makes a tarball for redistributing the sources distcheck: checks if the sources compile (tarball from 'dist') distclean: removes the build directory install : installs the build files uninstall: removes the installed files waf: error: no such option: --aubio

I may have fixed it. It’s compiling now. If it succeeds, I’ll start a new thread for compiling ardour-3.9999 on Gentoo. All I had to do was remove the --aubio argument from the ebuild (although I left the aubio dependency in).

How important is aubio for Ardour and what exactly does aubio do for Ardour?

Nope. I get this:

[307/625] cxx: libs/ardour/strip_silence.cc -> build/default/libs/ardour/strip_silence_1.o [308/625] cxx: libs/ardour/svn_revision.cc -> build/default/libs/ardour/svn_revision_1.o ../libs/ardour/svn_revision.cc:1:1: error: expected unqualified-id before numeric constant Waf: Leaving directory `/var/tmp/portage/media-sound/ardour-3.9999/work/ardour-3.9999/build' Build failed -> task failed (err #1): {task: cxx svn_revision.cc -> svn_revision_1.o}

I workarounded it changing the line in libs/ardour/port_set.cc +39

  • Glib::ustring::const_reverse_iterator r_iterator = aname.rbegin();
  • Glib::ustring::reverse_iterator r_iterator = aname.rbegin();

[edit]

i went to the gtk_widget_get_state error too. That’s because of old gtkmm. To workaround it you need to substitute GTK_WIDGET_STATE instead. And also change the type for state (line 122) of stateful_button.cc to guint.

I’m on Debian stable and this is the only way to compile it. I suppose i’ll get new errors though.
By the way, the original bug, i suppose it’s related to glibmm instead of the compiler.