[rrd-users] Build fails in bindings/python on CentOS and Fedora Core

Sam Umbach sumbach at gmail.com
Wed Feb 21 06:29:43 CET 2007


When trying to build the Python bindings, rrdtool-1.2.19 fails with
the following error:

make[3]: Entering directory
`/home/sumbach/src/rrdtool/rrdtool-1.2.19/bindings/python'
if gcc -DHAVE_CONFIG_H -I. -I. -I../..  -g -O2 -fno-strict-aliasing
-Wall -std=gnu99 -pedantic -Wshadow -Wpointer-arith -Wcast-align
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline
-W  -fPIC -DPIC -I../../src -I/usr/include/python2.4
-I/usr/include/libart-2.0 -I/usr/include/freetype2  -g -O2
-fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wshadow
-Wpointer-arith -Wcast-align -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Winline -W  -fPIC -DPIC -MT
rrdtoolmodule.o -MD -MP -MF ".deps/rrdtoolmodule.Tpo" -c -o
rrdtoolmodule.o rrdtoolmodule.c; \
        then mv -f ".deps/rrdtoolmodule.Tpo" ".deps/rrdtoolmodule.Po";
else rm -f ".deps/rrdtoolmodule.Tpo"; exit 1; fi
/bin/sh ../../libtool --tag=CC --mode=link gcc  -g -O2
-fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wshadow
-Wpointer-arith -Wcast-align -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Winline -W  -fPIC -DPIC   -o
rrdtoolmodule.so  rrdtoolmodule.o ../../src/librrd.la
mkdir .libs
gcc -g -O2 -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wshadow
-Wpointer-arith -Wcast-align -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Winline -W -fPIC -DPIC -o
.libs/rrdtoolmodule.so rrdtoolmodule.o  ../../src/.libs/librrd.so
-lfreetype -lpng -lz -lart_lgpl_2 -lm -Wl,--rpath
-Wl,/usr/local/rrdtool-1.2.19/lib
rrdtoolmodule.o: In function `initrrdtool':
/home/sumbach/src/rrdtool/rrdtool-1.2.19/bindings/python/rrdtoolmodule.c:525:
undefined reference to `Py_InitModule4'
/home/sumbach/src/rrdtool/rrdtool-1.2.19/bindings/python/rrdtoolmodule.c:528:
undefined reference to `PyModule_GetDict'
...
collect2: ld returned 1 exit status
make[3]: *** [rrdtoolmodule.so] Error 1

This appears to be a side effect of the recent fix for the Solaris
build.  If I set the following in bindings/python/Makefile.am it
works:
  rrdtoolmodule_so_LDFLAGS = -shared

The correct solution may be something closer to this:
          pyexec_LTLIBRARIES = quaternion.la
          quaternion_SOURCES = quaternion.c support.c support.h
          quaternion_la_LDFLAGS = -avoid-version -module
(as found at http://sourceware.org/automake/automake.html#Python).

Shared libraries are still a bit of a mystery to me, and it's possible
that I have a missing or incorrect dependency.  A list of installed
packages on my system is included below:
autoconf.noarch                          2.59-12
automake.noarch                          1.9.5-1
binutils.i386                            2.17.50.0.6-2.fc6
gcc.i386                                 4.1.1-30
libtool.i386                             1.5.22-6.1
libtool-ltdl.i386                        1.5.22-6.1
m4.i386                                  1.4.5-3
make.i386                                1:3.81-1.1
python.i386                              2.4.4-1.fc6
python-devel.i386                        2.4.4-1.fc6

RRDTool is a wonderful piece of software.  I am looking forward to
participating in this user community.

Thanks,
Sam Umbach
sumbach at gmail.com



More information about the rrd-users mailing list