[LAD] [FFADO-devel] can't build libffado 2.2.1 under gentoo

Jonathan Woithe jwoithe at just42.net
Thu Apr 14 23:30:45 UTC 2016


Hi Stefan

On Thu, Apr 14, 2016 at 11:04:15PM +0200, Stefan Richter wrote:
> On Apr 14 Stefan Richter wrote:
> > I tried multiple things, among them
> >   $ export CXXFLAGS=-std=c++11
> >   $ export CUSTOM_ENV=True
> >   $ scons -c
> >   $ scons
> > but so far I did not manage to inspire scons to add -std=c++11 to the gcc
> > command line.
> 
> The syntax is
>   $ CXXFLAGS="-std=c++11" scons CUSTOM_ENV=True
> or alternatively
>   $ CXXFLAGS="--std=c++11" scons CUSTOM_ENV=True
> and it is highly effective.  The build now goes through with lots of
> warnings but without error... until the build descends into the support/
> directory.

Right.  So what do we take away from this?  Do we need to modify the ffado
scons script to add "-std=c++11" whenever a certain version of gcc is in
use?  Is the problem specific to gentoo?  Is it something FFADO does, or is
it a problem between certain gcc versions and the versions of libraries such
as libxml++ which are used by FFADO?

> This is how a re-run of scons looks like (after src/ was built successfully
> in a previous run, and now support/ is to be built):
> 
> [...]
> scons: Building targets ...
> scons: `src' is up to date.
> g++ -o support/dbus/test-dbus.o -c -std=c++11 -m64 -Wall -g -fPIC -Wno-unused-but-set-variable -DDEBUG -DDEBUG_MESSAGES -DDBUS_HAS_THREADS_INIT_DEFAULT -DDBUS_API_SUBJECT_TO_CHANGE -I. -Isrc -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/dbus-c++-1 -I/usr/local/include -I/usr/include/libxml++-2.6 -I/usr/lib64/libxml++-2.6/include -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include support/dbus/test-dbus.cpp
> In file included from /usr/include/dbus-c++-1/dbus-c++/dbus.h:28:0,
>                  from support/dbus/controlclient.h:29,
>                  from support/dbus/test-dbus.cpp:30:
> /usr/include/dbus-c++-1/dbus-c++/types.h:194:20: error: redefinition of ‘struct DBus::type<int>’
>  template <> struct type<int32_t>
>                     ^
> /usr/include/dbus-c++-1/dbus-c++/types.h:180:20: error: previous definition of ‘struct DBus::type<int>’
>  template <> struct type<int16_t>
>                     ^

To my naive eye this appears to be a problem with the dbus-c++ headers in
combination with the gcc version in use.  Which version of dbus-c++ is
installed?  I'm away from my development machine at present so I can't take
a look at this file right now: either your compilation environment is
setting defines which result in the redefinition, or the redefinition has
always been present but is now triggering an error instead of a warning
under the newer gcc version.  Comments?

> As soon as I remove -std=c++11, the build fails again already in src/.

Right.  There appear to be two problems then.

1) It looks like we need this "-std=c++11" flag under some circumstances
   which are yet to be fully determined.

2) Newer compilers may require the treatment of some errors as warnings
   in order to work with dbus-c++, unless there's a fixed dbus-c++ which
   addresses the problems.

Added to this is the success of the Debian build as pointed out by Adrian.

Do we have any obvious patterns emerging yet?

Comments are welcome: since I'm not able to recreate the compilation problem
on my systems I can't contribute all that much to the ongoing experiments
and tests.

Regards
  jonathan


More information about the Linux-audio-dev mailing list