[collectd] Error building collectd with non standard python location

Mathew Thomas mathew.thomas at gmail.com
Wed May 23 18:23:51 CEST 2012


I was attempting to build collectd with a custom installation of
python because the system python is too old.

    ./configure --prefix=/opt/apps/collectd-4.10.7 \
        --disable-ethstat \
        --enable-python
--with-python=/opt/apps/collectd-Python-2.7.3/bin/python \
        CC=gcc4

The configure script failed at the check for PyObject_CallFunction
with gcc saying it couldn't find libpython2.7.a

I was able to continue by symlinking libpython to the current dir:

    ln -s /opt/apps/collectd-Python-2.7.3/lib/libpython2.7.a .

but then a subsequent make failed.

I was able to continue by symlinking libpython to the src dir:

    ln -s /opt/apps/collectd-Python-2.7.3/lib/libpython2.7.a ./src

and then passing "-lm -lpthread -lutil" as CFLAGS:

    ./configure --prefix=/opt/apps/collectd-4.10.7 --disable-ethstat \
        --enable-python
--with-python=/opt/apps/collectd-Python-2.7.3/bin/python  \
       CC=gcc4 \
       CFLAGS="-lm -lpthread -lutil"

I got the same behaviors with collectd 4.10.7 and 5.1.0

It is working now.
----------

$ lsb_release -a
LSB Version:
:core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: CentOS
Description:    CentOS release 4.9 (Final)
Release:        4.9
Codename:       Final

$ uname -a
Linux ncoreprd01.newscore.com 2.6.9-89.0.16.ELsmp #1 SMP Tue Oct 27
03:49:28 EDT 2009 i686 athlon i386 GNU/Linux



More information about the collectd mailing list