Bug 6012 - 3.5.2 Won't Compile - Cairo Errors
Status: RESOLVED INVALID
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: unspecified
Hardware: PC Linux
: P1 normal
Assignee: Dana Jansens
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2013-08-12 01:27 EDT by Das
Modified: 2014-10-27 19:03:12 EDT
3 users (show)

See Also:


Attachments
Missing Header in obrender/image.c prevented compilation (395 bytes, patch)
2013-10-26 15:22 EDT, TechZilla

Description Das 2013-08-12 01:27:27 EDT
I'm using Slackware64 14.0 and when I tried to compile Openbox 3.5.2 I got errors related to cario. Slackaware uses cairo-1.10.2

Here's the output I got;

obrender/image.c:516:5: error: unknown type name 'cairo_surface_t'
obrender/image.c: In function 'LoadWithRsvg':
obrender/image.c:557:9: error: 'CAIRO_FORMAT_ARGB32' undeclared (first use in this function)
obrender/image.c:557:9: note: each undeclared identifier is reported only once for each function it appears in
obrender/image.c:559:5: error: unknown type name 'cairo_t'
obrender/image.c:559:24: warning: initialization makes pointer from integer without a cast [enabled by default]
obrender/image.c:585:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
make[1]: *** [obrender/obrender_libobrender_la-image.lo] Error 1
make[1]: Leaving directory `/tmp/foo/openbox-3.5.2'
make: *** [all-recursive] Error 1
Making install in m4
make[1]: Entering directory `/tmp/foo/openbox-3.5.2/m4'
make[2]: Entering directory `/tmp/foo/openbox-3.5.2/m4'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/tmp/foo/openbox-3.5.2/m4'
make[1]: Leaving directory `/tmp/foo/openbox-3.5.2/m4'
Making install in po
make[1]: Entering directory `/tmp/foo/openbox-3.5.2/po'
if test "openbox" = "gettext-tools"; then \
  /usr/bin/mkdir -p /tmp/foo/package-openbox/usr/share/gettext/po; \
  for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot   Makevars.template; do \
    /usr/bin/ginstall -c -m 644 ./$file \
                    /tmp/foo/package-openbox/usr/share/gettext/po/$file; \
  done; \
  for file in Makevars; do \
    rm -f /tmp/foo/package-openbox/usr/share/gettext/po/$file; \
  done; \
else \
  : ; \
fi
make[1]: Leaving directory `/tmp/foo/openbox-3.5.2/po'
make[1]: Entering directory `/tmp/foo/openbox-3.5.2'
  CC     obrender/obrender_libobrender_la-image.lo
obrender/image.c:516:5: error: unknown type name 'cairo_surface_t'
obrender/image.c: In function 'LoadWithRsvg':
obrender/image.c:557:9: error: 'CAIRO_FORMAT_ARGB32' undeclared (first use in this function)
obrender/image.c:557:9: note: each undeclared identifier is reported only once for each function it appears in
obrender/image.c:559:5: error: unknown type name 'cairo_t'
obrender/image.c:559:24: warning: initialization makes pointer from integer without a cast [enabled by default]
obrender/image.c:585:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
make[1]: *** [obrender/obrender_libobrender_la-image.lo] Error 1
make[1]: Leaving directory `/tmp/foo/openbox-3.5.2'
make: *** [install-recursive] Error 1
Comment 1 Dana Jansens 2013-08-12 12:45:36 EDT
Maybe we need to include rsvg-cairo.h or something?
Comment 2 Dana Jansens 2013-08-12 12:50:04 EDT
You can use --disable-librtc as a workaround for now btw. But it'd be nice to hear how to make this compile if you can figure it out on that system.
Comment 3 Das 2013-08-12 20:22:43 EDT
Hi Dana, 

What is librtc where does this come from?

By the way since you mention this --disable-librtc it would be nice to include this and any other flag options left out added in the ./configure --help

At least if there was a brief explanation in the ./configure --help it might help me understand what this is, for now I can't find anything on librtc...

The only thing rtc that comes to mind is real time clock... So al I can think of for now is real time support from the kernel...

Thanks
Comment 4 Dana Jansens 2013-08-12 20:30:04 EDT
Uhm.. I meant --disable-librsvg, sorry :S
Comment 5 Das 2013-08-12 21:01:06 EDT
Ahh that's better, I was like what the heck is librtc, ahh but Boo Hoo no SVG support for now... :( hehe

thanks now it compiles...

By the way going off topic here; tools/themeupdate is this a new tool coming?

In Slack64 14.0 is uses version librsvg-2.36.1

Thanks Dana
Comment 6 Dana Jansens 2013-08-12 22:32:20 EDT
(In reply to comment #5)
> Ahh that's better, I was like what the heck is librtc, ahh but Boo Hoo no
> SVG support for now... :( hehe
> 
> thanks now it compiles...
> 
> By the way going off topic here; tools/themeupdate is this a new tool coming?

It's nothing in the works at the moment. Something we were experimenting with at one point.

> 
> In Slack64 14.0 is uses version librsvg-2.36.1

Thanks for the data point.
Comment 7 Das 2013-10-19 00:38:25 EDT
Hi Dana,

I never did install 3.5.2...

Coming back 2 months later I was taking a look at what version Openbox was at...

Dana why do I need to use; --disable-librsvg is there a bug here with this, or I need to use a different version instead of librsvg-2.36.1?

I'd rather not disable this, so where does that leave it at?

thanks...
Comment 8 Das 2013-10-19 00:39:12 EDT
Actually let's not call this bug report fixed because I don't know what's been fixed here...

thanks Dana...
Comment 9 TechZilla 2013-10-26 15:00:32 EDT
I'm also experiencing this problem, when compiling Openbox 3.5.2.  Disabling SVG support isn't acceptable for me, as I'm upgrading specifically because of SVG support.

Also wanted to provide my distro information, and some info which may help with the investigation.

 lsb_release -a

Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.3 LTS
Release:	12.04
Codename:	precise


libcairo2-dev                             1.10.2-6.1ubuntu3
librsvg2-dev                              2.36.1-0ubuntu1
Comment 10 TechZilla 2013-10-26 15:07:21 EDT
WAIT, I just found something that made this compile through finally. It appears adding another header prevented the errors, I'll gop an upload my patch as I'm getting it ready now.
Comment 11 TechZilla 2013-10-26 15:22:05 EDT
Created attachment 3393 [details]
Missing Header in obrender/image.c prevented compilation
Comment 12 Das 2013-11-01 02:50:29 EDT
So adding in the #include <librsvg/rsvg-cairo.h> this now compiles?

Can you please make a patch and submit to Dana...

Dana please patch...

THANKS
Comment 13 Das 2013-11-01 03:06:06 EDT
Sorry my bad, pretty simple little fix here, I added in #include <librsvg/rsvg-cairo.h> and have it compiling now...

THANKS
Comment 14 Dana Jansens 2013-11-11 15:41:54 EST
Thanks for the data, will make sure this is in the next build.
Comment 15 Mikachu 2014-10-27 19:03:12 EDT
https://mail.gnome.org/archives/commits-list/2012-June/msg03069.html
According to this, including rsvg-cairo.h directly is not supposed to be done. Gnome projects are very fond of randomly changing code around producing code churn in every project that uses their libraries, and I don't want to dig out what version this would need to be ifdef'd on, so if you get this error, simply update your librsvg.