Compile error on RHEL 5.3 (x86_64), python-ldap-2.3.10

2009-11-04 Thread Zhang Huangbin
Hi, list.

I got below compile error on Red Hat Enterprise Linux 5.3 (x86_64)  
with python-ldap-2.3.10, but 2.3.8 was compiled and installed success.
What's wrong with it?


# easy_install python-ldap==2.3.10
Searching for python-ldap==2.3.10
Reading http://cheeseshop.python.org/pypi/python-ldap/
Reading http://cheeseshop.python.org/pypi/python-ldap/2.3.8
Reading http://www.python-ldap.org/
Reading http://cheeseshop.python.org/pypi/python-ldap/2.3.10
Best match: python-ldap 2.3.10
Downloading 
http://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.3.10.tar.gz#md5=564d741a7c6d5fdcb45322fe9262d1a5
Processing python-ldap-2.3.10.tar.gz
Running python-ldap-2.3.10/setup.py -q bdist_egg --dist-dir /tmp/ 
easy_install-H9lpqP/python-ldap-2.3.10/egg-dist-tmp-qxCHzX
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
libs: ldap_r lber sasl2 ssl crypto
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
Modules/constants.c: In function ‘LDAPinit_constants’:
Modules/constants.c:184: error: ‘LDAP_OPT_X_TLS_NEWCTX’ undeclared  
(first use in this function)
Modules/constants.c:184: error: (Each undeclared identifier is  
reported only once
Modules/constants.c:184: error: for each function it appears in.)
error: Setup script exited with error: command 'gcc' failed with exit  
status 1

-- 
Best Regards.

Zhang Huangbin

- Open Source Mail Server Solution for Red Hat(R) Enterprise Linux,
   CentOS, Debian, Ubuntu: http://www.iredmail.org/


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: Compile error on RHEL 5.3 (x86_64), python-ldap-2.3.10

2009-11-04 Thread Michael Ströder
Zhang Huangbin wrote:
> 
> I got below compile error on Red Hat Enterprise Linux 5.3 (x86_64)  
> with python-ldap-2.3.10, but 2.3.8 was compiled and installed success.
> What's wrong with it?
> 
> Modules/constants.c:184: error: ‘LDAP_OPT_X_TLS_NEWCTX’ undeclared  

Well, I asked for testing long *before* releasing 2.3.10...
This is because of older OpenLDAP libs. Try the patch below. It's also in HEAD
now.

Ciao, Michael.

Index: Modules/constants.c
===
RCS file: /cvsroot/python-ldap/python-ldap/Modules/constants.c,v
retrieving revision 1.43
diff -u -r1.43 constants.c
--- Modules/constants.c 23 Oct 2009 09:09:37 -  1.43
+++ Modules/constants.c 4 Nov 2009 15:48:04 -
@@ -162,7 +162,9 @@
add_int(d,OPT_URI);
 #ifdef HAVE_TLS
add_int(d,OPT_X_TLS);
+#ifdef LDAP_OPT_X_TLS_NEWCTX
add_int(d,OPT_X_TLS_CTX);
+#endif
add_int(d,OPT_X_TLS_CACERTFILE);
add_int(d,OPT_X_TLS_CACERTDIR);
add_int(d,OPT_X_TLS_CERTFILE);
Index: Modules/options.c
===
RCS file: /cvsroot/python-ldap/python-ldap/Modules/options.c,v
retrieving revision 1.33
diff -u -r1.33 options.c
--- Modules/options.c   23 Oct 2009 09:09:37 -  1.33
+++ Modules/options.c   4 Nov 2009 15:48:04 -
@@ -79,7 +79,9 @@
 #ifdef HAVE_TLS
 case LDAP_OPT_X_TLS:
 case LDAP_OPT_X_TLS_REQUIRE_CERT:
+#ifdef LDAP_OPT_X_TLS_NEWCTX
 case LDAP_OPT_X_TLS_NEWCTX:
+#endif
 #ifdef OPT_X_TLS_PROTOCOL_MIN
 case LDAP_OPT_X_TLS_PROTOCOL_MIN:
 #endif


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


