Ticket #390 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

FFADO SVN fails to compile with SERIALIZE_USE_EXPAT=1

Reported by: lilrc Assigned to:
Priority: major Milestone:
Component: generic Version: FFADO SVN (trunk)
Keywords: build failure, expat Cc:
The device the bug applies to:

Description

Greetings!

When compiling the subversion trunk with SERIALIZE_USE_EXPAT=1 given to scons the process fails. The build output is pasted below. I am happy to supply more information if necessary.

$ scons SERIALIZE_USE_EXPAT=1
scons: Reading SConscript files ...
Checking for a working C-compiler yes
Checking for a working C++-compiler yes
Checking for pkg-config (at least version 0.0.0)... yes
Checking for C header file expat.h... yes
Checking for XML_ExpatVersion() in C library expat... yes
Checking for jack... yes
Checking for jack < 1.9.0... no
Checking for jack >= 1.9.9... yes
Installed Jack Audio Connection Kit (JACK) supports FFADO setbuffersize API
Checking for libraw1394 (2.0.5 or higher)... 	yes
Checking for libconfig++ (0 or higher)... 	yes
Checking for libiec61883 (1.1.0 or higher)... 	yes
Checking for lrint(3.2) in C library m... yes
Checking for lrintf(3.2) in C library m... yes
Checking whether 'which pyuic4' executes yes
Checking for the python module 'dbus' yes
Checking for the python module 'PyQt4' yes
Checking for the python module 'dbus.mainloop.qt' yes
Checking whether 'xdg-desktop-menu --help' executes yes
Checking for dbus-1 (1.0 or higher)... 	yes
Checking for dbus-c++-1 (0 or higher)... 	yes
Checking for alsa (0 or higher)... 	yes
Checking whether 'which dbusxx-xml2cpp' executes yes
Checking for variable session_bus_services_dir in package dbus-1... 	yes
Trying to find the system triple: (cached) x86_64-unknown-linux-gnu
Doing a debug build
Detected DIST_TARGET = x86_64
User space is 64-bit
Doing a 64-bit x86_64 build for AMD Athlon(tm) II X4 640 Processor
Insufficient rights to install the system-wide dbus service file.
Please run the "scons install" command with higher authority.
scons: done reading SConscript files.
scons: Building targets ...
building 'config_debug.h' from 'config_debug.h.in'
g++ -o src/DeviceStringParser.os -c -m64 -Wall -g -fPIC -fPIC -DDEBUG -DDEBUG_MESSAGES -DENABLE_BEBOB -DENABLE_FIREWORKS -DENABLE_OXFORD -DENABLE_MOTU -DENABLE_DICE -DENABLE_RME -DENABLE_GENERICAVC -DSERIALIZE_USE_EXPAT -I. -Isrc src/DeviceStringParser.cpp
building 'config.h' from 'config.h.in'
g++ -o src/bebob/bebob_avdevice.os -c -m64 -Wall -g -fPIC -fPIC -DDEBUG -DDEBUG_MESSAGES -DENABLE_BEBOB -DENABLE_FIREWORKS -DENABLE_OXFORD -DENABLE_MOTU -DENABLE_DICE -DENABLE_RME -DENABLE_GENERICAVC -DSERIALIZE_USE_EXPAT -I. -Isrc src/bebob/bebob_avdevice.cpp
In file included from src/libstreaming/generic/StreamProcessor.h:27:0,
                 from src/libstreaming/StreamProcessorManager.h:29,
                 from src/devicemanager.h:33,
                 from src/bebob/bebob_avdevice.cpp:26:
src/ffadodevice.h:62:39: error: 'std::auto_ptr' has not been declared
     FFADODevice( DeviceManager&, std::auto_ptr< ConfigRom >( configRom ) );
                                       ^
src/ffadodevice.h:62:47: error: expected ',' or '...' before '<' token
     FFADODevice( DeviceManager&, std::auto_ptr< ConfigRom >( configRom ) );
                                               ^
src/ffadodevice.h:130:26: error: expected ';' at end of member declaration
     static FFADODevice * createDevice( std::auto_ptr<ConfigRom>( x ));
                          ^
src/ffadodevice.h:130:53: error: expected ')' before '<' token
     static FFADODevice * createDevice( std::auto_ptr<ConfigRom>( x ));
                                                     ^
src/ffadodevice.h:482:10: error: 'auto_ptr' in namespace 'std' does not name a template type
     std::auto_ptr<ConfigRom>( m_pConfigRom );
          ^
In file included from src/bebob/bebob_avdevice.cpp:26:0:
src/devicemanager.h:151:18: error: expected ';' at end of member declaration
     FFADODevice* getSlaveDriver( std::auto_ptr<ConfigRom>( configRom ) );
                  ^
src/devicemanager.h:151:47: error: expected ')' before '<' token
     FFADODevice* getSlaveDriver( std::auto_ptr<ConfigRom>( configRom ) );
                                               ^
