Skip to main content

Ubuntu, Plone and problems with openldap and python-ldap

For some reason I've always had problems with python-ldap and openldap with Plone when I'm using Ubuntu. I've always managed to solve the problem by somehow building openldap from sources and been happy ever since. Now with fresh Ubuntu install I bumbed once again to the same problem and decided to write a reminder how I get things working again.

This time I used Panyasan's buildout example with one extra environment line. Without that line openldap won't compile on ubuntu. Instead of compiling succesfully it throws me an error "ubuntu getpeereid.c:52: error: storage size of ‘peercred’ isn’t known"

Here are the important parts:


[buildout]

parts =
zope2
productdistros
instance
zopepy
openldap
python-ldap

...

[versions]
python-ldap = 2.3.6

[openldap]
recipe = zc.recipe.cmmi
url = ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/openldap-stable/openldap-stable-20071118.tgz
extra_options = --with-sasl --with-tls --enable-slapd=no
environment = CPPFLAGS=-D_GNU_SOURCE

[python-ldap]
recipe = zc.recipe.egg:custom
egg = python-ldap
include-dirs = ${openldap:location}/include
library-dirs = ${openldap:location}/lib

Comments

Popular posts from this blog

Speed comparsions between Plone and Wordpress

Jon Stahl wrote recently a blogpost about Plone being three times faster than Dropal, Joomla and Wordpress . We had a small discussion about this in my workplace and as my colleague pointed out this wasn't a really that comprehensive test that you could state Plone being 3 times faster than it's competitors. This seemed a bit unfair test considering how fast this has been spread in tweet/blogosphere, so I decided to repeat the test with a bit more critical viewpoint. What's wrong in the original test? No one would consider opinion poll with 10 answers nowhere near trustworthy - it's all the same with requests. I didn't want to put up all the cms so I just set up second best (Wordpress 2.9.1) and compared that to my Plone development site (4.0a3). As a comparsion I did the first test with same ab command Jon used and my iMac gave following results: Wordpress: 7.13 requests / second Plone: 17.10 requests / second So far we have clear winner and Jons data hol...

Problems with Plone version pinning

Since we splitted our one huge Plone site to several smaller ones we've been looking for the correct procedure to keep things running smoothly and to make updates as painless as possible. So far we haven't found the right way and every update has had some problems. Some of the problems are related to the fact that we have about 24 sites to maintain and adding a new content type to all of them means lots of work. Below are all the steps needed for update (and solutions we've founded so far). 1. Add your new product to buildout.cfg eggs and zcml list. Do this 24 times and you'll find yourself thinking there has to be better way. Luckily there is; you can extend your buildout.cfg with some general config file (eg. deployement.cfg). Most tutorials describe a way where you have those two files living side by side in filesystem and you run buildout with -c deployement.cfg option, but this doesn't remove the actual problem. We have our deployement.cfg living in diffe...

cd under development packages nested folders without repeating yourself

To me Plone development environment means Fedora 12, terminator and vim . As I do lots of development in the shell there has been one annoying little thing which I'm tired of - cd:ing under development packages inner structure to where the actual code lives. Doesn't seem much but if you repeat that many times a day you'll get tired of it. Of course you can always launch vim for the package root and open the file you wanted from there, but it's still extra effort. Few weeks ago me and my colleague Jussi Talaskivi started to think that there has to be a script which takes you to your destination simply by parsing dotted name and using information from there to cd you to the correct place. After spending some time googling around we found none. Annoyed by this we decided to do this missing script by ourself. Soon it turned out that this wasn't that easy task as it sounds - simple shell or python script where you just parse correct path from arguments wouldn...