Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
On 24 Apr, 2010, at 18:19, Michael Foord wrote: On 18/04/2010 16:48, Ronald Oussoren wrote: [snip...] Michael A build on my machine produces output similar to: Michael Python build finished, but the necessary bits to build these modules Michael were not found: Michael _bsddb dl gdbm * _bsddb and gdbm require external libraries that aren't provided in the system install Sorry for duplicating this conversation - just going through my outstanding emails. Feel free to ignore the one on python-dev. What are the external libraries? This is probably documented somewhere, so could you point me to it? (Sorry - my ignorance I know.) gdbm and bsddb are python wrappers for C libraries that aren't part of OSX, if you want to use them you have to install those C libraries manually (GNU DBM and Sleepycat DB). * dl doesn't get build on OSX 10.6 when you use the default configure settings because that results in a 64-bit binary and setup.py explicitly disables building the dl module for 64-bit platforms. Apple has a patch that enables building dl on 64-bit OSX, I haven't had time to check if that patch is actually valid. Ok. I would be interested in how to do a 32bit build. configure --enable-universalsdk=/ results in a binary that is 32-bit and runs natively on i386 and ppc machines. Michael readline spwd sunaudiodev readline requires an external library or python 2.6.5, 2.7 or 3.2. Hmm... I have readline installed (via homebrew). Is that not sufficient? That should work, but only when setup.py finds that readline install. This one should work. Do you have a /Library/Framework/Tcl.framework? If so, what is the output of file /Library/Frameworks/Tcl.framework/Tcl, what OSX release are you building on and what are the configure flags. OS X 10.6.3. $ file /Library/Frameworks/Tcl.framework/Tcl /Library/Frameworks/Tcl.framework/Tcl: Mach-O universal binary with 2 architectures /Library/Frameworks/Tcl.framework/Tcl (for architecture ppc): Mach-O dynamically linked shared library ppc /Library/Frameworks/Tcl.framework/Tcl (for architecture i386): Mach-O dynamically linked shared library i386 My configure command is: ./configure --prefix=/dev/null --with-pydebug On 10.6 the compiler generates 64-bit code by default, use: configure --enable-universalsdk=/ ... Ronald smime.p7s Description: S/MIME cryptographic signature ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
On 25 Apr, 2010, at 16:43, Michael Foord wrote: On 25/04/2010 15:31, Ronald Oussoren wrote: On 24 Apr, 2010, at 18:19, Michael Foord wrote: On 18/04/2010 16:48, Ronald Oussoren wrote: [snip...] Michael A build on my machine produces output similar to: Michael Python build finished, but the necessary bits to build these modules Michael were not found: Michael _bsddb dl gdbm * _bsddb and gdbm require external libraries that aren't provided in the system install Sorry for duplicating this conversation - just going through my outstanding emails. Feel free to ignore the one on python-dev. What are the external libraries? This is probably documented somewhere, so could you point me to it? (Sorry - my ignorance I know.) gdbm and bsddb are python wrappers for C libraries that aren't part of OSX, if you want to use them you have to install those C libraries manually (GNU DBM and Sleepycat DB). Is all this documented anywhere? (A description of how to do a full build - all supported modules - on Mac OS X.) Not that I know. The OSX installers on python.org include more C libraries, but not everything. The script that creates those installers is in the repository and it should be easy enough to enhance that to include more libraries. readline requires an external library or python 2.6.5, 2.7 or 3.2. Hmm... I have readline installed (via homebrew). Is that not sufficient? That should work, but only when setup.py finds that readline install. How do I configure that? It looks like the location needs to be in PyBuildExt.compiler.lib_dirs - inherited from distutils.command.build_ext.build_ext. It doesn't look very easily configurable. The documentation is a little terse (i.e. non-existent): http://docs.python.org/distutils/apiref.html#module-distutils.command.build_ext One trick it so add OPT=/my/build/root/include LDFLAGS=-L/my/build/root/lib to the configure line, that way setup.py will look into /my/build/root/include for headers (and .../lib for library files). One other thing: the OSX linker looks for dynamic libraries all along its search path before looking for static libraries, you have to add -search_paths_first to LDFLAGS if you have static libraries that you want to link to which may also be on the system. BTW. If you don't mind getting libedit instead of GNU readline run configure with 'MACOSX_DEPLOYMENT_TARGET=10.5' (or 10.6) in the shell environment. The resulting binary will require OSX 10.5 and setup.py will then use the readline emulation in the system library 'libedit' (it won't do so with the default options because that generates a binary that runs on 10.3.9 or 10.4 and those don't have a good enough libedit library). Libedit is a BSD library that offers simular functionality to GNU readline, but using a different C API and a different configuration. Ronald All the best, Michael Foord This one should work. Do you have a /Library/Framework/Tcl.framework? If so, what is the output of file /Library/Frameworks/Tcl.framework/Tcl, what OSX release are you building on and what are the configure flags. OS X 10.6.3. $ file /Library/Frameworks/Tcl.framework/Tcl /Library/Frameworks/Tcl.framework/Tcl: Mach-O universal binary with 2 architectures /Library/Frameworks/Tcl.framework/Tcl (for architecture ppc): Mach-O dynamically linked shared library ppc /Library/Frameworks/Tcl.framework/Tcl (for architecture i386): Mach-O dynamically linked shared library i386 My configure command is: ./configure --prefix=/dev/null --with-pydebug On 10.6 the compiler generates 64-bit code by default, use: configure --enable-universalsdk=/ ... Ronald -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. smime.p7s Description: S/MIME cryptographic signature ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
On 25/04/2010 16:57, Ronald Oussoren wrote: On 25 Apr, 2010, at 16:43, Michael Foord wrote On 25/04/2010 15:31, Ronald Oussoren wrote: On 24 Apr, 2010, at 18:19, Michael Foord wrote: On 18/04/2010 16:48, Ronald Oussoren wrote: [snip...] Michael A build on my machine produces output similar to: Michael Python build finished, but the necessary bits to build these modules Michael were not found: Michael _bsddb dl gdbm * _bsddb and gdbm require external libraries that aren't provided in the system install Sorry for duplicating this conversation - just going through my outstanding emails. Feel free to ignore the one on python-dev. What are the external libraries? This is probably documented somewhere, so could you point me to it? (Sorry - my ignorance I know.) gdbm and bsddb are python wrappers for C libraries that aren't part of OSX, if you want to use them you have to install those C libraries manually (GNU DBM and Sleepycat DB). Is all this documented anywhere? (A description of how to do a full build - all supported modules - on Mac OS X.) Not that I know. The OSX installers on python.org include more C libraries, but not everything. The script that creates those installers is in the repository and it should be easy enough to enhance that to include more libraries. Sorry, by creating a full build I meant building a Python including all the libraries that come with the standard installer from python.org. The sort of documentation I was looking for was not how to extend the build script - but what third party C libraries need to be installed in order to perform the standard build. Probably that doesn't exist either, but I guess if it *did* exist it would be easier for other people to help by building the installers for new releases. :-) readline requires an external library or python 2.6.5, 2.7 or 3.2. Hmm... I have readline installed (via homebrew). Is that not sufficient? That should work, but only when setup.py finds that readline install. How do I configure that? It looks like the location needs to be in PyBuildExt.compiler.lib_dirs - inherited from distutils.command.build_ext.build_ext. It doesn't look very easily configurable. The documentation is a little terse (i.e. non-existent): http://docs.python.org/distutils/apiref.html#module-distutils.command.build_ext One trick it so add OPT=/my/build/root/include LDFLAGS=-L/my/build/root/lib to the configure line, that way setup.py will look into /my/build/root/include for headers (and .../lib for library files). One other thing: the OSX linker looks for dynamic libraries all along its search path before looking for static libraries, you have to add -search_paths_first to LDFLAGS if you have static libraries that you want to link to which may also be on the system. With this configure line: ./configure --prefix=/dev/null --with-pydebug --enable-universalsdk OPT=/usr/local/include LDFLAGS=-L/usr/local/lib I get the following error on make: $ make -s powerpc-apple-darwin10-gcc-4.0.1: /usr/local/include: linker input file unused because linking not done i686-apple-darwin10-gcc-4.0.1: /usr/local/include: linker input file unused because linking not done lipo: can't figure out the architecture type of: /var/folders/WD/WDk8J3uFE7OM9tRer5Oy4E+++TI/-Tmp-//cc1ezMQD.out make: *** [Modules/python.o] Error 1 With: ./configure --prefix=/dev/null --with-pydebug OPT=/usr/local/include LDFLAGS=-L/usr/local/lib I get a different error on make: $ make -s ... i686-apple-darwin10-gcc-4.2.1: /usr/local/include: linker input file unused because linking not done ld: in /usr/local/include, can't map file, errno=22 collect2: ld returned 1 exit status make: *** [Parser/pgen] Error 1 With: ./configure --prefix=/dev/null --with-pydebug OPT=/usr/local/include LDFLAGS=-L/usr/local/lib -search_paths_first I get the same error on make as above. Looks like getting Python to build against readline installed with brew maybe tricky. BTW. If you don't mind getting libedit instead of GNU readline run configure with 'MACOSX_DEPLOYMENT_TARGET=10.5' (or 10.6) in the shell environment. The resulting binary will require OSX 10.5 and setup.py will then use the readline emulation in the system library 'libedit' (it won't do so with the default options because that generates a binary that runs on 10.3.9 or 10.4 and those don't have a good enough libedit library). Libedit is a BSD library that offers simular functionality to GNU readline, but using a different C API and a different configuration. Cool - for my own builds that would be fine. Thanks Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
On 25 Apr, 2010, at 18:20, Michael Foord wrote: Not that I know. The OSX installers on python.org include more C libraries, but not everything. The script that creates those installers is in the repository and it should be easy enough to enhance that to include more libraries. Sorry, by creating a full build I meant building a Python including all the libraries that come with the standard installer from python.org. The sort of documentation I was looking for was not how to extend the build script - but what third party C libraries need to be installed in order to perform the standard build. Probably that doesn't exist either, but I guess if it *did* exist it would be easier for other people to help by building the installers for new releases. :-) It doesn't exist as documentation, but the process is fully automated: run Mac/BuildScript/build-installer.py on a system running OSX 10.5 with ActiveState Tcl/Tk installed in /Library/Frameworks. This doesn't work correctly set on 10.6 because Python links to a number of system libraries that have changed in 10.6. We try to get a working binary by using an OSX SDK, but that only works on 10.5 because setup.py looks at system headers instead of the ones in the SDK. I'm working on a fix for that (see issue 7724 http://bugs.python.org/issue7724), running a 10.5 VM just for doing test builds of the installer sucks. There's also a buildbot that's running OSX 10.4 and is can build the installer (or is very close to it, I'm slightly behind on my e-mail). Ronald smime.p7s Description: S/MIME cryptographic signature ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
On 25 Apr, 2010, at 18:33, Michael Foord wrote: On 25/04/2010 17:28, Ronald Oussoren wrote: On 25 Apr, 2010, at 18:20, Michael Foord wrote: Not that I know. The OSX installers on python.org include more C libraries, but not everything. The script that creates those installers is in the repository and it should be easy enough to enhance that to include more libraries. Sorry, by creating a full build I meant building a Python including all the libraries that come with the standard installer from python.org. The sort of documentation I was looking for was not how to extend the build script - but what third party C libraries need to be installed in order to perform the standard build. Probably that doesn't exist either, but I guess if it *did* exist it would be easier for other people to help by building the installers for new releases. :-) It doesn't exist as documentation, but the process is fully automated: run Mac/BuildScript/build-installer.py on a system running OSX 10.5 with ActiveState Tcl/Tk installed in /Library/Frameworks. But that doesn't *tell me* which third party libraries I need to install first... The fact that the build is automated *once you have the correct environment in place* doesn't help me *create that environment*. That is the part I am asking about documentation for. My paragraph above is everything that is needed. The whole point of the script is to not have to create an environment but have a reproducable build. I'm thinking about removing the need for installing Tcl/Tk as well, it should be possible to get the same effect by creative use of linker flags. You mention about have ActiveState Tcl/Tk installed - but that won't build readline, bsddb and possibly other C extension libraries that are part of a standard install from a Python.org Mac OS X installer. You don't have to install anything beyond Tcl/Tk. Ronald smime.p7s Description: S/MIME cryptographic signature ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
On 25/04/2010 18:04, Ronald Oussoren wrote: On 25 Apr, 2010, at 18:33, Michael Foord wrote: On 25/04/2010 17:28, Ronald Oussoren wrote: On 25 Apr, 2010, at 18:20, Michael Foord wrote: Not that I know. The OSX installers on python.org include more C libraries, but not everything. The script that creates those installers is in the repository and it should be easy enough to enhance that to include more libraries. Sorry, by creating a full build I meant building a Python including all the libraries that come with the standard installer from python.org. The sort of documentation I was looking for was not how to extend the build script - but what third party C libraries need to be installed in order to perform the standard build. Probably that doesn't exist either, but I guess if it *did* exist it would be easier for other people to help by building the installers for new releases. :-) It doesn't exist as documentation, but the process is fully automated: run Mac/BuildScript/build-installer.py on a system running OSX 10.5 with ActiveState Tcl/Tk installed in /Library/Frameworks. But that doesn't *tell me* which third party libraries I need to install first... The fact that the build is automated *once you have the correct environment in place* doesn't help me *create that environment*. That is the part I am asking about documentation for. My paragraph above is everything that is needed. The whole point of the script is to not have to create an environment but have a reproducable build. I'm thinking about removing the need for installing Tcl/Tk as well, it should be possible to get the same effect by creative use of linker flags. So without installing any third party C libraries (other than Tk/Tcl) the bsddb, readline (etc) modules *will* be built if you use the Mac build-installer.py script even though they aren't built by ./configure then make? Michael You mention about have ActiveState Tcl/Tk installed - but that won't build readline, bsddb and possibly other C extension libraries that are part of a standard install from a Python.org Mac OS X installer. You don't have to install anything beyond Tcl/Tk. Ronald -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
On 18/04/2010 16:48, Ronald Oussoren wrote: [snip...] Michael A build on my machine produces output similar to: Michael Python build finished, but the necessary bits to build these modules Michael were not found: Michael _bsddb dl gdbm * _bsddb and gdbm require external libraries that aren't provided in the system install Sorry for duplicating this conversation - just going through my outstanding emails. Feel free to ignore the one on python-dev. What are the external libraries? This is probably documented somewhere, so could you point me to it? (Sorry - my ignorance I know.) * dl doesn't get build on OSX 10.6 when you use the default configure settings because that results in a 64-bit binary and setup.py explicitly disables building the dl module for 64-bit platforms. Apple has a patch that enables building dl on 64-bit OSX, I haven't had time to check if that patch is actually valid. Ok. I would be interested in how to do a 32bit build. Michael imageoplinuxaudiodev ossaudiodev imageop is not 64-bit clean, the others are not relevant on OSX Michael readline spwd sunaudiodev readline requires an external library or python 2.6.5, 2.7 or 3.2. Hmm... I have readline installed (via homebrew). Is that not sufficient? The other two are not relevant on OSX. Michael To find the necessary bits, look in setup.py in detect_modules() for the Michael module's name. Michael Failed to build these modules: Michael _tkinter This one should work. Do you have a /Library/Framework/Tcl.framework? If so, what is the output of file /Library/Frameworks/Tcl.framework/Tcl, what OSX release are you building on and what are the configure flags. OS X 10.6.3. $ file /Library/Frameworks/Tcl.framework/Tcl /Library/Frameworks/Tcl.framework/Tcl: Mach-O universal binary with 2 architectures /Library/Frameworks/Tcl.framework/Tcl (for architecture ppc): Mach-O dynamically linked shared library ppc /Library/Frameworks/Tcl.framework/Tcl (for architecture i386): Mach-O dynamically linked shared library i386 My configure command is: ./configure --prefix=/dev/null --with-pydebug All the best, Michael Foord Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (BOGUS AGREEMENTS) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
On 15 Apr, 2010, at 3:18, s...@pobox.com wrote: (Moving this response from python-dev to pythonmac-sig...) I'm not too happy about that, the discussion should have been moved to the tracker instead. Michael A build on my machine produces output similar to: Michael Python build finished, but the necessary bits to build these modules Michael were not found: Michael _bsddb dl gdbm * _bsddb and gdbm require external libraries that aren't provided in the system install * dl doesn't get build on OSX 10.6 when you use the default configure settings because that results in a 64-bit binary and setup.py explicitly disables building the dl module for 64-bit platforms. Apple has a patch that enables building dl on 64-bit OSX, I haven't had time to check if that patch is actually valid. Michael imageoplinuxaudiodev ossaudiodev imageop is not 64-bit clean, the others are not relevant on OSX Michael readline spwd sunaudiodev readline requires an external library or python 2.6.5, 2.7 or 3.2. The other two are not relevant on OSX. Michael To find the necessary bits, look in setup.py in detect_modules() for the Michael module's name. Michael Failed to build these modules: Michael _tkinter This one should work. Do you have a /Library/Framework/Tcl.framework? If so, what is the output of file /Library/Frameworks/Tcl.framework/Tcl, what OSX release are you building on and what are the configure flags. Ronald smime.p7s Description: S/MIME cryptographic signature ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
In article 19398.26953.347036.788...@montanaro.dyndns.org, s...@pobox.com wrote: (Moving this response from python-dev to pythonmac-sig...) Sorry, I responded to Michael's post on python-dev. The problems are due to either missing necessary 3rd-party libs, modules that are unsupported on OS X, or building by default in 64-bit mode on 10.6. -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)
(Moving this response from python-dev to pythonmac-sig...) Michael A build on my machine produces output similar to: Michael Python build finished, but the necessary bits to build these modules Michael were not found: Michael _bsddb dl gdbm Michael imageoplinuxaudiodev ossaudiodev Michael readline spwd sunaudiodev Michael To find the necessary bits, look in setup.py in detect_modules() for the Michael module's name. Michael Failed to build these modules: Michael _tkinter Using /usr/bin/python (Apple's 2.5.1) as a reference I find that I am able to import the following modules from the above lists: imageop readline dl _tkinter Using the Enthought framework build (2.5.4) I can import: bsddb imageop readline dl _tkinter I don't have one of Ronald's framework builds handy, but the above suggests several of those which failed to build for you should build. I tried a framework build after doing the following: * remove /opt/local and /usr/local from my set of environment variables * rename /usr/local to /usr/local- * comment out references to /sw and /opt/local in setup.py. dl, _tkinter and imageop built for me. You must be missing Tcl and Tk from /Library/Frameworks to miss on _tkinter. Not sure why the dl and imageop modules failed for you. otool -L suggests that the only dylib files required are libgcc_s and libSystem, both in /usr/lib. Are you missing some header files perhaps? Skip ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG