Issue 114999 - unoxml fails to build against redland 1.0.11
Summary: unoxml fails to build against redland 1.0.11
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: DEV300m89
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: 3.4.0
Assignee: dtardon
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-09 02:17 UTC by ht990332
Modified: 2017-05-20 11:43 UTC (History)
5 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
set REDLAND_CFLAGS when using system redland (1.19 KB, patch)
2010-10-14 18:19 UTC, dtardon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description ht990332 2010-10-09 02:17:57 UTC
Compiling: unoxml/source/rdf/librdf_repository.cxx
In file included from /usr/include/librdf.h:310:0,
                 from
/home/hussam/packages/OOo/src/OOo/unoxml/source/rdf/librdf_repository.cxx:42:
/usr/include/rdf_init.h:48:51: error: 'rasqal_world' has not been declared
/usr/include/rdf_init.h:51:1: error: 'rasqal_world' does not name a type
dmake:  Error code 1, while making '../../unxlngi6.pro/slo/librdf_repository.obj'


system raptor 1.4.21
system rasqal 0.9.20
Comment 1 Olaf Felka 2010-10-11 06:58:52 UTC
@ hjs: Please have a look.
Comment 2 mst.ooo 2010-10-11 10:08:51 UTC
the problem is not redland, but rasqal.

from the rasqal 0.9.17 announcement:

* ABI AND API CHANGED in this release
   *** Rasqal 0.9.17 is incompatible with 0.9.16 or earlier ***
   *** shared library soname .so.X has changed ***
* All constructors now take a rasqal_world argument

so we'll eventually have to upgrade the bundled libraries.
i don't think it makes sense to support two incompatible versions of the libraries.
when we switch it will stop working with the older rasqal version.
Comment 3 ht990332 2010-10-11 18:40:12 UTC
looks like adding 
#include <rasqal/rasqal.h>
to 
/usr/include/rdf_init.h
allows the build to continue.
Comment 4 mst.ooo 2010-10-12 13:06:59 UTC
so it seems the problem is not as severe as i thought.

see this mail on upstream dev list:
http://lists.usefulinc.com/pipermail/redland-dev/2010-October/002180.html

the problem is just that librdf.h in 1.0.11 is not self-contained.
because librdf_repository.cxx only uses the librdf interface directly,
and not the raptor or rasqal interfaces, it only includes librdf.h.
so the API incompatibility of rasqal should not be a problem.

the easiest fix for this would be to upgrade to the forthcoming
redland 1.0.12 release.
please try out the prerelease tarball linked from the mail,
if it works for you.

i'll put some distro maintainers on CC to make them aware of the problem...

now i have a question regarding the configure script:
is it possible to replace this:
   PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
with something like:
   PKG_CHECK_MODULES(REDLAND, (redland >= 1.0.8) && (redland != 1.0.11))
Comment 5 rene 2010-10-12 14:07:53 UTC
> i'll put some distro maintainers on CC to make them aware of the problem...

we know already, but thanks :)

> now i have a question regarding the configure script:
> is it possible to replace this:
>   PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
> with something like:
>    PKG_CHECK_MODULES(REDLAND, (redland >= 1.0.8) && (redland != 1.0.11))

no, except maybe some cascading, but I wouldn't bother.

We can still do

PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
AC_MSG_CHECKING([for sanity of librdf.h])
if test "$PKG_CONFIG --modversion" = "1.0.11"; then
   AC_MSG_ERROR([headers broken!!!1111])
else
   AC_MSG_RESULT([ok])
fi

or someting else like a define (where the check then needs to be in unoxml
probably, like the following):

REDLAND_VERSION=$(shell $PKG_CONFIG --modversion redland)
.IF "$(REDLAND_VERSION)" == "1.0.11"
CFLAGS += -DREDLAND_NO_SELF_CONTAINED_HEADERS
.ENDIF

and

 #include <boost/shared_array.hpp>                                              
 #include <boost/bind.hpp>                                                      

