Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've spent most of the day on this, and it is driving me absolutely insane. On all other Unixes I've used, this is a walk in the park, but SLES 11 has me dumbfounded.

I need to build Zope on SLES 11 64 bit:

Linux <name> #1 SMP 2010-02-22 16:49:47 +0100 x86_64 x86_64 x86_64 GNU/Linux

I first tried to just use the YaST-installed Python 2.6. I've also installed python-devel, libjpeg-devel, readline-devel, libopenssl-devel, libz2-devel, zlib-devel, and libgcrypt-devel.

The global python2.6 has a lot of cruft in it, and seems to execute stuff in /etc/pythonstart when I use it, which doesn't help. However, the error I get is this:

Getting distribution for 'Zope2==2.12.3'.
src/AccessControl/cAccessControl.c:596: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:598: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:598: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:599: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:599: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:600: warning: ‘intintargfunc’ is deprecated
src/AccessControl/cAccessControl.c:600: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:601: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:602: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:606: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:606: warning: initialization from incompatible pointer type
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/ when searching for -lpython2.6
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lpython2.6
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occured when trying to install Zope2 2.12.3. Look above this message for any errors that were output by easy_install.

I don't know what "incompatible" is referring to here; my guess would be the hardware architecture, but I'm not sure what's incompatible with what in the statement above.

I've had problems with system-installed Pythons before, so I tried to compile my own (hence the list of -devel packages above), downloading the Python 2.6 tarball and running:

./configure --disable-tk --prefix=${HOME}/python
make install

This installs, but it seems to be unable to find any system-wide libraries. Here's a sample interpreter session:

Python 2.6.5 (r265:79063, Mar 29 2010, 17:04:12) 
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/etc/pythonstart", line 7, in <module>
    import readline
ImportError: No module named readline
>>> from hashlib import md5
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/osc/python-2.6/lib/python2.6/", line 136, in <module>
    md5 = __get_builtin_constructor('md5')
  File "/home/osc/python-2.6/lib/python2.6/", line 63, in __get_builtin_constructor
    import _md5
ImportError: No module named _md5

Both readline and hashlib (via libgrypt) should be installed, and the relevant -devel packages are also installed. On Ubuntu or OS X, this works just fine. On SuSE, no luck.

Any help greatly appreciated!


share|improve this question
Another interesting note: I tried to build the egg directly (with python build_ext). The output is: building 'AccessControl.cAccessControl' extension gcc -pthread -shared build/temp.linux-x86_64-2.6/src/AccessControl/cAccessControl.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/AccessControl/ /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lpython2.6 collect2: ld returned 1 exit status Note the -L/usr/lib64 in there. Somehow, that makes gcc happy, but not ld. – optilude Mar 30 '10 at 4:33

After an awful lot of pain, the missing piece was this: /usr/lib64/ was missing. It should be a symlink to /usr/lib64/, but somehow it got lost or was never installed.

A custom-built python still failed to find certain libraries (e.g. libgcrypto or libopenssl), but I managed to get a good python using the SuSE-provided one, coupled with virtualenv --no-site-packages to get a pristine environment.

Thanks to all those who helped, especially Wichert on IRC who explained the .so symlink thing. ;-)

share|improve this answer
+1 for including your answer – gareth_bowles May 5 '10 at 15:19

Martin, tried to Tweet it but of course mine do not show on yours, put your python libs in a directory (or symlink) that you then add to your python path IE PYTHONPATH "/home/osc/pythonstuff/extra_python_lib_15.6.3"

Or #adjust as needed you can append / add to $HOME/.bashrc or $HOME/.profile


it will then find them.

Using YuM is also a good idea as Yast can be sucky but you need to download and install using these instructions (good .spec file moved over from Fedora) as the OPenSuse package is not 2.6 compatible.

Im betting a clean install using YuM will work fine, YasT can be a little strange like that and also I have noticed /lib and /lib64 getting mixed up solved by simply symlinking /usr/lib64 to /usr/lib or apro location



share|improve this answer
Thanks for the reply! It didn't work, though. The problem is not in getting somethign to link to a custom python lib, but rather to get C extensions to buid. The closest I've come is to do this: 0. Uninstall libpython-32bit, so there's no longer a /usr/lib/ (but there's one in /usr/lib64) 1. Create a --no-site-packages virtualenv 2. Use this python to do "python build_ext", which just builds the C extensions This still fails with: ld: cannot find -lpython2.6 as shown in more detail above. – optilude Mar 30 '10 at 4:32

Download readline, compile from the source code then re-compile python from the source code.



PS - Gentoo is your friend : )

share|improve this answer
Yes, that may get me a sane python with readline; not sure about the md5 stuff, or openssl or other system-libraries it can't link to, though. :-/ And even then, I'm not convinced it'll build C extensions properly (see my comment above). – optilude Mar 30 '10 at 8:44

Oh well, getting OLD I guess : ) thought you had that .so under /usr/lib64 though ?

Glad its sorted, remeber Gentoo is coooler

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.