In file included from src/bebob/bebob_avdevice.h:52:0,
                 from src/bebob/bebob_avdevice.cpp:27:
src/genericavc/avc_avdevice.h:50:36: error: 'std::auto_ptr' has not been declared
     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                    ^
src/genericavc/avc_avdevice.h:50:44: error: expected ',' or '...' before '<' token
     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                            ^
src/genericavc/avc_avdevice.h:55:63: error: 'std::auto_ptr' has not been declared
     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                               ^
src/genericavc/avc_avdevice.h:55:71: error: expected ',' or '...' before '<' token
     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                                       ^
In file included from src/bebob/bebob_avdevice.cpp:27:0:
src/bebob/bebob_avdevice.h:63:36: error: 'std::auto_ptr' has not been declared
     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                    ^
src/bebob/bebob_avdevice.h:63:44: error: expected ',' or '...' before '<' token
     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                            ^
src/bebob/bebob_avdevice.h:71:63: error: 'std::auto_ptr' has not been declared
     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                               ^
src/bebob/bebob_avdevice.h:71:71: error: expected ',' or '...' before '<' token
     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                                       ^
In file included from src/bebob/focusrite/focusrite_saffire.h:28:0,
                 from src/bebob/bebob_avdevice.cpp:31:
src/bebob/focusrite/focusrite_generic.h:229:44: error: 'std::auto_ptr' has not been declared
     FocusriteDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                            ^
src/bebob/focusrite/focusrite_generic.h:229:52: error: expected ',' or '...' before '<' token
     FocusriteDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                    ^
In file included from src/bebob/bebob_avdevice.cpp:31:0:
src/bebob/focusrite/focusrite_saffire.h:272:42: error: 'std::auto_ptr' has not been declared
     SaffireDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                          ^
src/bebob/focusrite/focusrite_saffire.h:272:50: error: expected ',' or '...' before '<' token
     SaffireDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                  ^
In file included from src/bebob/bebob_avdevice.cpp:32:0:
src/bebob/focusrite/focusrite_saffirepro.h:359:46: error: 'std::auto_ptr' has not been declared
     SaffireProDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                              ^
src/bebob/focusrite/focusrite_saffirepro.h:359:54: error: expected ',' or '...' before '<' token
     SaffireProDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                      ^
In file included from src/bebob/bebob_avdevice.cpp:33:0:
src/bebob/terratec/terratec_device.h:36:43: error: 'std::auto_ptr' has not been declared
     Phase88Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                           ^
src/bebob/terratec/terratec_device.h:36:51: error: expected ',' or '...' before '<' token
     Phase88Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                   ^
In file included from src/bebob/bebob_avdevice.cpp:34:0:
src/bebob/mackie/onyxmixer.h:36:45: error: 'std::auto_ptr' has not been declared
     OnyxMixerDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                             ^
src/bebob/mackie/onyxmixer.h:36:53: error: expected ',' or '...' before '<' token
     OnyxMixerDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                     ^
In file included from src/bebob/bebob_avdevice.cpp:35:0:
src/bebob/edirol/edirol_fa101.h:35:29: error: 'std::auto_ptr' has not been declared
                        std::auto_ptr<ConfigRom>( configRom ));
                             ^
src/bebob/edirol/edirol_fa101.h:35:37: error: expected ',' or '...' before '<' token
                        std::auto_ptr<ConfigRom>( configRom ));
                                     ^
In file included from src/bebob/bebob_avdevice.cpp:36:0:
src/bebob/edirol/edirol_fa66.h:35:29: error: 'std::auto_ptr' has not been declared
                        std::auto_ptr<ConfigRom>( configRom ));
                             ^
src/bebob/edirol/edirol_fa66.h:35:37: error: expected ',' or '...' before '<' token
                        std::auto_ptr<ConfigRom>( configRom ));
                                     ^
In file included from src/bebob/bebob_avdevice.cpp:37:0:
src/bebob/esi/quatafire610.h:36:45: error: 'std::auto_ptr' has not been declared
     QuataFireDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                             ^
src/bebob/esi/quatafire610.h:36:53: error: expected ',' or '...' before '<' token
     QuataFireDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                                     ^
In file included from src/bebob/bebob_avdevice.cpp:38:0:
src/bebob/yamaha/yamaha_avdevice.h:37:38: error: 'std::auto_ptr' has not been declared
     GoDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                      ^
src/bebob/yamaha/yamaha_avdevice.h:37:46: error: expected ',' or '...' before '<' token
     GoDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                              ^
In file included from src/bebob/bebob_avdevice.cpp:39:0:
src/bebob/maudio/normal_avdevice.h:45:36: error: 'std::auto_ptr' has not been declared
     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ),
                                    ^
src/bebob/maudio/normal_avdevice.h:45:44: error: expected ',' or '...' before '<' token
     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ),
                                            ^