#ifdef REDLAND_NON_SELF_CONTAINED_HEADERS                                      
       #include <redland.h>                                                    
      
#else                                
#include <librdf.h>                                                            
#endif

or just forget it and just include redland.h unconditionally....
Comment 6 mst.ooo 2010-10-13 11:56:48 UTC
> no, except maybe some cascading, but I wouldn't bother.

ah, ok.

> or just forget it and just include redland.h unconditionally....

hmmm, given the alternatives, i now also tend towards this...
it shouldn't cause problems (in that the unordf library picks up
a dependency on the ABI unstable rasqal library), right?


[oh, and OT:
 hell has frozen over, and the redland maintainer has actually merged
 2 patches of mine yesterday!  yes, (2 of) the same patches that cmc
 removed from the OOo build some months ago...]
Comment 7 mst.ooo 2010-10-14 10:10:08 UTC
FYI: redland 1.0.12 release:
http://lists.usefulinc.com/pipermail/redland-dev/2010-October/002191.html

* Enable librdf.h to be used as the top-level header in addition to redland.h
Comment 8 ht990332 2010-10-14 14:15:22 UTC
great, should we close this bug report then?
Comment 9 mst.ooo 2010-10-14 14:39:51 UTC
@ht990332
hmmm, i can still replace the #include in librdf_repository.cxx, but it's now no
longer urgent... the "quick fix" is to use the new redland release.

(for some bizarre reason a lot of the #includes in librdf_repository.cxx are
duplicated, perhaps through some kind of mis-merge, so it needs a cleanup anyway...)
Comment 10 ht990332 2010-10-14 16:57:47 UTC
Now openoffice build fails with redland 1.0.12 at 
....in file included from
/build/src/OOO330_m10/unoxml/source/rdf/librdf_repository.cxx:42:0:

/usr/include/librdf.h:33:20: fatal error: rasqal.h: No such file or directory

the file on my filesystem is 
/usr/include/rasqal/rasqal.h and not /usr/include/rasqal.h
redland developer said: " you have to have your include paths set up using
either pkg-config or (legacy) redland-config"
"rasqal.h is correct when the include paths are set up correctly"
Comment 11 mst.ooo 2010-10-14 17:46:46 UTC
@ht990332:

in other words, you didn't try out the redland prerelease tarball like i
suggested  :-P

but anyway, since i don't know how this pkg-config stuff works, and most of the
CC list does, i'd suggest somebody attach a patch that:
- checks for the system rasqal library in configure
- sets up the makefile in unoxml/source/rdf to give the correct flags
- if it still fails to build... also check for raptor

note: i just tried and #include redland.h works as-is with the bundled redland,
because all the headers are delivered "flat" in inc/external

Comment 12 ht990332 2010-10-14 17:57:51 UTC
Yes, sorry. I was replacing the hard disk I do my builds on. Then with some
power problems, I was unable to do a full build. Sorry again.
Comment 13 dtardon 2010-10-14 18:18:18 UTC
unoxml/source/rdf/makefile.mk already adds $(REDLAND_CFLAGS) to CFLAGS. The
problem is that configure hasn't ever set it .-)
Comment 14 dtardon 2010-10-14 18:19:55 UTC
Created attachment 72052 [details]
set REDLAND_CFLAGS when using system redland
Comment 15 andyrtr 2010-10-15 16:23:58 UTC
with your patch OOO330_m10 and DEV300_m89 built fine for Arch and redland
1.0.12/rasqal 0.9.20.
Comment 16 mst.ooo 2010-10-19 15:15:45 UTC
so this has always been broken anyway, nice  :)

thanks for the simple fix, dtardon!

fixed in cws sw34bf01:
http://hg.services.openoffice.org/hg/cws/sw34bf01/rev/b3eeeee94b58
http://hg.services.openoffice.org/hg/cws/sw34bf01/rev/3eb4e9443ced
Comment 17 mst.ooo 2010-10-19 15:20:10 UTC
please verify
Comment 18 dtardon 2010-10-19 16:33:27 UTC
yeah, that works