Same old Python/ImageMagick problem

4 views
Skip to first unread message

norskhaus

unread,
Aug 29, 2008, 12:15:45 AM8/29/08
to imgseek_dev
Hi-

I'm trying to build isk-daemon 0.6.2 and I'm not a python expert.

I have Ubuntu 8.04, the latest. It comes with Python 2.5.2 and
ImageMagick10++. This does not work with the distributed _imgdb.so
file, which is linked against libmagic9++. I am pulling ubuntu Dapper
(6.06?), in case that is the only way to run isk-daemon right now.

I checked out net.imgseek.imgdb and did the build. I replaced the old
imgSeekLib/_imgdb.so with the newly built imgdb.so file. This is the
output. (I tried recompiling the Python files in imgSeekLib, but that
did not help.)

Thanks for your time! I'm guessing this is a compatibility problem
from ImageMagick9++ to 10++.

lance@russia:~/image/isk-daemon-0.6.2$ python isk-daemon.py
root : ERROR Warning: Unable to load the C++ extension
"imgdb.so(pyd)" module.
Traceback (most recent call last):
File "/home/lance/image/isk-daemon-0.6.2/imgSeekLib/ImageDB.py",
line 38, in <module>
import imgdb
File "/home/lance/image/isk-daemon-0.6.2/imgSeekLib/imgdb.py", line
252, in <module>
mostPopularKeywords = _imgdb.mostPopularKeywords
AttributeError: 'module' object has no attribute 'mostPopularKeywords'

Ricardo Niederberger Cabral

unread,
Aug 29, 2008, 12:25:43 AM8/29/08
to imgse...@googlegroups.com
Try an SVN checkout for isk-daemon with your custom-built imgdb.so lib.

--
Ricardo Niederberger Cabral
http://www.imgseek.net/
ricardo.cabral at imgseek.net
skype: rnc000

norskhaus

unread,
Sep 3, 2008, 2:16:25 AM9/3/08
to imgseek_dev
Hi-

Not quite sure what this means. The error I am currently getting is:

python isk-daemon.py
root : ERROR Warning: Unable to load the C++ extension
"imgdb.so(pyd)" module.
Traceback (most recent call last):
File "/home/lance/Desktop/isk/isk-daemon-0.6.2/imgSeekLib/
ImageDB.py", line 38, in ?
import imgdb
File "/home/lance/Desktop/isk/isk-daemon-0.6.2/imgSeekLib/imgdb.py",
line 7, in ?
import _imgdb
ImportError: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not
found (required by /home/lance/Desktop/isk/isk-daemon-0.6.2/imgSeekLib/
_imgdb.so)


The problem that causes this is compiling against a new set of
libraries than this linux has. I rolled back to Dapper because that is
what you mention in your notes. This post describes the problem. If
you disable stack-smashing protection by adding a flag to the rule
that compiles imgdb.so, the file should work on my dapper.

http://gbgames.com/blog/2008/04/linux-game-development-glibc_24-errors-solved/

It is unfortunate that the py-imagemagick plugin project is not
active; it would solve this for you very nicely.

This looks like a very sophisticated project, and you have done a lot
of work to document it. About 10x what other developers do :) I really
look forward to trying it out.

Thanks for your time,

Lance Norskog

On Aug 28, 9:25 pm, Ricardo Niederberger Cabral
<ricardo.cab...@imgseek.net> wrote:
> Try an SVN checkout for isk-daemon with your custom-built imgdb.so lib.
>
> --  
> Ricardo Niederberger Cabralhttp://www.imgseek.net/

Ricardo Niederberger Cabral

unread,
Sep 3, 2008, 8:00:56 AM9/3/08
to imgse...@googlegroups.com, nors...@gmail.com
Hi Lance,

If all else fails, you can always build everything yourself to
guarantee that there's no binary incompatibilities.

Try these steps. Notice that they will install stuff to /usr/local and
you may end up with two copies of imagemagick and python on your
system, one at /usr/bin and one at /usr/local/bin

wget latest python source.tar.gz
extract python source
./configure, make, make install
wget latest imagemagick source.tar.gz
extract imagemagick source
./configure, make, make install
cd /root
svn checkout https://imgseek.svn.sourceforge.net/svnroot/imgseek/trunk/net.imgseek.imgdb
imgdb
cd imgdb/src/net/imgseek/imgdb/core
edit build-python.py so that the line python_dir="/usr/include/
python" points to your new python install (/usr/local/include/python)
the build-python.py script will look for Magick++-config at your PATH
environment variable. This util tells the script where development
files for imagemagick is. Make sure that your PATH env var has /usr/
local/bin before /usr/bin so that it locates the right Magick++-config
/usr/local/bin/python build-python.py build
cd /root
svn checkout https://imgseek.svn.sourceforge.net/svnroot/imgseek/trunk/isk-daemon/
isk-daemon
cp imgdb/src/net/imgseek/imgdb/core/build/lib.linux-i686-2.5/imgdb.so
isk-daemon/src/imgSeekLib/_imgdb.so
cd isk-daemon/src
/usr/local/bin/python isk-daemon.py


--
Ricardo Niederberger Cabral


http://www.imgseek.net/
ricardo.cabral at imgseek.net
skype: rnc000

Reply all
Reply to author
Forward
0 new messages