Can't compile catapult with GCC 4.x

General
2006-01-22
2013-04-03
  • I can't compile catapult with GCC 4.0.2.
    I'm using the new 0.6.0-R1 version.

    After issu the make command I got the following errors:
    /usr/include/libxml2/libxml/xmlerror.h:820: error: typedef ‘xmlGenericErrorFunc’ is initialized (use __typeof__ instead)
    /usr/include/libxml2/libxml/xmlerror.h:851: error: function ‘void xmlParserError(void*, const char*, ...)’ is initialized like a variable
    /usr/include/libxml2/libxml/xmlerror.h:855: error: function ‘void xmlParserWarning(void*, const char*, ...)’ is initialized like a variable
    /usr/include/libxml2/libxml/xmlerror.h:859: error: function ‘void xmlParserValidityError(void*, const char*, ...)’ is initialized like a variable
    /usr/include/libxml2/libxml/xmlerror.h:863: error: function ‘void xmlParserValidityWarning(void*, const char*, ...)’ is initialized like a variable
    /usr/include/libxml2/libxml/valid.h:44: error: typedef ‘xmlValidityErrorFunc’ is initialized (use __typeof__ instead)
    /usr/include/libxml2/libxml/valid.h:59: error: typedef ‘xmlValidityWarningFunc’ is initialized (use __typeof__ instead)
    /usr/include/libxml2/libxml/parser.h:595: error: typedef ‘warningSAXFunc’ is initialized (use __typeof__ instead)
    /usr/include/libxml2/libxml/parser.h:605: error: typedef ‘errorSAXFunc’ is initialized (use __typeof__ instead)
    /usr/include/libxml2/libxml/parser.h:617: error: typedef ‘fatalErrorSAXFunc’ is initialized (use __typeof__ instead)

    Any clues?

    Thanks!

     
    • These errors occur in the libxml2 headers, not in Catapult itself. Have you compiled other software that uses libxml2 and did that succeed? Which Catapult file was being compiled when this happened? What OS/distribution and version are you using and which version of libxml2?

       
    • Thanks to Maarten ter Huurne!
      The problem was in my libxml2 modules. I'm using Suse 10 with libxml2 2.6.20-4.
      I've upgraded to 2.6.22-2.guru.suse100 (library, devel and python modules, just in case) and now it's working fine.