[python-ldap] python-ldap gcc error unrecognized option ‘-R’

Bernhard Gogo G.Bernhard at akbild.ac.at
Wed Feb 19 08:52:11 CET 2014


Hello, every01!

I am having serious trouble compiling python-ldap on debian for python2.4. This is what happens:

8<----------------
(python-ldap-2.4.14)zope09:~/python_ldap_dev_gogo/python-ldap-2.4.14# python setup.py build
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args: 
extra_objects: 
include_dirs: /opt/openldap/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap/lib64 /usr/lib
libs: ldap_r
running build
running build_py
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) 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/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) 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/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
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
/usr/bin/gcc -I/opt/plone3-instances/8009/Python-2.4/include -pthread -shared build/temp.linux-i686-2.4/Modules/LDAPObject.o build/temp.linux-i686-2.4/Modules/ldapcontrol.o build/temp.linux-i686-2.4/Modules/common.o build/temp.linux-i686-2.4/Modules/constants.o build/temp.linux-i686-2.4/Modules/errors.o build/temp.linux-i686-2.4/Modules/functions.o build/temp.linux-i686-2.4/Modules/schema.o build/temp.linux-i686-2.4/Modules/ldapmodule.o build/temp.linux-i686-2.4/Modules/message.o build/temp.linux-i686-2.4/Modules/version.o build/temp.linux-i686-2.4/Modules/options.o build/temp.linux-i686-2.4/Modules/berval.o -L/opt/openldap/lib64 -L/usr/lib -R/opt/openldap/lib64 -R/usr/lib -lldap_r -o build/lib.linux-i686-2.4/_ldap.so
gcc: error: unrecognized option ‘-R’
gcc: error: unrecognized option ‘-R’
error: command '/usr/bin/gcc' failed with exit status 1
(python-ldap-2.4.14)zope09:~/python_ldap_dev_gogo/python-ldap-2.4.14# gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(python-ldap-2.4.14)zope09:~/python_ldap_dev_gogo/python-ldap-2.4.14# python
Python 2.4.6 (#1, Dec  2 2013, 14:05:37) 
[GCC 4.7.2] on linux3
Type "help", "copyright", "credits" or "license" for more information.
>>> 
---------------->8

Obviously the "-R" option for gcc is wrong, but I can't figure out how to prevent the setup routines from injecting it. Older versions of gcc used to ignore it, but now it doesn't any more. I have to get a buildout setup running, and python-ldap fails. I have all dependencies installed and the machine's system Python has a working _ldap.so module. For this reproduction of the bug I used virtualenv. My buildout is broken unless I can fix that "-R" bug that emerged (due to the evolution of gcc). My buildout also compiles openldap in it's own seperate location without problems and tries to link against it, failing with the very same error.

Any suggestions would be very appreciated!
Gg.




More information about the python-ldap mailing list