RE: Compile error on RHEL 5.3 (x86_64), python-ldap-2.3.10

2009-11-11 Thread Rob Orsini
Hi, I'm also having trouble getting 2.3.10 to compile on RHEL 5. I tried
applying the patches supplied in this thread (I just joined this email list,
btw):


http://sourceforge.net/mailarchive/forum.php?thread_name=4AF1B687.9040501%40stroeder.com&forum_name=python-ldap-dev

but that didn't work.

I noticed that some work related to this has been going on in the trunk:


http://python-ldap.cvs.sourceforge.net/viewvc/python-ldap/python-ldap/CHANGES?revision=1.217&view=markup

I downloaded that version and tried to build it. It failed, with:

$ python ./setup.py build
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
libs: ldap_r lber sasl2 ssl crypto
running build
running build_py
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
running egg_info
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing Lib/python_ldap.egg-info/PKG-INFO
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
running build_ext
building '_ldap' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
-DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.10
-IModules -I/usr/local/openldap-2.3/include -I/usr/include/sasl
-I/usr/include/python2.4 -c Modules/LDAPObject.c -o
build/temp.linux-x86_64-2.4/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:4:
Modules/common.h:10:20: error: Python.h: No such file or directory
In file included from Modules/LDAPObject.c:4:
Modules/common.h:35: error: expected ‘)’ before ‘*’ token
Modules/LDAPObject.c:5:24: error: patchlevel.h: No such file or directory
In file included from Modules/LDAPObject.c:9:
Modules/errors.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
Modules/errors.h:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
Modules/errors.h:13: error: expected ‘)’ before ‘*’ token
Modules/errors.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
In file included from Modules/LDAPObject.c:10:
Modules/constants.h:8: error: expected ‘)’ before ‘*’ token
Modules/constants.h:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
In file included from Modules/LDAPObject.c:11:
Modules/LDAPObject.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.h:22: error: expected specifier-qualifier-list before
‘PyObject_HEAD’
Modules/LDAPObject.h:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘LDAP_Type’
In file included from Modules/LDAPObject.c:12:
Modules/ldapcontrol.h:10: error: expected ‘)’ before ‘*’ token
Modules/ldapcontrol.h:12: error: expected ‘)’ before ‘*’ token
Modules/ldapcontrol.h:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
In file included from Modules/LDAPObject.c:13:
Modules/message.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
In file included from Modules/LDAPObject.c:14:
Modules/berval.h:10: error: expected ‘)’ before ‘*’ token
Modules/berval.h:11: error: expected ‘)’ before ‘*’ token
Modules/berval.h:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
In file included from Modules/LDAPObject.c:15:
Modules/options.h:5: error: expected declaration specifiers or ‘...’ before
‘PyObject’
Modules/options.h:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
Modules/LDAPObject.c: In function ‘newLDAPObject’:
Modules/LDAPObject.c:28: warning: implicit declaration of function
‘PyObject_NEW’
Modules/LDAPObject.c:28: error: expected expression before ‘LDAPObject’
Modules/LDAPObject.c:28: warning: cast to pointer from integer of different
size
Modules/LDAPObject.c:31: error: ‘LDAPObject’ has no member named ‘ldap’
Modules/LDAPObject.c:32: error: ‘LDAPObject’ has no member named ‘_save’
Modules/LDAPObject.c:33: error: ‘LDAPObject’ has no member named ‘valid’
Modules/LDAPObject.c: In function ‘dealloc’:
Modules/LDAPObject.c:42: error: ‘LDAPObject’ has no member named ‘ldap’
Modules/LDAPObject.c:43: error: ‘LDAPObject’ has no member named ‘valid’
Modules/LDAPObject.c:44: error: ‘LDAPObject’ has no member named ‘_save’
Modules/LDAPObject.c:44: warning: implicit declaration of function
‘Py_FatalError’
Modules/LDAPObject.c:

Re: Compile error on RHEL 5.3 (x86_64), python-ldap-2.3.10

