-   Slackware (
-   -   RRDtool build/cairo issues without X (

Strykar 07-02-2016 12:51 AM

RRDtool build/cairo issues without X
If I do a full install of Slackware 14.1/14.2 RRDtool installs without issue.

In the past I just installed X, however, this time I have space restrictions on the host and have skipped these sets while installing:
  • X
  • Xap
  • KDE
  • KDEi
  • XFCE
I have installed the X libraries set.

Error thrown by the configure script:

checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes

Find 3rd-Party Libraries
checking dbi/dbi.h usability... no
checking dbi/dbi.h presence... no
checking for dbi/dbi.h... no
checking rados/librados.h usability... no
checking rados/librados.h presence... no
checking for rados/librados.h... no
checking tcpd.h usability... yes
checking tcpd.h presence... yes
checking for tcpd.h... yes
checking for hosts_access... no
checking for hosts_access in -lwrap... no
checking for glib_check_version in -lglib-2.0... yes
checking glib.h usability... no
checking glib.h presence... no
checking for glib.h... no
checking for pkg-config... pkg-config
checking for glib_check_version in -lglib-2.0... yes
checking glib.h usability... yes
checking glib.h presence... yes
checking for glib.h... yes
checking for g_regex_new... yes
checking for png_access_version_number in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for pango_cairo_context_set_font_options in -lpangocairo-1.0... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its

configure: WARNING:
* I could not find a working copy of pangocairo. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libpangocairo-1.0 and its header files. If
you have not installed pangocairo, you can get it either from its original home on

You can find also find an archive copy on

The last tested version of pangocairo is 1.28.4.

LIBS=-lpng -lm -lglib-2.0
CPPFLAGS= -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include


checking for pango_font_map_create_context... no
checking for xmlParseFile in -lxml2... yes
checking libxml/parser.h usability... no
checking libxml/parser.h presence... no
checking for libxml/parser.h... no
checking for pkg-config... (cached) pkg-config
checking for xmlParseFile in -lxml2... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
configure: error: Please fix the library issues listed above and try again.
This is misleading as the file exists:

# find . / -name pangocairo.pc
This error is common and Googling for solutions bring up other distros requiring packages like cairo-devel.
Under docs/rrdbuild.txt the author cites issues with cairo.pc incorrectly requiring xrender and proposes a fix for OpenSolaris, which has applied to Slackware in the past.

OpenSolaris 2008.05
Just add a compiler and the gnome development package:

pkg install sunstudioexpress
pkg install SUNWgnome-common-devel

There is a problem with cairo.pc on OpenSolaris. It suggests that
xrender is required for compilation with cairo. This is not true and
also bad since OpenSolaris does not include an xrender.pc file. Use
Perl to fix this:

perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc
I've tried this and it does not fix the issue.

root@slack14:/home/strykar/SBo/rrdtool/rrdtool-1.6.0/doc# grep xrender /usr/lib64/pkgconfig/cairo.pc
root@slack14:/home/strykar/SBo/rrdtool/rrdtool-1.6.0/doc# grep xrender /usr/lib64/pkgconfig/cairo.pc.orig
Requires.private: gobject-2.0 glib-2.0 >= 2.14 pixman-1 >= 0.30.0 fontconfig >= 2.2.95 freetype2 >= 9.7.3 egl gl libpng xcb-shm xcb >= 1.6 xcb-render >= 1.6 xrender >= 0.6 x11 xext

Here's the relevant snippet from configure's config.log:
It's huge and the entire config.log is at

configure:20450: $? = 0
configure:20459: result: yes
configure:20463: checking png.h usability
configure:20463: gcc -c -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W -
configure:20463: $? = 0
configure:20463: result: yes
configure:20463: checking png.h presence
configure:20463: gcc -E -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include conftest.c
configure:20463: $? = 0
configure:20463: result: yes
configure:20463: checking for png.h
configure:20463: result: yes
configure:20659: checking for pango_cairo_context_set_font_options in -lpangocairo-1.0
configure:20684: gcc -o conftest -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definit
conftest.c: In function 'main':
conftest.c:136:1: warning: old-style function definition [-Wold-style-definition]
main ()
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: warning:, needed by /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/, not found (try using -rpath o
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: warning:, needed by /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/, not found (try using -rpath or -rp
/usr/lib64/../lib64/ undefined reference to `xcb_render_create_picture'
/usr/lib64/../lib64/ undefined reference to `xcb_render_composite_glyphs_32'
/usr/lib64/../lib64/ undefined reference to `xcb_render_pictscreen_next'
/usr/lib64/../lib64/ undefined reference to `pixman_image_composite32'
/usr/lib64/../lib64/ undefined reference to `XQueryColors'
/usr/lib64/../lib64/ undefined reference to `XRenderFindVisualFormat'
/usr/lib64/../lib64/ undefined reference to `pixman_region32_equal'
/usr/lib64/../lib64/ undefined reference to `xcb_render_free_picture'
/usr/lib64/../lib64/ undefined reference to `FcPatternDestroy'
/usr/lib64/../lib64/ undefined reference to `eglChooseConfig'
/usr/lib64/../lib64/ undefined reference to `xcb_depth_next'
collect2: error: ld returned 1 exit status
configure:20684: $? = 1
configure: failed program was:
| /* confdefs.h */
I also tried installing these packages:
  1. fontconfig-2.11.1-i486-2.txz
  2. libXdmcp-1.1.2-i586-2.txz
  3. libXxf86vm-1.1.4-i586-2.txz
  4. libXdamage-1.1.4-i586-2.txz
  5. libXrender-0.9.9-i586-1.txz
  6. libXau-1.0.8-i586-2.txz
  7. libXfixes-5.0.2-i586-1.txz
  8. libxcb-1.11.1-i586-1.txz
  9. libX11-1.6.3-i586-2.txz
  10. libXext-1.3.3-i586-2.txz
  11. libdrm-2.4.68-i586-1.txz
  12. xcb-util-cursor-0.1.2-i586-2.txz
  13. xcb-util-renderutil-0.3.9-i586-2.txz
  14. xcb-util-errors-1.0-i586-1.txz
  15. xcb-util-wm-0.4.1-i586-2.txz
  16. xcb-proto-1.11-i586-2.txz
  17. xcb-util-image-0.4.0-i586-2.txz
  18. xcb-util-0.4.0-i586-2.txz
  19. xcb-util-keysyms-0.4.0-i586-2.txz
  20. pixman-0.34.0-i586-1.txz.1
  21. mesa-11.2.2-i586-1.txz

If cairo doesn't depend on xrender, I assume it's a package that's installed with X/Xap that rrdtool and pango work with.
I'm lost at this point and don't have the option to install X on the host.

Didier Spaier 07-04-2016 02:32 AM

2 Attachment(s)

I did this:
  • Build and install rrdtools with slapt-src on 14.2
  • Run "depfinder -fs rrdtool-1.4.9-x86_64-1_SBo.tgz"
Please find attached:
  • slack-required.txt (output of the depfinder command)
  • rrdtool-1.4.9-x86_64-1_SBo.txt (file /var/log/packages/rrdtool-1.4.9-x86_64-1_SBo after installation)
You could use the Slackware Package Browser in "Content" mode to see what you miss.

Be aware that depfinder does not look for Perl dependencies, that I didn't attempt to find Python dependencies and that, more generally, there is no guarantee of accuracy. I hope this helps, though

Olek 11-01-2016 11:16 AM

I have this problem too.

From config.log:


configure:20203: $? = 0
configure:20212: result: yes
configure:20216: checking pango/pango.h usability
configure:20216: gcc -c -O2 -march=amdfam10 -mtune=amdfam10 -fPIC -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmiss
ing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W  -fPIC -DPIC  -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include conftest.c >&5
conftest.c:159:25: fatal error: pango/pango.h: No such file or directory
compilation terminated.

But pango.h exist:


# ls -l /usr/include/pango-1.0/pango/pango.h
-rw-r--r-- 1 root root 1598 paź 28  2015 /usr/include/pango-1.0/pango/pango.h

montagdude 11-01-2016 11:50 AM


Originally Posted by Olek (Post 5625702)
I have this problem too.

Does that error stop the configure script? Sometimes "fatal errors" during the configuration steps are not really so fatal. Anyway, it looks like gcc knows to look in /usr/include but not /usr/include/pango-1.0. You could edit the CFLAGS= line in the script (before the ./configure line) to look like this:


CFLAGS="$SLKCFLAGS -I/usr/include/pango-1.0" \
This should get you past that step in the configure script, but if you are having the same problem as the OP, I don't think it will solve that.

Olek 11-01-2016 12:43 PM

Thanks. It helped, but only for configure stage.
Now, its like compilator cannot find cairo.h :confused:


Making all in po
make[1]: Entering directory '/tmp/SBo/rrdtool-1.6.0/po'
make[1]: Leaving directory '/tmp/SBo/rrdtool-1.6.0/po'
Making all in src
make[1]: Entering directory '/tmp/SBo/rrdtool-1.6.0/src'
make  all-am
make[2]: Entering directory '/tmp/SBo/rrdtool-1.6.0/src'
  CC      librrd_la-rrd_version.lo
  CC      librrd_la-rrd_last.lo
  CC      librrd_la-rrd_lastupdate.lo
  CC      librrd_la-rrd_first.lo
  CC      librrd_la-rrd_dump.lo
  CC      librrd_la-rrd_flushcached.lo
  CC      librrd_la-rrd_fetch.lo
  CC      librrd_la-rrd_fetch_cb.lo
  CC      librrd_la-rrd_resize.lo
  CC      librrd_la-rrd_tune.lo
  CC      librrd_la-rrd_graph.lo
In file included from rrd_graph.c:53:0:
rrd_graph.h:12:19: fatal error: cairo.h: No such file or directory
compilation terminated.
Makefile:865: recipe for target 'librrd_la-rrd_graph.lo' failed
make[2]: *** [librrd_la-rrd_graph.lo] Error 1
make[2]: Leaving directory '/tmp/SBo/rrdtool-1.6.0/src'
Makefile:552: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/tmp/SBo/rrdtool-1.6.0/src'
Makefile:557: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Strykar 11-03-2016 11:34 AM

It appears it needs these packages to be installed first:

aaa_elflibs >= 14.2-x86_64-23|bzip2 >= 1.0.6-x86_64-1
aaa_elflibs >= 14.2-x86_64-23|expat >= 2.1.0-x86_64-1
aaa_elflibs >= 14.2-x86_64-23|glib2 >= 2.46.2-x86_64-2
aaa_elflibs >= 14.2-x86_64-23|gmp >= 6.1.1-x86_64-1
aaa_elflibs >= 14.2-x86_64-23|libpng >= 1.6.23-x86_64-1
aaa_elflibs >= 14.2-x86_64-23|xz >= 5.2.2-x86_64-1
aaa_elflibs >= 14.2-x86_64-23|zlib >= 1.2.8-x86_64-1
cairo >= 1.14.6-x86_64-2
fontconfig >= 2.11.1-x86_64-1ds
freetype >= 2.6.3-x86_64-1
harfbuzz >= 1.2.7-x86_64-1
libX11 >= 1.6.3-x86_64-2
libXau >= 1.0.8-x86_64-2
libXdamage >= 1.1.4-x86_64-2
libXdmcp >= 1.1.2-x86_64-2
libXext >= 1.3.3-x86_64-2
libXfixes >= 5.0.2-x86_64-1
libXrender >= 0.9.9-x86_64-1
libXxf86vm >= 1.1.4-x86_64-2
libdrm >= 2.4.68-x86_64-1
libffi >= 3.2.1-x86_64-1
libxcb >= 1.11.1-x86_64-1
libxml2 >= 2.9.4-x86_64-2
libxshmfence >= 1.2-x86_64-2
mesa >= 11.2.2-x86_64-1
pango >= 1.38.1-x86_64-1
pixman >= 0.34.0-x86_64-1
python >= 2.7.11-x86_64-2
ruby >= 2.2.5-x86_64-1
I have not tried to fix this, try Didier Spaier's suggestions.
There may be some other Perl dependencies as he said.

Olek 11-04-2016 02:57 PM


Originally Posted by Strykar (Post 5626529)
It appears it needs these packages to be installed first:

I have not tried to fix this, try Didier Spaier's suggestions.
There may be some other Perl dependencies as he said.

I have all this packages installed on my system.
There are not so many Perl Slackware packages:

# grep perl /var/lib/slackpkg/pkglist
slackware64 perl 5.22.2 x86_64 1 perl-5.22.2-x86_64-1 ./slackware64/d txz
slackware64 perlkde 4.14.3 x86_64 2 perlkde-4.14.3-x86_64-2 ./slackware64/kde txz
slackware64 perlqt 4.14.3 x86_64 2 perlqt-4.14.3-x86_64-2 ./slackware64/kde txz

But I have Perl package installed. Packages in kde directory shouldn't be necessary.
Maybe if I want to make rrdtool package, I should install all Slackware packages? Great.

Olek 11-05-2016 03:17 PM

Problem solved.

#slackpkg install x
and install every listed packages I was build RRdtool package without errors.

rutrow 11-07-2016 12:10 PM

Ugh... I just can't justify installing X and associated libs just for rrdtool on my Linode. For this reason, I still run v1.0.50. Still gets the job done and has a tiny footprint.

Strykar 06-20-2017 04:15 AM

Just tried this again on a Linode VM and it still fails.

slackpkg install x
does get the compile to work, bit of a pain on VMs with low storage where X is never going to be used. Thanks for all the inputs.

ozanbaba 06-27-2017 08:15 AM

Hello Strykar,

It is possible that you are missing something for pangocairo. I remember something similar happening to me long time ago and I learned a trick. ldd /usr/lib/libpango.... (I don't really remember the library name.). Configure tests libraries and features by trying to use them. For example, when it is checking for pango_cairo_context_set_font_options in -lpangocairo-1.0, it tries to compile a small test program which uses that feature. If you are missing a library which pango depends, this will fail.


Pierre_ 07-07-2018 02:32 PM

RRDtool build - cairo - pango - pangocairo err.

I think rrdtool use pkgconfig with pangocairo to get libraries paths.
Just use the command below and install the packages required ( dependencies ) if the command fail:

pkg-config --cflags pangocairo


kopster 08-06-2018 12:42 AM

Tobias Oetiker did indeed use pkg-config, but that's a red herring.

When you're compiling dependencies, the order of compilation is important.
You must configure/compile/install Cairo BEFORE you configure/compile/install Pango.

The Pango configure adds the pangocairo portion to the configuration iff it detects the cairo lib.

Happy bit slinging!

bstern 09-11-2019 06:00 PM


Originally Posted by Pierre_ (Post 5876715)
I think rrdtool use pkgconfig with pangocairo to get libraries paths.
Just use the command below and install the packages required ( dependencies ) if the command fail:

pkg-config --cflags pangocairo

That is 100% correct. In my case, in addition to all the stuff listed above by Strykar, it also needed a bunch of junk revealed by pkg-config. The complete list of stuff I needed on a system not previously having X was:


All times are GMT -5. The time now is 07:27 PM.