These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
How to install python-ldap in Mac OS X LionI found this solution worked instead of following the instructions on this page:
$ sudo env ARCHFLAGS=’-arch i386 -arch x86_64′ easy_install python-ldap==2.3.13
For future hapless searchers here is the output from my first failed install attempt:
pinerog-lm1:pip-1.1 pinerog$ sudo pip install python-ldap
Downloading/unpacking python-ldap
Downloading python-ldap-2.4.9.tar.gz (133Kb): 133Kb downloaded
Running setup.py egg_info for package python-ldap
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
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
warning: no files found matching ‘Makefile’
warning: no files found matching ‘Modules/LICENSE’
Requirement already satisfied (use –upgrade to upgrade): setuptools in /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python (from python-ldap)
Installing collected packages: python-ldap
Running setup.py install for python-ldap
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
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
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
warning: no files found matching ‘Makefile’
warning: no files found matching ‘Modules/LICENSE’
building ‘_ldap’ extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.9 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Modules/LDAPObject.c -o build/temp.macosx-10.6-universal-2.6/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
Modules/LDAPObject.c:1382: fatal error: error writing to -: Broken pipe
compilation terminated.
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
lipo: can’t open input file: /var/tmp//ccEZK6OJ.out (No such file or directory)
error: command ‘gcc-4.2′ failed with exit status 1
Complete output from command /usr/bin/python -c “import setuptools;__file__=’/Users/pinerog/Downloads/pip-1.1/build/python-ldap/setup.py’;exec(compile(open(__file__).read().replace(‘rn’, ‘n’), __file__, ‘exec’))” install –single-version-externally-managed –record /tmp/pip-mZcNF_-record/install-record.txt:
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
running install
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
creating build/lib.macosx-10.6-universal-2.6
copying Lib/ldapurl.py -> build/lib.macosx-10.6-universal-2.6
copying Lib/ldif.py -> build/lib.macosx-10.6-universal-2.6
copying Lib/dsml.py -> build/lib.macosx-10.6-universal-2.6
creating build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/__init__.py -> build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/async.py -> build/lib.macosx-10.6-universal-2.6/ldap
creating build/lib.macosx-10.6-universal-2.6/ldap/controls
copying Lib/ldap/controls/__init__.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls
copying Lib/ldap/cidict.py -> build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/dn.py -> build/lib.macosx-10.6-universal-2.6/ldap
creating build/lib.macosx-10.6-universal-2.6/ldap/extop
copying Lib/ldap/extop/__init__.py -> build/lib.macosx-10.6-universal-2.6/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.macosx-10.6-universal-2.6/ldap/extop
copying Lib/ldap/filter.py -> build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/functions.py -> build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/ldapobject.py -> build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/logger.py -> build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/modlist.py -> build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/resiter.py -> build/lib.macosx-10.6-universal-2.6/ldap
copying Lib/ldap/sasl.py -> build/lib.macosx-10.6-universal-2.6/ldap
creating build/lib.macosx-10.6-universal-2.6/ldap/schema
copying Lib/ldap/schema/__init__.py -> build/lib.macosx-10.6-universal-2.6/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.macosx-10.6-universal-2.6/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.macosx-10.6-universal-2.6/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.macosx-10.6-universal-2.6/ldap/schema
copying Lib/ldap/syncrepl.py -> build/lib.macosx-10.6-universal-2.6/ldap
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
warning: manifest_maker: standard file ‘-c’ 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
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
creating build/temp.macosx-10.6-universal-2.6
creating build/temp.macosx-10.6-universal-2.6/Modules
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.9 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Modules/LDAPObject.c -o build/temp.macosx-10.6-universal-2.6/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
Modules/LDAPObject.c:1382: fatal error: error writing to -: Broken pipe
compilation terminated.
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
lipo: can’t open input file: /var/tmp//ccEZK6OJ.out (No such file or directory)
error: command ‘gcc-4.2′ failed with exit status 1
—————————————-
Command /usr/bin/python -c “import setuptools;__file__=’/Users/pinerog/Downloads/pip-1.1/build/python-ldap/setup.py’;exec(compile(open(__file__).read().replace(‘rn’, ‘n’), __file__, ‘exec’))” install –single-version-externally-managed –record /tmp/pip-mZcNF_-record/install-record.txt failed with error code 1 in /Users/pinerog/Downloads/pip-1.1/build/python-ldap
Storing complete log in /Users/pinerog/Library/Logs/pip.log