WARNING: Cairo library is too old and misses cairo_push_group()

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
cobralasers
Earned a small fee
Earned a small fee
Posts: 10
Joined: Tue Mar 01, 2022 8:53 pm

WARNING: Cairo library is too old and misses cairo_push_group()

Post by cobralasers »

I have 2 old build servers. let's call them bld_1 and bld_2. they are both running CentOS Linux release 7.5.1804. They were intended to setup identical, but over the years maybe this or that was installed on 1 and not the other. Importantly though neither has ever run yum update.

Until recently, they both were able to compile WxWidgets-3.1.0, now only bld_1 compiles wx. I have been over the yum history for bld_2. There were several newer transactions on 2 than on1. I didn't see anything suspect, but I rolled back those transactions anyway; no dice wx will still not build on 2.

I get the warnings during the configure stage of the build:
```
configure: WARNING: Cairo library is too old and misses cairo_push_group()
configure: WARNING: wxGraphicsContext won't be available
```
however....
bld_1:
```
rpm -qa | grep cairo
cairo-1.15.12-3.el7.x86_64
cairo-gobject-devel-1.15.12-3.el7.x86_64
cairo-gobject-1.15.12-3.el7.x86_64
cairo-devel-1.15.12-3.el7.x86_64
```
bld_2:
```
cairo-gobject-devel-1.15.12-4.el7.x86_64
cairo-1.15.12-4.el7.i686
cairo-devel-1.15.12-4.el7.x86_64
cairomm-1.12.0-1.el7.x86_64
pycairo-1.8.10-8.el7.x86_64
cairo-1.15.12-4.el7.x86_64
cairo-gobject-1.15.12-4.el7.x86_64
```
so i guess to note: bld_2 has cairo .4 and bld_1 has cairo .3. However I have tried to:

```
sudo yum downgrade cairo
```
fails with no package available

I tried reinstalling cairo from yum. no dice.

I double checked the header file in /usr/include
bld_2
```
$ ls -all | grep cairo
drwxr-xr-x. 2 root root 4096 Nov 21 08:34 cairo

$ ll
total 196
-rw-r--r--. 1 root root 8698 Aug 8 2019 cairo-deprecated.h
-rw-r--r--. 1 root root 1458 Aug 8 2019 cairo-features.h
-rw-r--r--. 1 root root 3721 Aug 8 2019 cairo-ft.h
-rw-r--r--. 1 root root 5117 Aug 8 2019 cairo-gl.h
-rw-r--r--. 1 root root 6452 Aug 8 2019 cairo-gobject.h
-rw-r--r--. 1 root root 111022 Aug 8 2019 cairo.h
-rw-r--r--. 1 root root 5617 Aug 8 2019 cairo-pdf.h
-rw-r--r--. 1 root root 3632 Aug 8 2019 cairo-ps.h
-rw-r--r--. 1 root root 3072 Aug 8 2019 cairo-script.h
-rw-r--r--. 1 root root 4059 Aug 8 2019 cairo-script-interpreter.h
-rw-r--r--. 1 root root 4504 Aug 8 2019 cairo-svg.h
-rw-r--r--. 1 root root 2173 Aug 8 2019 cairo-tee.h
-rw-r--r--. 1 root root 149 Aug 8 2019 cairo-version.h
-rw-r--r--. 1 root root 3775 Aug 8 2019 cairo-xcb.h
-rw-r--r--. 1 root root 3577 Aug 8 2019 cairo-xlib.h
-rw-r--r--. 1 root root 2436 Aug 8 2019 cairo-xlib-xrender.h

grep -rni "cairo_push_group"
cairo.h:255: * @CAIRO_STATUS_INVALID_POP_GROUP: no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0)
cairo.h:519:cairo_push_group (cairo_t *cr);
cairo.h:522:cairo_push_group_with_content (cairo_t *cr, cairo_content_t content);

```
seems to be present to me, what am I missing? I guess it would be something if the configure warning printed out what version it thought I had. not sure that would be helpful, but it would be something.

With the mis configuration, the build fails with:

```
#error "GTK+ 3 support requires wxGraphicsContext"
```

I am very comfortable using Linux and the RHeL distro, but I am at a loss as to what the issue here. Any suggestions of things I haven't tried?
cobralasers
Earned a small fee
Earned a small fee
Posts: 10
Joined: Tue Mar 01, 2022 8:53 pm

Re: WARNING: Cairo library is too old and misses cairo_push_group()

Post by cobralasers »

I eventually got this resolved, though I am not 100% positive the exact root cause. My steps that resolved this issue:

remove lib cairo
```
sudo yum remove cairo
```

^^^This removed a lot of dependencies! Among them some GTK stuff which I feel was part of the root cause. I then gathered up all the cairo rpm versions reflected on the other build server with wget and installed them:
cairo-1.15.12-3.el7.x86_64
cairo-gobject-devel-1.15.12-3.el7.x86_64
cairo-gobject-1.15.12-3.el7.x86_64
cairo-devel-1.15.12-3.el7.x86_64

Since so many GTK dependencies were removed, I compared commands
```
rpm -qa | grep gtk
```
on both systems and saw some things missing. I retrieved these gtk packages with wget and installed them:

gtk-update-icon-cache-3.22.26-4.el7_5.x86_64
gtk2-2.24.31-1.el7.x86_64
webkitgtk3-devel-2.4.11-2.el7.x86_64
webkitgtk3-2.4.11-2.el7.x86_64
gtk2-devel-2.24.31-1.el7.x86_64
gtk3-3.22.30-3.el7.x86_64
gtk3-devel-3.22.30-3.el7.x86_64

That was it, Problem solved.
Post Reply