From: <gee...@aa...> - 2006-12-17 11:02:40
|
Hi, The following script works fine when I call it from the python interpreter but not when I call it from a c application (embedded python) It crashes than in the PyImport_Import() import ldap import distutils.sysconfig def TestInit(): l = ldap.open("192.168.1.2") l.simple_bind_s("","") l.search_s("c=BE", ldap.SCOPE_SUBTREE, "objectclass=*") s = distutils.sysconfig.get_config_var('LINKFORSHARED') -> Python and python-ldap are recompiled for my environment (python generates the static library....) Hope someone can give me a hint? thanks, Geert ----- Forwarded by Geert Van Muylem/Utimaco/BE on 12/17/2006 11:56 AM ----- Geert Van Muylem/Utimaco/BE 12/17/2006 12:53 AM To pyt...@li... cc Subject crash in PyImport_Import Hi All, I'm trying to run an application (on a hardened linux) which is using embedded python. The called python script is using the python-ldap module... This application now crashes when calling the PyImport_Import()... If I use however a script which does not import the ldap module, everything works fine: no crash in this api! Calling the script with the interpreter works also fine (I can do search on an ldap server with python...) Anyone any idea what could be wrong.? Thanks in advance, Geert |
From: <mi...@st...> - 2006-12-17 18:54:55
|
gee...@aa... wrote: > > The following script works fine when I call it from the python interpreter > but not when I call it from a c application (embedded python) > It crashes than in the PyImport_Import() Could you please report which versions of Python and python-ldap you are using? Note that 2.2.0 crashed with Python 2.5. Ciao, Michael. |
From: <gee...@aa...> - 2006-12-18 05:48:21
|
Hi Michael, I've been using the following versions of python and python-ldap python: 2.5 python-ldap 2.2.1 Thanks!!!! Regards, Geert Michael Str=F6der <mi...@st...>=20 12/17/2006 07:54 PM To gee...@aa... cc pyt...@li... Subject Re: Fw: crash in PyImport=5FImport (Plain) gee...@aa... wrote: > > The following script works fine when I call it from the python=20 interpreter > but not when I call it from a c application (embedded python) > It crashes than in the PyImport=5FImport() Could you please report which versions of Python and python-ldap you are using? Note that 2.2.0 crashed with Python 2.5. Ciao, Michael. |
From: <mi...@st...> - 2006-12-18 09:19:02
|
gee...@aa... wrote: > > I've been using the following versions of python and python-ldap > > python: 2.5 > python-ldap 2.2.1 And now it works? (see SF#1575329) Ciao, Michael. |
From: <gee...@aa...> - 2006-12-18 09:55:26
|
Hi, Unfortunately, it doesn't work with these releases... The crash happens when importing the python script (and no function is called...) Are there any ldapobject created and deleted at that time? (No bind is done before the crash...) Regards, Geert Michael Str=F6der <mi...@st...>=20 Sent by: pyt...@li... 12/18/2006 10:18 AM To gee...@aa... cc pyt...@li... Subject Re: Fw: crash in PyImport=5FImport (Plain) (Unsigned Mail) gee...@aa... wrote: > > I've been using the following versions of python and python-ldap > > python: 2.5 > python-ldap 2.2.1 And now it works? (see SF#1575329) Ciao, Michael. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share=20 your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE= VDEV =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Python-LDAP-dev mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-ldap-dev |
From: <mi...@st...> - 2006-12-18 10:40:55
|
gee...@aa... wrote: > > -> Python and python-ldap are recompiled for my environment > (python generates the static library....) Did you tweak the file setup.cfg? Can you please elaborate on how static linking is to be done? How is the embedded Python built? Ciao, Michael. |
From: <gee...@aa...> - 2006-12-18 11:02:03
|
Hi, Here is part of my makefile: VERSION =3D Python-2.5 VERSION=5FLDAP =3D python-ldap-2.2.1 compile: .python .python-ldap python: makefile.python .glibc $(VERSION).Setup.local $(EXTRACT=5FPACKAGE) && \ $(CP) ../$(VERSION).Setup.local=20 Modules/Setup.local && \ ./configure --prefix=3D/usr --enable-shared=3Dno &&= \ make && \ make install=20 cp $(VERSION)/libpython2.5.a /usr/lib/libpython.a (cd /usr/include; $(LN) -sf python2.5 python ) touch .python=20 .python-ldap: makefile.python .python .sasl .glibc .openldap=20 python-ldap.setup.cfg (rm -rf $(VERSION=5FLDAP) || /bin/true) && \ tar xjf $(ARCHIVE=5FPACKAGES)/$(VERSION=5FLDAP).tar.bz2 && \ cd $(VERSION=5FLDAP) && \ $(CP) ../python-ldap.setup.cfg setup.cfg && \ python setup.py build && \ python setup.py install rm -rf $(VERSION=5FLDAP) touch .python-ldap And my setup.cfg # Example for setup.cfg # You have to edit this file to reflect your system configuation # $Id: setup.cfg.suse-linux,v 1.1 2003/08/20 10:04:34 stroeder Exp $ [=5Fldap] # Section for compiling the C extension module # for wrapping OpenLDAP 2 libs library=5Fdirs =3D /usr/lib/ /usr/lib/sasl2/ include=5Fdirs =3D /usr/include/sasl/ /usr/include/sasl2/ extra=5Fcompile=5Fargs =3D extra=5Fobjects =3D # Example for full-featured SuSE build: # Support for StartTLS/LDAPS, SASL bind and reentrant libldap=5Fr. # This needs recent OpenLDAP 2.0.26+ or 2.1.3+ built with #./configure --with-cyrus-sasl --with-tls libs =3D python ldap=5Fr lber sasl2 ssl crypto resolv dl db m util pthread [install] # Installation options compile =3D 1 optimize =3D 1 Everything is done in a chroot-ed environment...when building python-ldap, = it uses the newly installed python includes.... The test application is linked against the static version libpython.a Thanks, Geert Michael Str=F6der <mi...@st...>=20 Sent by: pyt...@li... 12/18/2006 11:40 AM To gee...@aa... cc pyt...@li... Subject Re: Fw: crash in PyImport=5FImport (Unsigned Mail) gee...@aa... wrote: > > -> Python and python-ldap are recompiled for my environment > (python generates the static library....) Did you tweak the file setup.cfg? Can you please elaborate on how static linking is to be done? How is the embedded Python built? Ciao, Michael. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share=20 your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE= VDEV =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Python-LDAP-dev mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-ldap-dev |