2009-11-12 Thread Michael Ströder
Rob Orsini wrote:
> Hi, I'm also having trouble getting 2.3.10 to compile on RHEL 5. I tried
> applying the patches supplied in this thread (I just joined this email
> list, btw):
> 
> In file included from Modules/LDAPObject.c:4:
> Modules/common.h:10:20: error: Python.h: No such file or directory

Please make sure you have all the necessary headers available on your system
for building Python extension modules and all the libs needed by python-ldap.
I don't know the package names on RHEL though.

Ciao, Michael.



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: Compile error on RHEL 5.3 (x86_64), python-ldap-2.3.10

2009-11-12 Thread Zhang Huangbin

On Nov 5, 2009, at 1:14 AM, Michael Ströder wrote:

> This is because of older OpenLDAP libs. Try the patch below. It's also in HEAD
> now.

I'm so sorry that i forgot this thread :(

I tested patch moment ago, failed to build, same as in HEAD (checked out moment 
ago):


# python setup.py clean
extra_compile_args: 
extra_objects: 
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
libs: ldap_r lber sasl2 ssl crypto
running clean
[r...@r6 python-ldap]# python setup.py install
extra_compile_args: 
extra_objects: 
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
libs: ldap_r lber sasl2 ssl crypto
running install
running bdist_egg
running egg_info
creating Lib/python_ldap.egg-info
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing Lib/python_ldap.egg-info/PKG-INFO
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
creating build
creating build/lib.linux-x86_64-2.4
copying Lib/ldapurl.py -> build/lib.linux-x86_64-2.4
copying Lib/ldif.py -> build/lib.linux-x86_64-2.4
copying Lib/dsml.py -> build/lib.linux-x86_64-2.4
creating build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/controls.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-2.4/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-2.4/ldap
creating build/lib.linux-x86_64-2.4/ldap/schema
copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.4/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.4/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.4/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.4/ldap/schema
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-2.4
creating build/temp.linux-x86_64-2.4/Modules
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC 
-DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.10 -IModules 
-I/usr/local/openldap-2.3/include -I/usr/include/sasl -I/usr/include/python2.4 
-c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.4/Modules/LDAPObject.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC 
-DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.10 -IModules 
-I/usr/local/openldap-2.3/include -I/usr/include/sasl -I/usr/include/python2.4 
-c Modules/ldapcontrol.c -o build/temp.linux-x86_64-2.4/Modules/ldapcontrol.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC 
-DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.10 -IModules 
-I/usr/local/openldap-2.3/include -I/usr/include/sasl -I/usr/include/python2.4 
-c Modules/common.c -o build/temp.linux-x86_64-2.4/Modules/common.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC 
-DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.10 -IModules 
-I/usr/local/openldap-2.3/include -I/usr/include/sasl -I/usr/include/python2.4 
-c Modules/constants.c -o build/temp.linux-x86_64-2.4/Modules/constants.o
Modules/constants.c: In function ‘LDAPinit_constants’:
Modules/constants.c:186: error: ‘LDAP_OPT_X_TLS_NEWCTX’ undeclared (first use 
in this function)
Modules/constants.

Re: Compile error on RHEL 5.3 (x86_64), python-ldap-2.3.10

2009-11-13 Thread Michael Ströder
Zhang Huangbin wrote:
> On Nov 5, 2009, at 1:14 AM, Michael Ströder wrote:
> 
>> This is because of older OpenLDAP libs. Try the patch below. It's also in 
>> HEAD
>> now.
> 
> I tested patch moment ago, failed to build, same as in HEAD (checked out 
> moment ago):

Sorry, please try again from HEAD. I fixed also another typo.

Ciao, Michael.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: Compile error on RHEL 5.3 (x86_64), python-ldap-2.3.10

2009-11-13 Thread Zhang Huangbin

On Nov 13, 2009, at 4:47 PM, Michael Ströder wrote:
> 
> Sorry, please try again from HEAD. I fixed also another typo.

It (HEAD) works now. :)

-- 
Best Regards.

Zhang Huangbin

- Open Source Mail Server Solution for Red Hat(R) Enterprise Linux,
  CentOS, Debian, Ubuntu: http://www.iredmail.org/


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev