Sean B
Sean B

Reputation: 11

RedHawk Build Failure on Ubuntu 16.04

I'm trying to build the RedHawkSdr CF on Ubuntu 16.04. Seems like this should be a relatively easy operation, but I'm not sure where to even start to look at this problem. I believe that I followed all of the Ubuntu-specific instructions for dependencies and environment variables.

I'm getting this error:

make[2]: Entering directory '/home/brasssm1/workspace/draco/redhawk-src-2.0.3/redhawk/src/control/parser'
xsdcxx cxx-parser --root-element deviceconfiguration --type-map internal/dcd.map --hxx-suffix .h --cxx-suffix .cpp --xml-parser expat --output-dir internal --generate-validation ../../xml/xsd/dcd.xsd; sed -i 's/ns == "urn:mil:jpeojtrs:sca:dcd"/ns.empty()/g' internal/dcd-pskel.cpp; sed -i 's/"urn:mil:jpeojtrs:sca:dcd"/""/g' internal/dcd-pskel.cpp 
xsdcxx cxx-parser --root-element domainmanagerconfiguration --type-map internal/dmd.map --hxx-suffix .h --cxx-suffix .cpp --xml-parser expat --output-dir internal --generate-validation ../../xml/xsd/dmd.xsd; sed -i 's/ns == "urn:mil:jpeojtrs:sca:dmd"/ns.empty()/g' internal/dmd-pskel.cpp; sed -i 's/"urn:mil:jpeojtrs:sca:dmd"/""/g' internal/dmd-pskel.cpp 
xsdcxx cxx-parser --root-element devicepkg --hxx-suffix .h --cxx-suffix .cpp --xml-parser expat --output-dir internal --generate-validation ../../xml/xsd/dpd.xsd
xsdcxx cxx-parser --root-element properties --type-map internal/prf.map --hxx-suffix .h --cxx-suffix .cpp --xml-parser expat --output-dir internal --generate-validation ../../xml/xsd/prf.xsd; sed -i 's/ns == "urn:mil:jpeojtrs:sca:prf"/ns.empty()/g' internal/prf-pskel.cpp; sed -i 's/"urn:mil:jpeojtrs:sca:prf"/""/g' internal/prf-pskel.cpp
xsdcxx cxx-parser --root-element profile --hxx-suffix .h --cxx-suffix .cpp --xml-parser expat --output-dir internal --generate-validation ../../xml/xsd/profile.xsd
xsdcxx cxx-parser --root-element softwareassembly --type-map internal/sad.map --hxx-suffix .h --cxx-suffix .cpp --xml-parser expat --output-dir internal --generate-validation ../../xml/xsd/sad.xsd; sed -i 's/ns == "urn:mil:jpeojtrs:sca:sad"/ns.empty()/g' internal/sad-pskel.cpp; sed -i 's/"urn:mil:jpeojtrs:sca:sad"/""/g' internal/sad-pskel.cpp
xsdcxx cxx-parser --root-element softwarecomponent --type-map internal/scd.map --hxx-suffix .h --cxx-suffix .cpp --xml-parser expat --output-dir internal --generate-validation ../../xml/xsd/scd.xsd; sed -i 's/ns == "urn:mil:jpeojtrs:sca:scd"/ns.empty()/g' internal/scd-pskel.cpp; sed -i 's/"urn:mil:jpeojtrs:sca:scd"/""/g' internal/scd-pskel.cpp
xsdcxx cxx-parser --root-element softpkg --type-map internal/spd.map --hxx-suffix .h --cxx-suffix .cpp --xml-parser expat --output-dir internal --generate-validation ../../xml/xsd/spd.xsd; sed -i 's/ns == "urn:mil:jpeojtrs:sca:spd"/ns.empty()/g' internal/spd-pskel.cpp; sed -i 's/"urn:mil:jpeojtrs:sca:spd"/""/g' internal/spd-pskel.cpp 
make  all-am
make[3]: Entering directory '/home/brasssm1/workspace/draco/redhawk-src-2.0.3/redhawk/src/control/parser'
  CXX      libossieparser_la-Properties.lo
  CXX      libossieparser_la-debug.lo
  CXX      libossieparser_la-SoftPkg.lo
  CXX      libossieparser_la-DomainManagerConfiguration.lo
  CXX      libossieparser_la-ComponentDescriptor.lo
  CXX      libossieparser_la-SoftwareAssembly.lo
  CXX      libossieparser_la-componentProfile.lo
  CXX      libossieparser_la-DeviceManagerConfiguration.lo
  CXX      internal/libossieparser_la-prf-pskel.lo
In file included from /usr/include/xsd/cxx/parser/expat/elements.hxx:362:0,
                 from internal/sad-pskel.h:114,
                 from internal/sad-pimpl.h:30,
                 from internal/sad-parser.h:27,
                 from SoftwareAssembly.cpp:22:
/usr/include/xsd/cxx/parser/expat/elements.txx: In member function ‘bool xsd::cxx::parser::expat::document<C>::parse(std::istream&, const std::__cxx11::basic_string<_CharT>*, const std::__cxx11::basic_string<_CharT>*, xsd::cxx::xml::error_handler<C>&)’:
/usr/include/xsd/cxx/parser/expat/elements.txx:282:22: error: no match for ‘operator==’ (operand types are ‘xsd::cxx::parser::expat::parser_auto_ptr’ and ‘int’)
           if (parser == 0)
                      ^
In file included from /usr/include/xsd/cxx/parser/xml-schema.hxx:569:0,
                 from internal/sad-pskel.h:109,
                 from internal/sad-pimpl.h:30,
                 from internal/sad-parser.h:27,
                 from SoftwareAssembly.cpp:22:
/usr/include/xsd/cxx/parser/xml-schema.txx:15:7: note: candidate: template<class C> bool xsd::cxx::parser::operator==(const xsd::cxx::parser::string_sequence<C>&, const xsd::cxx::parser::string_sequence<C>&)
       operator== (const string_sequence<C>& a, const string_sequence<C>& b)
       ^
/usr/include/xsd/cxx/parser/xml-schema.txx:15:7: note:   template argument deduction/substitution failed:
In file included from /usr/include/xsd/cxx/parser/expat/elements.hxx:362:0,
                 from internal/sad-pskel.h:114,
                 from internal/sad-pimpl.h:30,
                 from internal/sad-parser.h:27,
                 from SoftwareAssembly.cpp:22:
/usr/include/xsd/cxx/parser/expat/elements.txx:282:25: note:   ‘xsd::cxx::parser::expat::parser_auto_ptr’ is not derived from ‘const xsd::cxx::parser::string_sequence<C>’
           if (parser == 0)

I downloaded the dependencies per the instruction, though I noticed one error when updating the repos:

E: Failed to fetch http://ppa.launchpad.net/redhawksdr/redhawk/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

I'm not sure if this is causing any problems or not.

Upvotes: 1

Views: 385

Answers (1)

Youssef Bagoulla
Youssef Bagoulla

Reputation: 1247

Looks like this is a bug in expat, here is a link that provides some diffs for a similar bug.

You'll need to apply the same sort of fix, in elements.txx line 282 change parser == 0 to parser.get() == 0

This is what the current HEAD of expat's git repo looks like and they have the same fix

After making that fix the framework should compile.

Regarding the 404 error, there are only packages in that ppa for Trusty (14.04). You can see that here. The omniEvents package available in 16.04's default repositories should work fine in most cases.

Upvotes: 1

Related Questions