Ardour 7.0 pre0 - strange build error

Hello,

I have a new build error for Ardour 7.0 pre0 from git (7.0-pre0-1120-gef20e8e5df). To my untrained eye it seems to be an issue between “ld”, hardour and the installed version of Boost. I would appreciate it if somebody could help me understand the issue. Info on my setup:

  • Ubuntu Studio 21.10 (Impish Indry)
  • gcc 11.2 (as bundled with 21.10)
  • libboost* (1.74.0-8ubuntu6 - as bundled with 21.10)

I can show more info if needs, but I don’t know what will be useful.

Please see below for the build output (hardour) where things break during the build - apologies for the sheer amount of output, I tried to keep things down to a minimum.

Cheers,
Jan Henkins

Output:

---truncated for brevity---

[1131/1174] Linking build/headless/hardour-7.0.pre0.1120
/usr/bin/ld: libs/ardour/libardour.so: undefined reference to `ARDOUR::MIDITrigger::start_offset() const'
collect2: error: ld returned 1 exit status

In file included from /usr/include/boost/bind.hpp:30,
                 from ../libs/pbd/pbd/signals.h:37,
                 from ../libs/pbd/pbd/transmitter.h:25,
                 from ../libs/pbd/pbd/error.h:22,
                 from ../luasession/luasession.cc:22:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glibmm-2.4/glibmm/thread.h:39,
                 from /usr/include/glibmm-2.4/glibmm.h:88,
                 from ../luasession/luasession.cc:18:
../libs/pbd/pbd/stateful.h: In member function ‘bool PBD::Stateful::property_changes_suspended() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/pbd/pbd/stateful.h:108:58: note: in expansion of macro ‘g_atomic_int_get’
  108 |         bool property_changes_suspended() const { return g_atomic_int_get (&_stateful_frozen) > 0; }
      |                                                          ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/audioengine.h: In member function ‘bool ARDOUR::AudioEngine::is_reset_requested() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/audioengine.h:121:60: note: in expansion of macro ‘g_atomic_int_get’
  121 |         bool           is_reset_requested() const { return g_atomic_int_get (&_hw_reset_request_count); }
      |                                                            ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/automation_list.h: In member function ‘virtual bool ARDOUR::AutomationList::touching() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/automation_list.h:112:41: note: in expansion of macro ‘g_atomic_int_get’
  112 |         bool touching () const { return g_atomic_int_get (&_touching) != 0; }
      |                                         ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/session.h: In member function ‘ARDOUR::Session::PostTransportWork ARDOUR::Session::post_transport_work() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/session.h:1602:91: note: in expansion of macro ‘g_atomic_int_get’
 1602 |         PostTransportWork post_transport_work() const        { return (PostTransportWork) g_atomic_int_get (&_post_transport_work); }
      |                                                                                           ^~~~~~~~~~~~~~~~

In file included from /usr/include/boost/bind.hpp:30,
                 from ../libs/pbd/pbd/event_loop.h:27,
                 from ../session_utils/common.cc:25:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glibmm-2.4/glibmm/thread.h:39,
                 from /usr/include/glibmm-2.4/glibmm.h:88,
                 from ../session_utils/common.cc:21:
../libs/pbd/pbd/stateful.h: In member function ‘bool PBD::Stateful::property_changes_suspended() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/pbd/pbd/stateful.h:108:58: note: in expansion of macro ‘g_atomic_int_get’
  108 |         bool property_changes_suspended() const { return g_atomic_int_get (&_stateful_frozen) > 0; }
      |                                                          ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/audioengine.h: In member function ‘bool ARDOUR::AudioEngine::is_reset_requested() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/audioengine.h:121:60: note: in expansion of macro ‘g_atomic_int_get’
  121 |         bool           is_reset_requested() const { return g_atomic_int_get (&_hw_reset_request_count); }
      |                                                            ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/automation_list.h: In member function ‘virtual bool ARDOUR::AutomationList::touching() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/automation_list.h:112:41: note: in expansion of macro ‘g_atomic_int_get’
  112 |         bool touching () const { return g_atomic_int_get (&_touching) != 0; }
      |                                         ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/session.h: In member function ‘ARDOUR::Session::PostTransportWork ARDOUR::Session::post_transport_work() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/session.h:1602:91: note: in expansion of macro ‘g_atomic_int_get’
 1602 |         PostTransportWork post_transport_work() const        { return (PostTransportWork) g_atomic_int_get (&_post_transport_work); }
      |                                                                                           ^~~~~~~~~~~~~~~~

In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from ../libs/pbd/pbd/xml++.h:42,
                 from ../libs/pbd/pbd/stateful.h:32,
                 from ../session_utils/copy-mixer.cc:25:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glibmm-2.4/glibmm/thread.h:39,
                 from /usr/include/glibmm-2.4/glibmm.h:88,
                 from ../session_utils/copy-mixer.cc:22:
../libs/pbd/pbd/stateful.h: In member function ‘bool PBD::Stateful::property_changes_suspended() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/pbd/pbd/stateful.h:108:58: note: in expansion of macro ‘g_atomic_int_get’
  108 |         bool property_changes_suspended() const { return g_atomic_int_get (&_stateful_frozen) > 0; }
      |                                                          ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/automation_list.h: In member function ‘virtual bool ARDOUR::AutomationList::touching() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/automation_list.h:112:41: note: in expansion of macro ‘g_atomic_int_get’
  112 |         bool touching () const { return g_atomic_int_get (&_touching) != 0; }
      |                                         ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/session.h: In member function ‘ARDOUR::Session::PostTransportWork ARDOUR::Session::post_transport_work() const’:
/usr/include/glib-2.0/glib/gatomic.h:100:20: warning: cast from type ‘const gint*’ {aka ‘const int*’} to type ‘gint*’ {aka ‘int*’} casts away qualifiers [-Wcast-qual]
  100 |     __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST);          \
      |                    ^~~~~~~~~~~~~~~~
../libs/ardour/ardour/session.h:1602:91: note: in expansion of macro ‘g_atomic_int_get’
 1602 |         PostTransportWork post_transport_work() const        { return (PostTransportWork) g_atomic_int_get (&_post_transport_work); }
      |                                                                                           ^~~~~~~~~~~~~~~~

Waf: Leaving directory `/home/jan/projects/git/ardour-build/build'
Build failed
 -> task in 'hardour-7.0.pre0.1120' failed with exit status 1 (run with -v to display more information)

