Re: Buildout error when installing python-lda p on RHEL 6.2 — warning: unused variable ‘r eqvalue’
"Jens W. Klein" <jens-/[email protected]> Mon, 15 Jun 2015 13:16:22 +0200
| Newsgroups | gmane.comp.web.zope.plone.user |
|---|---|
| Organization | Klein & Partner KG |
| Message-ID | <[email protected]> |
So some hints, hth: On 2015-06-12 18:18, David Siedband wrote: >> On Jun 13, 2015, at 00:15, David Siedband <[email protected]> wrote: >> >> I have a Plone server running on RHEL 6.2 installed via unified installer. >> >> When I add python-ldap to my stack, I get the following error >> >> Modules/LDAPObject.c:1300: error: ‘LDAPObject’ has no member named ‘_save’ >> Modules/LDAPObject.c:1300: error: ‘LDAPObject’ has no member named ‘_save’ >> Modules/LDAPObject.c:1305: error: ‘LDAP_SUCCESS’ undeclared (first use in this function) >> Modules/LDAPObject.c:1306: error: ‘LDAPObject’ has no member named ‘ldap’ >> Modules/LDAPObject.c:1270: warning: unused variable ‘reqvalue’ >> error: Setup script exited with error: command 'gcc' failed with exit status 1 >> An error occurred when trying to install python-ldap 2.4.19. Look above this message for any errors that were output by easy_install. >> While: >> Installing instance. >> Getting distribution for 'python-ldap'. >> Error: Couldn't install: python-ldap 2.4.19 >> >> I also tried 2.4.18 and 2.4.17 but got the same result. > > Just to add a bit more detail here, I’m using buildout to install openldap, and my config looks like this: > > ================================================= > > [buildout] > extends = buildout.cfg > parts += > openldap you dont need to add openldap here, its better built by referencing in [python-ldap] section (see below) > python-ldap > > eggs += > plone.app.ldap Never declare eggs in [buildout] section. This is a bad practice and lead to problems. Always declare them were needed (here: instance section). see also http://bluedynamics.com/articles/jens/dependencies-and-zc.buildout Solution: in [instance] section declare like so: eggs += ... ${python-ldap:egg} ... > [openldap] > recipe = zc.recipe.cmmi > url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.31.tgz > extra_options = --with-sasl --with-tls --enable-slapd=no > > [python-ldap] > recipe = zc.recipe.egg:custom > egg = python-ldap > include-dirs = > ${buildout:directory}/parts/openldap/include reference like so: include-dirs = ${openldap:location}/include library-dirs = ${openldap:location}/lib rpath = ${openldap:location}/lib for a working setup see https://github.com/collective/pas.plugins.ldap/blob/master/ldap.cfg > library-dirs = > ${buildout:directory}/parts/openldap/lib > rpath = > ${buildout:directory}/parts/openldap/lib > > ================================================= > > Are there some OS-level packages I need to install on RHEL? On a debian based system you would need to do: apt-get install libsasl2-dev libssl-dev libdb-dev So I never installed it on RHEL, I'am sure Google will help you to find the same packages for RHEL. > I also tried the approach from this page about using a system-installed OpenLDAP > http://www.sixfeetup.com/blog/installing-python-ldap-with-buildout-and-a-system-installed-openldap > > ================================================= > > > buildout] > extends = buildout.cfg > parts += > python-ldap > > eggs += > plone.app.ldap > ${python-ldap:egg} > > [python-ldap] > recipe = zc.recipe.egg:custom > egg = python-ldap > include-dirs = > /opt/local/include > /opt/local/include/sasl > /usr/local/include > /usr/local/include/sasl > /usr/include > /usr/include/sasl > library-dirs = > /opt/local/lib > /opt/local/lib/sasl2 > /usr/local/lib > /usr/local/lib/sasl2 > /usr/lib > /usr/lib/sasl2 > rpath = ${:library-dirs} > > ================================================= > > Though it didn’t remedy the issue. Perhaps the paths in that article are specific for FreeBSD. > > -- > David Siedband > http://zentraal.com -- Klein & Partner KG, member of BlueDynamics Alliance ------------------------------------------------------------------------------ _______________________________________________ Plone-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plone-users