[redland-dev] Troubles in parsing data into a model

Dave Beckett dave at dajobe.org
Mon Mar 27 19:21:20 BST 2006


Attilio Fiandrotti wrote:
> Dave Beckett wrote:
> 
>> fiandro at tiscali.it wrote:
<snip/>
>> I think it's related to the previously announced change to raptor:
>>
>> "Future API change: From the next release of Raptor, raptor_statement
>> predicates will return identifiers of type
>> RAPTOR_IDENTIFIER_TYPE_RESOURCE instead of
>> RAPTOR_IDENTIFIER_TYPE_PREDICATE."
>> -- http://librdf.org/raptor/RELEASE.html#rel1_4_8
> 
> 
> this is plausible: a ltrace run shows

<snip/>
> librdf_parser_parse_string_into_model(0x8059cb8, 0x8049128, 0x8059a98,
> 0x8059bf0, 0xb79d1360librdf error - Unknown Raptor predicate identifier
> type 1
> librdf error - Unknown Raptor predicate identifier type 1
> librdf error - Unknown Raptor predicate identifier type 1
> ) = 0
> 
> <snip>
> 
> +++ exited (status 0) +++

Type 1 is RAPTOR_IDENTIFIER_TYPE_RESOURCE.  Older code only expects
type 2 RAPTOR_IDENTIFIER_TYPE_PREDICATE.

I *thought* I changed all the redland 1.0.3 code to expect both, and I
just checked the source in SVN (rdf_parser_raptor.c is where this error
message comes from) and it seems I missed the case in 1.0.3

If you were using 1.0.3 tarballs you'll need to edit rdf_parser_raptor.c
around line 194 to allow both types.  From:
  } else if (rstatement->predicate_type ==
RAPTOR_IDENTIFIER_TYPE_PREDICATE) {

to
  } else if (rstatement->predicate_type ==
RAPTOR_IDENTIFIER_TYPE_RESOURCE ||
             rstatement->predicate_type ==
RAPTOR_IDENTIFIER_TYPE_PREDICATE) {

However, this *is* fixed in SVN so I'm guessing you have some 1.0.3 or
older shared library being used.

>  > Make sure that the raptor (and rasqal) sources are all up to date with
> 
>> respect to SVN.  That means three directories if you followed the
>> configuration given at http://librdf.org/INSTALL.html
>>
>> The latest svn revision 10705 works with the API change.  [Apart from 1
>> thing in rdf/xml-abbrev serializing that I have yet to fix].
> 
> 
> i'm working with 10706 librdf, raptor, rasqal and bindings revision from
> SVN: i removed redland debian packages and deleted both binaries and
> sources before checking out everything from scratch; this is my gcc

did you delete shared libraries?  You can automate that with:
  sudo make uninstall
inside the packages.

> does this help? do you need more/other debug output?

Try ldd ./example2 and see what shared library it is using.

Dave


More information about the redland-dev mailing list