[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Python bindings



Am Mittwoch, 1. August 2007 09:56 schrieb Michael Ströder:
> Stefan Gohmann wrote:
> > We build the heimdal module for python2.4, maybe that's a problem?
>
> This could be a problem regarding PEP 353 - preparation for Python 2.5
> (http://www.python.org/dev/peps/pep-0353/).
>
> >> But I can't import the module. Any hint? Stefan, could you please
> >> provide a Python sample code snippet how to use it?
> >
> > We use the module like this:
> >
> > import heimdal
>
> I tried to clean up my local installation but now I get:
>
> $ python -c "import heimdal"
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> ImportError: /usr/lib/python2.5/site-packages/heimdal.so: undefined
> symbol: encode_Key
>
> Still ldd /usr/lib/python2.5/site-packages/heimdal.so looks good.
>
> Any idea?

No, not really. I've again tested on a plain Debian etch with heimdal 0.72

debian:~/univention-python-heimdal# python2.4 setup.py  install
running install
running build
running build_ext
building 'heimdal' extension
creating build
creating build/temp.linux-i686-2.4
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
module.c -o build/temp.linux-i686-2.4/module.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
error.c -o build/temp.linux-i686-2.4/error.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
context.c -o build/temp.linux-i686-2.4/context.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
principal.c -o build/temp.linux-i686-2.4/principal.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
creds.c -o build/temp.linux-i686-2.4/creds.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
ticket.c -o build/temp.linux-i686-2.4/ticket.o
ticket.c:80: warning: âticket_methodsâ defined but not used
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
keytab.c -o build/temp.linux-i686-2.4/keytab.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
ccache.c -o build/temp.linux-i686-2.4/ccache.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
salt.c -o build/temp.linux-i686-2.4/salt.o
salt.c:111: warning: âsalt_methodsâ defined but not used
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
enctype.c -o build/temp.linux-i686-2.4/enctype.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
keyblock.c -o build/temp.linux-i686-2.4/keyblock.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c 
asn1.c -o build/temp.linux-i686-2.4/asn1.o
asn1.c: In function âasn1_encode_keyâ:
asn1.c:68: warning: pointer targets in passing argument 1 of 
âPyString_FromStringAndSizeâ differ in signedness
creating build/lib.linux-i686-2.4
gcc -pthread -shared build/temp.linux-i686-2.4/module.o 
build/temp.linux-i686-2.4/error.o build/temp.linux-i686-2.4/context.o 
build/temp.linux-i686-2.4/principal.o build/temp.linux-i686-2.4/creds.o 
build/temp.linux-i686-2.4/ticket.o build/temp.linux-i686-2.4/keytab.o 
build/temp.linux-i686-2.4/ccache.o build/temp.linux-i686-2.4/salt.o 
build/temp.linux-i686-2.4/enctype.o build/temp.linux-i686-2.4/keyblock.o 
build/temp.linux-i686-2.4/asn1.o -lkrb5 -lkadm5clnt -lasn1 -o 
build/lib.linux-i686-2.4/heimdal.so
running install_lib
copying 
build/lib.linux-i686-2.4/heimdal.so -> /usr/lib/python2.4/site-packages
debian:~/univention-python-heimdal# python2.4 -c "import heimdal"
debian:~/univention-python-heimdal# 

Did you build and test on the same machine?

Cheers
Stefan

-- 
Stefan Gohmann         Entwicklung              gohmann@univention.de
Univention GmbH        Linux for your Business  fon: +49 421 22 232- 0
Mary-Somerville-Str.1  28359 Bremen             fax: +49 421 22 232-99
                       http://www.univention.de