[EMAIL PROTECTED] a écrit :
>
> J'ai installé:
>
> - Debian Sarge
> - Python 2.4.3
> - zope 2.9.4 et CPS 3.4.0-1
>
> je souhaite installer python-ldap-2.2.0 pour pouvoir utiliser CPSLDAP
>

Effectivement c'est un besoin classique, on a une distribution Debian
stable mais on a besoin de python2.4 pour CPS 3.4.x mais la Debian Sarge
ne dispose pas de paquet python-ldap pour python2.4.


> mais lorsque je build le setup de python-ldap j'obtiens le message d'erreur
> suivant :
>
> extra_compile_args:
> extra_objects:
> include_dirs: /usr/local/openldap-REL_ENG_2_1/include
> /usr/local/cyrus-sasl/include /usr/include/sasl
> library_dirs: /usr/local/openldap-REL_ENG_2_1/lib /usr/local/cyrus-sasl/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 build_ext
> building '_ldap' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.2.0
> -IModules -I/usr/local/openldap-REL_ENG_2_1/include
> -I/usr/local/cyrus-sasl/include -I/usr/include/sasl
> -I/usr/local/include/python2.4 -c Modules/errors.c -o
> build/temp.linux-i686-2.4/Modules/errors.o
> Modules/errors.c:24: error: size of array `errobjects' is negative
> error: command 'gcc' failed with exit status 1
>

La réponse a été donnée sur la liste de diffusions de python-ldap-dev :
http://sourceforge.net/mailarchive/forum.php?thread_id=25573689&forum_id=4346

La solution est d'appliquer le petit patch suivant au fichier errors.c
en attendant soit d'installer la future Debian Etch avec son python-ldap
fourni, soit une plus lointaine version de la distribution Debian qui
fournira une version plus récente des libraries OpenLDAP > 2.1.30 :

--- python-ldap-2.2.0~/Modules/errors.c
+++ python-ldap-2.2.0/Modules/errors.c
@@ -17,9 +17,16 @@

 /* list of error objects */

+#if LDAP_VENDOR_VERSION>=20200
+/* OpenLDAP 2.2+ defines negative error constants */
 #define LDAP_ERROR_MIN          LDAP_REFERRAL_LIMIT_EXCEEDED
 #define LDAP_ERROR_MAX          LDAP_OTHER
 #define LDAP_ERROR_OFFSET       -LDAP_ERROR_MIN
+#else
+#define LDAP_ERROR_MIN          0
+#define LDAP_ERROR_MAX          LDAP_REFERRAL_LIMIT_EXCEEDED
+#define LDAP_ERROR_OFFSET       0
+#endif

static PyObject* errobjects[ LDAP_ERROR_MAX-LDAP_ERROR_MIN+1 ];



Cordialement,

--
Marc-Aurèle DARCHE
NUXEO (Paris, France)                     http://nuxeo.com/
Nuxeo Collaborative Portal Server (CPS)   http://www.cps-project.org/
Gestion de contenu web / portail collaboratif / logiciel libre
_______________________________________________
cps-users-fr Adresse de la liste : [email protected]
Gestion de l'abonnement : <http://lists.nuxeo.com/mailman/listinfo/cps-users-fr>

Répondre à