A few notes trying to compile pypy
Hey everyone, I was trying to compile pypy and made the following mistakes: - On this page: http://pypy.org/download.html I couldn't figure out whether I was supposed to run all three of these commands: pypy ../../rpython/bin/rpython -Ojit targetpypystandalone # get the JIT version pypy ../../rpython/bin/rpython -O2 targetpypystandalone # get the no-jit version pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone # get the sandbox version or just one. - Once I got it installled I didn't realize there was an additional step after pypy-c was created. - I tried running python package.py -h and that didn't do what I expected (show help dialog) - I tried running package.py with the right options and it hung with this message (on both Mac and Centos): sll_os.ll_os_getenv(sPYPY_GENERATIONGC_NURSERY The only Google search results for this are an IRC channel from 2 years ago. It turned out I didn't want the Sandbox option, I think. - I tried compiling outside the sandbox and got this error: raise NoTTY("Cannot start the debugger when stdout is captured.") It turns out this is a red herring and the real error was way above that: error: ffi.h: No such file or directory It would be nice if these were more obvious.. of course I expect to run into issues but the errors could be more clear when they are. Continuing the install process now, will post updates here as I have them. I am happy to help try and fix these where I can, if you can point me in the right direction - I have a fair amount of experience working with new users at Twilio. I have also made exactly one commit to Pypy source code: https://bitbucket.org/pypy/pypy/commits/665baf750859/ Pypy is a lovely project and I'd love to try and help make this process easier. Best, Kevin -- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com
Hi Kevin, thanks for the feedback! Do you have maybe an idea how to improve the docs? about libffi.h - Apple removed /usr/include and moved it somewhere else, no clue where. I also don't have access to Mavericks so I can't fix it. On Sat, Oct 26, 2013 at 7:18 AM, Kevin Burke <kev@inburke.com> wrote:
Hey everyone, I was trying to compile pypy and made the following mistakes:
- On this page: http://pypy.org/download.html I couldn't figure out whether I was supposed to run all three of these commands:
pypy ../../rpython/bin/rpython -Ojit targetpypystandalone # get the JIT version pypy ../../rpython/bin/rpython -O2 targetpypystandalone # get the no-jit version pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone # get the sandbox version
or just one.
- Once I got it installled I didn't realize there was an additional step after pypy-c was created.
- I tried running python package.py -h and that didn't do what I expected (show help dialog)
- I tried running package.py with the right options and it hung with this message (on both Mac and Centos):
sll_os.ll_os_getenv(sPYPY_GENERATIONGC_NURSERY
The only Google search results for this are an IRC channel from 2 years ago. It turned out I didn't want the Sandbox option, I think.
- I tried compiling outside the sandbox and got this error:
raise NoTTY("Cannot start the debugger when stdout is captured.")
It turns out this is a red herring and the real error was way above that:
error: ffi.h: No such file or directory
It would be nice if these were more obvious.. of course I expect to run into issues but the errors could be more clear when they are.
Continuing the install process now, will post updates here as I have them.
I am happy to help try and fix these where I can, if you can point me in the right direction - I have a fair amount of experience working with new users at Twilio. I have also made exactly one commit to Pypy source code: https://bitbucket.org/pypy/pypy/commits/665baf750859/ Pypy is a lovely project and I'd love to try and help make this process easier.
Best, Kevin
-- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Hi, On Sat, Oct 26, 2013 at 10:25 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
about libffi.h - Apple removed /usr/include and moved it somewhere else, no clue where. I also don't have access to Mavericks so I can't fix it.
Ooooh. Traditionally, "libffi.h" was put in unexpectedly varying directories on every Linux distribution, just to make sure there was no reliable way to find it, but that was resolved some time ago with pkg-config. Apple's move is on a completely different level: killing the whole /usr/include is a perfect way to break compilation for every open source project under the sun. I'm impressed. A bientôt, Armin.
On 26/10/13 16:35, Armin Rigo wrote:
Hi,
about libffi.h - Apple removed /usr/include and moved it somewhere else, no clue where. I also don't have access to Mavericks so I can't fix it. Ooooh. Traditionally, "libffi.h" was put in unexpectedly varying
On Sat, Oct 26, 2013 at 10:25 AM, Maciej Fijalkowski <fijall@gmail.com> wrote: directories on every Linux distribution, just to make sure there was no reliable way to find it, but that was resolved some time ago with pkg-config. Apple's move is on a completely different level: killing the whole /usr/include is a perfect way to break compilation for every open source project under the sun. I'm impressed.
That is much less of a problem because there is homebrew, and I use it for almost everything that I don't want to build/take care of. About mavericks: can I help you out? Works fine in a virtual machine using parallels, if you don't want to change the system. cheers - chris -- Christian Tismer :^) <mailto:tismer@stackless.com> Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de phone +49 173 24 18 776 fax +49 (30) 700143-0023 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
On Mavericks: $ sudo find / -type f -name \*ffi.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/ffi/ffi.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/ffi/ffi.h /Users/taavi/src/pypy/rpython/translator/c/src/libffi_msvc/ffi.h /usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include/ffi.h Some quick googling indicates that yes, /usr/include moved into the platform SDK inside the XCode application. Sounds like one can restore it by installing the command-line tools (from http://stackoverflow.com/questions/19531262/cant-phpize-or-configure-an-exte... ): xcode-select --install Now I have a /usr/include again! $ ls /usr/include AssertMacros.h cache.h … I haven't tried building pypy since the upgrade though. On Sat, Oct 26, 2013 at 4:25 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
Hi Kevin, thanks for the feedback!
Do you have maybe an idea how to improve the docs?
about libffi.h - Apple removed /usr/include and moved it somewhere else, no clue where. I also don't have access to Mavericks so I can't fix it.
On Sat, Oct 26, 2013 at 7:18 AM, Kevin Burke <kev@inburke.com> wrote:
Hey everyone, I was trying to compile pypy and made the following mistakes:
- On this page: http://pypy.org/download.html I couldn't figure out whether I was supposed to run all three of these commands:
pypy ../../rpython/bin/rpython -Ojit targetpypystandalone # get the JIT version pypy ../../rpython/bin/rpython -O2 targetpypystandalone # get the no-jit version pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone # get the sandbox version
or just one.
- Once I got it installled I didn't realize there was an additional step after pypy-c was created.
- I tried running python package.py -h and that didn't do what I expected (show help dialog)
- I tried running package.py with the right options and it hung with this message (on both Mac and Centos):
sll_os.ll_os_getenv(sPYPY_GENERATIONGC_NURSERY
The only Google search results for this are an IRC channel from 2 years ago. It turned out I didn't want the Sandbox option, I think.
- I tried compiling outside the sandbox and got this error:
raise NoTTY("Cannot start the debugger when stdout is captured.")
It turns out this is a red herring and the real error was way above that:
error: ffi.h: No such file or directory
It would be nice if these were more obvious.. of course I expect to run into issues but the errors could be more clear when they are.
Continuing the install process now, will post updates here as I have them.
I am happy to help try and fix these where I can, if you can point me in the right direction - I have a fair amount of experience working with new users at Twilio. I have also made exactly one commit to Pypy source code: https://bitbucket.org/pypy/pypy/commits/665baf750859/ Pypy is a lovely project and I'd love to try and help make this process easier.
Best, Kevin
-- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- taa /*eof*/
Yup, if you run `xcode-select --install` everything fixes itself. Alex On Sat, Oct 26, 2013 at 8:14 AM, Taavi Burns <taavi.burns@gmail.com> wrote:
On Mavericks: $ sudo find / -type f -name \*ffi.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/ffi/ffi.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/ffi/ffi.h /Users/taavi/src/pypy/rpython/translator/c/src/libffi_msvc/ffi.h /usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include/ffi.h
Some quick googling indicates that yes, /usr/include moved into the platform SDK inside the XCode application. Sounds like one can restore it by installing the command-line tools (from
http://stackoverflow.com/questions/19531262/cant-phpize-or-configure-an-exte... ): xcode-select --install
Now I have a /usr/include again! $ ls /usr/include AssertMacros.h cache.h …
I haven't tried building pypy since the upgrade though.
Hi Kevin, thanks for the feedback!
Do you have maybe an idea how to improve the docs?
about libffi.h - Apple removed /usr/include and moved it somewhere else, no clue where. I also don't have access to Mavericks so I can't fix it.
On Sat, Oct 26, 2013 at 7:18 AM, Kevin Burke <kev@inburke.com> wrote:
Hey everyone, I was trying to compile pypy and made the following mistakes:
- On this page: http://pypy.org/download.html I couldn't figure out whether I was supposed to run all three of these commands:
pypy ../../rpython/bin/rpython -Ojit targetpypystandalone # get the JIT version pypy ../../rpython/bin/rpython -O2 targetpypystandalone # get the no-jit version pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone # get the sandbox version
or just one.
- Once I got it installled I didn't realize there was an additional step after pypy-c was created.
- I tried running python package.py -h and that didn't do what I expected (show help dialog)
- I tried running package.py with the right options and it hung with
message (on both Mac and Centos):
sll_os.ll_os_getenv(sPYPY_GENERATIONGC_NURSERY
The only Google search results for this are an IRC channel from 2 years ago. It turned out I didn't want the Sandbox option, I think.
- I tried compiling outside the sandbox and got this error:
raise NoTTY("Cannot start the debugger when stdout is captured.")
It turns out this is a red herring and the real error was way above
error: ffi.h: No such file or directory
It would be nice if these were more obvious.. of course I expect to run
into
issues but the errors could be more clear when they are.
Continuing the install process now, will post updates here as I have
On Sat, Oct 26, 2013 at 4:25 AM, Maciej Fijalkowski <fijall@gmail.com> wrote: this that: them.
I am happy to help try and fix these where I can, if you can point me
in the
right direction - I have a fair amount of experience working with new users at Twilio. I have also made exactly one commit to Pypy source code: https://bitbucket.org/pypy/pypy/commits/665baf750859/ Pypy is a lovely project and I'd love to try and help make this process easier.
Best, Kevin
-- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- taa /*eof*/ _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
It's only applicable (as far as I know) when upgrading from 10.8 to 10.9, so our docs don't really seem like the right place for it. Alex On Sun, Oct 27, 2013 at 12:11 AM, Armin Rigo <arigo@tunes.org> wrote:
Hi Alex,
On Sat, Oct 26, 2013 at 5:25 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
Yup, if you run `xcode-select --install` everything fixes itself.
How about writing down this magic line in the doc?
A bientôt,
Armin.
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
On Sun, Oct 27, 2013 at 2:05 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
It's only applicable (as far as I know) when upgrading from 10.8 to 10.9, so our docs don't really seem like the right place for it.
Having had a look, the PyPy install documentation (pypy/doc/getting-started-python.rst) doesn't have any notes about build-time dependencies on OS X or making sure the developer tools, etc are installed. It's not in the `improve-docs` branch either. AFAIK the only basic requirement to build on OS X is having the Developer Tools, since all the other optional dependencies are installed with them on OS X (I couldn't find a way to get `libbz2.h`, though, any tips?). If that's the case I'll submit a notice to the doc for extra clarity.
Alex
On Sun, Oct 27, 2013 at 12:11 AM, Armin Rigo <arigo@tunes.org> wrote:
Hi Alex,
On Sat, Oct 26, 2013 at 5:25 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
Yup, if you run `xcode-select --install` everything fixes itself.
How about writing down this magic line in the doc?
A bientôt,
Armin.
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Rami Chowdhury "A mind all logic is like a knife all blade - it makes the hand bleed that uses it." -- Rabindranath Tagore +44-7581-430-517 / +1-408-597-7068 / +88-01771-064063
A few more problems I ran into: - package.py lists these options: package.py root-pypy-dir [--nostrip] [--without-tk] [name-of-archive] [name-of-pypy-c] [destination-for-tarball] [pypy-c-path] Running in this order package.py ../../.. --without-tk means the --without-tk option doesn't get registered properly. Currently I am running into this error: error: 'SQLITE_DROP_VTABLE' undeclared (first use in this function) My version of sqlite3 is too old, but I can't upgrade the system sqlite3, so I'm trying to link a different one using LD_LIBRARY_PATH like this LD_LIBRARY_PATH=/path/to/sqlite3/sqlite-autoconf-3080100:$LD_LIBRARY_PATH /path/to/pypy-2.1-src/pypy/goal/pypy-c -c 'import _sqlite3' but still getting the same error, so not sure what to do at this point. Here are a few things I could add to the docs: 1. explain what each of the targetpypystandalone options does and that they are exclusive, not consecutive 2. add a numbered list for the "Building from source" section to emphasize you're supposed to run each number in the process to build a pypy 3. at the end of each numbered step, explain the output, eg "This will produce a binary called pypy-c that you can then use to release a pypy binary" 4. wrap subprocess.check_call("pypy-c -c 'import _sqlite3'") in a try/catch and add output 5. use argparse instead of sys.argv for package.py .. ? I think the mimimum python version now is 2.6 so this should be supported. -- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com On Fri, Oct 25, 2013 at 10:18 PM, Kevin Burke <kev@inburke.com> wrote:
Hey everyone, I was trying to compile pypy and made the following mistakes:
- On this page: http://pypy.org/download.html I couldn't figure out whether I was supposed to run all three of these commands:
pypy ../../rpython/bin/rpython -Ojit targetpypystandalone # get the JIT version pypy ../../rpython/bin/rpython -O2 targetpypystandalone # get the no-jit version pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone # get the sandbox version
or just one.
- Once I got it installled I didn't realize there was an additional step after pypy-c was created.
- I tried running python package.py -h and that didn't do what I expected (show help dialog)
- I tried running package.py with the right options and it hung with this message (on both Mac and Centos):
sll_os.ll_os_getenv(sPYPY_GENERATIONGC_NURSERY
The only Google search results for this are an IRC channel from 2 years ago. It turned out I didn't want the Sandbox option, I think.
- I tried compiling outside the sandbox and got this error:
raise NoTTY("Cannot start the debugger when stdout is captured.")
It turns out this is a red herring and the real error was way above that:
error: ffi.h: No such file or directory
It would be nice if these were more obvious.. of course I expect to run into issues but the errors could be more clear when they are.
Continuing the install process now, will post updates here as I have them.
I am happy to help try and fix these where I can, if you can point me in the right direction - I have a fair amount of experience working with new users at Twilio. I have also made exactly one commit to Pypy source code: https://bitbucket.org/pypy/pypy/commits/665baf750859/ Pypy is a lovely project and I'd love to try and help make this process easier.
Best, Kevin
-- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com
Hi Kevin, Thanks for this report ! A quick note though: On Sat, Oct 26, 2013 at 7:18 AM, Kevin Burke <kev@inburke.com> wrote:
- Once I got it installled I didn't realize there was an additional step after pypy-c was created.
Note that this step, "package.py", is not required to run the pypy-c executable. It's merely a tool that packs all files needed for system-wide installation. It also prebuilds a few cffi modules. The alternative is to simply use the pypy-c where it is (pypy/goal/pypy-c) instead, if you don't need it to be installed system-wide. Symlinks pointing to pypy/goal/pypy-c work fine. A bientôt, Armin.
Hi Maciej, I should note - I'm on Mountain Lion so libffi.h is not the issue at the moment - currently trying to compile this on Centos get the #include <sqlite3.h> in _sqlite3.py to find my custom sqlite3.h and not the one in /usr/lib. Here is the compile script I am using: https://gist.github.com/kevinburke/7170273 -- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com On Sat, Oct 26, 2013 at 7:46 AM, Armin Rigo <arigo@tunes.org> wrote:
Hi Kevin,
Thanks for this report ! A quick note though:
On Sat, Oct 26, 2013 at 7:18 AM, Kevin Burke <kev@inburke.com> wrote:
- Once I got it installled I didn't realize there was an additional step after pypy-c was created.
Note that this step, "package.py", is not required to run the pypy-c executable. It's merely a tool that packs all files needed for system-wide installation. It also prebuilds a few cffi modules. The alternative is to simply use the pypy-c where it is (pypy/goal/pypy-c) instead, if you don't need it to be installed system-wide. Symlinks pointing to pypy/goal/pypy-c work fine.
A bientôt,
Armin.
Aha, looks like I needed to point C_INCLUDE_PATH to the directory with my custom sqlite.h, all is well on Centos now -- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com On Sat, Oct 26, 2013 at 7:53 AM, Kevin Burke <kev@inburke.com> wrote:
Hi Maciej, I should note - I'm on Mountain Lion so libffi.h is not the issue at the moment - currently trying to compile this on Centos get the #include <sqlite3.h> in _sqlite3.py to find my custom sqlite3.h and not the one in /usr/lib.
Here is the compile script I am using:
https://gist.github.com/kevinburke/7170273
-- Kevin Burke | Twilio phone: 925.271.7005 | kev.inburke.com
On Sat, Oct 26, 2013 at 7:46 AM, Armin Rigo <arigo@tunes.org> wrote:
Hi Kevin,
Thanks for this report ! A quick note though:
On Sat, Oct 26, 2013 at 7:18 AM, Kevin Burke <kev@inburke.com> wrote:
- Once I got it installled I didn't realize there was an additional step after pypy-c was created.
Note that this step, "package.py", is not required to run the pypy-c executable. It's merely a tool that packs all files needed for system-wide installation. It also prebuilds a few cffi modules. The alternative is to simply use the pypy-c where it is (pypy/goal/pypy-c) instead, if you don't need it to be installed system-wide. Symlinks pointing to pypy/goal/pypy-c work fine.
A bientôt,
Armin.
participants (7)
-
Alex Gaynor
-
Armin Rigo
-
Christian Tismer
-
Kevin Burke
-
Maciej Fijalkowski
-
Rami Chowdhury
-
Taavi Burns