Python C API version mismatch

Bug #114930 reported by Andrew Straw
26
Affects Status Importance Assigned to Milestone
clearsilver (Ubuntu)
Fix Released
Undecided
Unassigned
trac (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: python-clearsilver

If I install python-clearsilver and run:

python -c 'import neo_cgi'

I get the following:

-c:1: RuntimeWarning: Python C API version mismatch for module neo_util: This Python has API version 1013, module neo_util has version 1012.
-c:1: RuntimeWarning: Python C API version mismatch for module neo_cs: This Python has API version 1013, module neo_cs has version 1012.
-c:1: RuntimeWarning: Python C API version mismatch for module neo_cgi: This Python has API version 1013, module neo_cgi has version 1012.

Revision history for this message
Anthony Durity (anthony-durity) wrote :

I get the same.

I installed Trac which installed python-clearsilver. The offending shared lib is neo_cgi.so
You can see from locate neo_cgi.so that it is located
/usr/lib/python2.4/site-packages/neo_cgi.so
/usr/lib/python2.5/site-packages/neo_cgi.so
(or you could check in the properties of the package python-clearsilver in Synaptic or whichever)

A fix is to download the latest clearsilver sources from http://www.clearsilver.net/downloads/clearsilver-0.10.4.tar.gz

tar zxvf it, yadda yadda yadda and then configure it using ./configure --disable-wdb --disable-compression --disable-perl --with-python=$(which python)

(I disable wdb because I don't know what it is and I disable compression because it complains about not finding libz even though it is there - grrr -
dpkg-query -S /usr/lib/libz.so.1 gives zlib1g: /usr/lib/libz.so.1 and I disable perl because perl scares me)

then make and now there is a python directory, go into it and cp -i neo_cgi.so /usr/lib/python2.5/site-packages/neo_cgi.so to overwrite the 2.5 version which in Gutsy development is the latest python (I suppose you could build a 2.4 version because python2.4 -c 'import neo_cgi' gives the same errors as reported above but as trac uses 2.5 so meh...

I would attach the .so but it's 1/2 a meg :)
-rw-r--r-- 1 root root 496350 2007-06-09 15:25 /usr/lib/python2.5/site-packages/neo_cgi.so

Changed in clearsilver:
status: New → Confirmed
Revision history for this message
Victor Stinner (vstinner) wrote :

I get the same error and it does fill my error.log (near 6 lines per second). It would be great to fix it :-)

Revision history for this message
Samuel Huckins (wormwood-3) wrote :

Having the same issue, and my logs are definitely being flooded by this.

I downloaded clearsilver-0.10.5, unpacked it, tried to configure and got:
/tmp/clearsilver-0.10.5$ sudo ./configure --disable-wdb --disable-compression --disable-perl --with-python=$(which python)
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

Log is attached. Did not see anything useful, except "configure: exit 77".

Any one know what is causing this?

Revision history for this message
Jens Grassel (jan0sch) wrote :

I can confirm this bug using trac on Ubuntu 8.04 (Hardy Heron).
My logs are flooded like this:

/var/lib/python-support/python2.5/trac/web/clearsilver.py:128: RuntimeWarning: Python C API version mismatch for module neo_util: This Python has API version 1013, module neo_util has version 1012.
  import neo_cgi
/var/lib/python-support/python2.5/trac/web/clearsilver.py:128: RuntimeWarning: Python C API version mismatch for module neo_cs: This Python has API version 1013, module neo_cs has version 1012.
  import neo_cgi
/var/lib/python-support/python2.5/trac/web/clearsilver.py:128: RuntimeWarning: Python C API version mismatch for module neo_cgi: This Python has API version 1013, module neo_cgi has version 1012.
  import neo_cgi

Searching the internet I came accross a solution that recommends installing the dev package for libneon but that did not work for me.

Revision history for this message
Josh Green (josh-resonance) wrote :

I was also having this problem, but I fixed it by adding '--with-python=/usr/bin/python' to the configure flags. Seems both Python 2.4 and 2.5 are installed and it was getting built against 2.4.

Here is what I did to build a deb package (if anyone is interested):
apt-get source python-clearsilver
apt-get build-dep python-clearsilver
cd clearsilver-0.10.4
nano -w debian/rules # Add '--with-python=/usr/bin/python \' to the DEB_CONFIGURE_EXTRA_FLAGS, save and exit
dpkg-buildpackage -rfakeroot -uc -b
cd ..
sudo dpkg -i python-clearsilver_0.10.4-1ubuntu1_i386.deb

Revision history for this message
Tim Hatch (timhatch) wrote :

Not Trac's bug

Changed in trac:
status: New → Invalid
Revision history for this message
James Westby (james-w) wrote :

Hi,

This is fixed in Intrepid. It should be fixed by the same fix
as bug 86685, so if that is accepted for Hardy this should
be fixed in Hardy.

Thanks,

James

Changed in clearsilver:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.