In file included from src/bebob/bebob_avdevice.cpp:40:0:
src/bebob/maudio/special_avdevice.h:143:35: error: 'std::auto_ptr' has not been declared
     Device(DeviceManager& d, std::auto_ptr<ConfigRom>(configRom));
                                   ^
src/bebob/maudio/special_avdevice.h:143:43: error: expected ',' or '...' before '<' token
     Device(DeviceManager& d, std::auto_ptr<ConfigRom>(configRom));
                                           ^
In file included from src/bebob/bebob_avdevice.cpp:41:0:
src/bebob/presonus/firebox_avdevice.h:38:33: error: 'std::auto_ptr' has not been declared
  Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                 ^
src/bebob/presonus/firebox_avdevice.h:38:41: error: expected ',' or '...' before '<' token
  Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                         ^
In file included from src/bebob/bebob_avdevice.cpp:42:0:
src/bebob/presonus/inspire1394_avdevice.h:47:36: error: 'std::auto_ptr' has not been declared
     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                    ^
src/bebob/presonus/inspire1394_avdevice.h:47:44: error: expected ',' or '...' before '<' token
     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
                                            ^
src/bebob/bebob_avdevice.cpp:67:40: error: 'std::auto_ptr' has not been declared
 Device::Device( DeviceManager& d, std::auto_ptr< ConfigRom >( configRom ) )
                                        ^
src/bebob/bebob_avdevice.cpp:67:48: error: expected ',' or '...' before '<' token
 Device::Device( DeviceManager& d, std::auto_ptr< ConfigRom >( configRom ) )
                                                ^
src/bebob/bebob_avdevice.cpp: In constructor 'BeBoB::Device::Device(DeviceManager&, int)':
src/bebob/bebob_avdevice.cpp:68:30: error: 'configRom' was not declared in this scope
     : GenericAVC::Device( d, configRom )
                              ^
src/bebob/bebob_avdevice.cpp: At global scope:
src/bebob/bebob_avdevice.cpp:133:45: error: 'std::auto_ptr' has not been declared
 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ))
                                             ^
src/bebob/bebob_avdevice.cpp:133:53: error: expected ',' or '...' before '<' token
 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ))
                                                     ^
src/bebob/bebob_avdevice.cpp: In static member function 'static FFADODevice* BeBoB::Device::createDevice(DeviceManager&, int)':
src/bebob/bebob_avdevice.cpp:135:29: error: 'configRom' was not declared in this scope
     unsigned int vendorId = configRom->getNodeVendorId();
                             ^
scons: *** [src/bebob/bebob_avdevice.os] Error 1
scons: building terminated because of errors.

Thanks in advance,
Karl

Change History

03/22/15 16:02:13 changed by jwoithe

  • status changed from new to closed.
  • resolution set to fixed.

This looks like bit-rot to me. Do we even care about "SERIALIZE_USE_EXPAT" anymore? Given the above breakage it appears that it's not used by the vast majority of users or else we would have seen this before. Clearly the expat serialisation option is not as well tested as the default libxml++ alternative. Is there a particular reason why you activate this compile-time option?

All that aside, the problem is relatively simple. When using libxml++, <memory> is included from within the libxml++ includes so std::auto_ptr is available. However, the expat includes don't do this. Since ffadodevice.h doesn't explicitly include <memory>, the reported breakage occurs when libxml++ is not used. The fix obviously is to include <memory> in ffadodevice.h which makes sense since this file clearly makes use of features from <memory>. This has been done in r2587.

There are a few other locations which are also affected by the lack of an explicit inclusion of <memory> and I have addressed these in r2587. It turns out that quite a few utilities and test programs need config.h included so serialise.h knows to use expat rather than libxml++ when compiling these. These missing includes are also fixed in r2587.

In addition, the expat serialiser itself required some attention before it would compile (fixed in r2586). I imagine the serialiser issues are the result of bitrot: the expat serialiser doesn't get a lot of use.

03/22/15 16:35:08 changed by lilrc

Since I run Gentoo and maintain the ebuilds for libffado in the Pro-Audio Gentoo Overlay I wanted to see if it worked, so that the choice between libxml++ and expat could be taken by the user (Gentoo is all about choice). :)

If you think it is best to remove the expat serializer entirely it is no worries for me and no users seem to miss it. If you desire to go on maintaining the expat support I think there are some more issues that should be reported. I will in that case also let Gentoo users choose between the two serializers (possibly resulting in more bug reports).

Anyway, thanks!

03/22/15 16:41:23 changed by lilrc

Oh, and a small side note. On my system, atleast, the only package needing libxml++ is libffado, so using the expat serializer instead would remove the libxmlpp dependency entirely, but I do understand if the maintenance burden outweights the benefit of reduced dependencies for Gentoo users. :P (Although somewhat unlikely, if the feature is actively maintained some other distro maybe decides to switch...)