That is currently normal, builds are broken (also our nightly builds) and @paul needs to fix it.

You can work around by configuring with --use-lld or use clang, but at this point in time Ardour is just in pieces. Best stay with 6.9

1 Like

Hi Robin,

I see, thanks for the clarification. I do use 6.9 for serious stuff, but I like to play with 7.0 mainly out of curiosity. The new clip launching stuff is great fun.

Cheerio,
Jan Henkins

Hi Robin,

Thank you for the advice on lld. I amended my build script to use the following:

./waf configure --docs --freedesktop --use-lld --with-backends=jack,alsa,dummy,pulseaudio

I can confirm that building ardour7 now works perfectly on both the systems I tried it on. Sorry for another noob question, but it would be nice to understand - is there a good reason to use lld instead of the standard GCC linker (I think it’ s called “ld”) in a general sense? I understand that lld is part of the LLVM project, and they advertise it as a drop-in replacement to the GNU linkers. Sounds good to me, but since I am not a coder I have no way of telling whether this is a good thing or not.

Cheerio,
Jan Henkins

I think you just accidentally git pulled at a point where it didn’t compile. I ran into the same errors, and a day later a bunch of Paul’s commits fixed the issue, without any change to the toolchain on my side.

1 Like

lld runs a lot faster compared to GNU’s ld (which can take 4-6 seconds for a large application like Ardour). While developing, I often compile Ardour 100 times a day and lld saves me 10 mins.

lld does not report unresolved symbols as errors. If missing symbols are used at runtime the application will exit when they are called. So for deployment using ld is safer. Besides many systems do not have lld.

PS. lld also has an option to bail out if unresolve symbols are found, but that voids the speed advantage. ld has an option to ignore missing symbols, but that doesn’t make it faster.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.