[redland-dev] error combiling raptor 1.0

Dave Beckett dave.beckett at bristol.ac.uk
Tue Sep 9 00:58:24 BST 2003


On Mon,  8 Sep 2003 22:52:02 +0200
jalgermissen <jalgermissen at topicmapping.com> wrote:

> Hi,
> 
> I just upgraded to raptor 1.0 and while 0.9.9 did compile, 1.0 does
> not compile. configure and make outputs attached.
> 
> I am using RedHat 7.2 on a PC, gcc is version 2.96.

Yes, back in 0.9.9 (March 2003) there was support for the
pretty ancient expat you are using. configure even reports it:

  checking for expat support of UTF-8 BOM... no
  configure: WARNING: The available expat crashes on XML UTF-8 BOM in documents
  configure: WARNING: Fix either by using libxml or expat 1.95.2+

however it looks like I haven't tested that combination recently.

I attach a patch, not tested.

Dave
-------------- next part --------------
*** raptor-1.0.0.orig/raptor_parse.c	Fri Sep  5 17:31:56 2003
--- raptor-1.0.0/raptor_parse.c	Mon Sep  8 23:54:58 2003
***************
*** 1068,1074 ****
  
  #ifdef RAPTOR_XML_EXPAT
  #ifdef EXPAT_UTF8_BOM_CRASH
!   sax2->tokens_count++;
  #endif
  #endif
  
--- 1068,1074 ----
  
  #ifdef RAPTOR_XML_EXPAT
  #ifdef EXPAT_UTF8_BOM_CRASH
!   rdf_xml_parser->sax2->tokens_count++;
  #endif
  #endif
  
***************
*** 1363,1369 ****
  
  #ifdef EXPAT_UTF8_BOM_CRASH
    raptor_xml_parser* rdf_xml_parser=(raptor_xml_parser*)rdf_parser->context;
!   if(sax2->tokens_count) {
  #endif
      /* Work around a bug with the expat 1.95.1 shipped with RedHat 7.2
       * which dies here if the error is before <?xml?...
--- 1363,1369 ----
  
  #ifdef EXPAT_UTF8_BOM_CRASH
    raptor_xml_parser* rdf_xml_parser=(raptor_xml_parser*)rdf_parser->context;
!   if(rdf_xml_parser->sax2->tokens_count) {
  #endif
      /* Work around a bug with the expat 1.95.1 shipped with RedHat 7.2
       * which dies here if the error is before <?xml?...
***************
*** 3090,3096 ****
  
  #ifdef RAPTOR_XML_EXPAT
  #ifdef EXPAT_UTF8_BOM_CRASH
!   sax2->tokens_count++;
  #endif
  #endif
  
--- 3090,3096 ----
  
  #ifdef RAPTOR_XML_EXPAT
  #ifdef EXPAT_UTF8_BOM_CRASH
!   rdf_xml_parser->sax2->tokens_count++;
  #endif
  #endif
  


More information about the redland-dev mailing list