Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 1 | Python for BeOS R5 |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 2 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 3 | To build, |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 4 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 5 | 1) ./configure --prefix=/boot/home/config |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 6 | |
Fred Drake | cf3bc8c | 2000-10-26 17:07:40 +0000 | [diff] [blame] | 7 | 2) edit Modules/Setup |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 8 | comment out grp and mmap, and pwd on 4.5 or earlier |
| 9 | uncomment any modules you want to include in python |
| 10 | (you can also add them later as shared libraries.) |
| 11 | 3) make |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 12 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 13 | Test: |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 14 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 15 | make test |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 16 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 17 | [Chris Herborth writes:] |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 18 | test_popen2 will probably hang; it's deadlocked on a semaphore. I should |
| 19 | probably disable popen2 support... it uses fork(), and fork() doesn't mix |
| 20 | with threads on BeOS. In *THEORY* you could use it in a single-threaded |
| 21 | program, but I haven't tried. |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 22 | |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 23 | If test_popen2 does hang, you can find the semaphore it's hung on via the |
| 24 | "ps" command. Look for python and you'll find something like this: |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 25 | |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 26 | ./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0) |
| 27 | 39472 python sem 10 3785 1500 piperd(360526) |
| 28 | ./python -tt ../src/Lib/test/regrtest.py (team 26923) (uid 0) (gid 0) |
| 29 | 39477 python sem 10 25 4 python lock (1)(360022) |
| 30 | ^^^^^^ |
| 31 | That last number is the semaphore the fork()'d python is stuck on |
| 32 | (see how it's helpfully called "python lock (1)"? :-). You can unblock |
| 33 | that semaphore to let the tests continue using the "release" command |
| 34 | with that semaphore number. Be _very_ careful with "release" though, |
| 35 | releasing the wrong semaphore can be hazardous. |
| 36 | |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 37 | Expect the following errors: |
| 38 | |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 39 | test * skipped -- an optional feature could not be imported (you'll see |
| 40 | quite a few of these, based on what optional modules |
| 41 | you've included) |
| 42 | |
| 43 | test test_fork1 skipped -- can't mix os.fork with threads on BeOS |
| 44 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 45 | test test_select crashed -- select.error : (-2147459072, 'Bad file |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 46 | descriptor') |
| 47 | |
| 48 | test test_socket crashed -- exceptions.AttributeError : SOCK_RAW |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 49 | |
| 50 | These are all due to either partial support for certain things (like |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 51 | sockets), or valid differences between systems. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 52 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 53 | test test_pickle crashed. This is apparently a serious problem, |
| 54 | "complex" number objects reconstructed from a |
| 55 | pickle don't compare equal to their ancestors. |
| 56 | But it happens on BeOS PPC only, not Intel. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 57 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 58 | Install: |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 59 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 60 | make install |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 61 | |
Neil Schemenauer | 6e0e91a | 2001-02-16 04:35:20 +0000 | [diff] [blame] | 62 | |
| 63 | Using GNU readline: |
| 64 | |
| 65 | The Python interpreter is much nicer to work with interactively if |
| 66 | you've got readline installed. Highly recommended. |
| 67 | |
| 68 | You can get the original GNU readline 2.2 source code from your |
| 69 | favourite GNU software repository, such as |
| 70 | ftp://prep.ai.mit.edu/pub/gnu/. |
| 71 | |
| 72 | You can get the only-slightly-modified-for-BeOS version of GNU |
| 73 | readline 2.2 from the GeekGadgets repository; |
| 74 | ftp://ftp.ninemoons.com/pub/geekgadgets/. |
| 75 | |
| 76 | |
| 77 | Building libreadline for BeOS hosts: |
| 78 | |
| 79 | Note that we don't build a shared library version of libreadline and |
| 80 | libhistory. That's left as an exercise for the reader. |
| 81 | |
| 82 | You won't be able to link against libreadline.a using the limited |
| 83 | linker. |
| 84 | |
| 85 | 1) If you're on a PowerPC system, install the POSIX ar from |
| 86 | http://www.qnx.com/~chrish/Be/software/index.html#programming |
| 87 | (note that it's currently packaged with Python, in the BeOS/ar-1.1 |
| 88 | directory). |
| 89 | |
| 90 | If you're on an x86 system, you can leave out the "AR=ar-posix" |
| 91 | part of the following instructions. In fact, you'll have to... |
| 92 | |
| 93 | 2) For PowerPC, configure with: |
| 94 | |
| 95 | CC=mwcc CFLAGS="-O7 -i- -I." AR=ar-posix RANLIB=: ./configure --verbose \ |
| 96 | --without-gcc --prefix=/boot/home/config powerpc-*-beos |
| 97 | |
| 98 | For x86, configure with: |
| 99 | |
| 100 | CC=mwcc CFLAGS="-O2 -i- -I." RANLIB=: ./configure --verbose \ |
| 101 | --without-gcc --prefix=/boot/home/config x86-*-beos |
| 102 | |
| 103 | Don't worry about the warnings/errors configure spews for |
| 104 | powerpc-*-beos or x86-*-beos; readline doesn't actually use this host |
| 105 | information for anything, although configure will die if you don't |
| 106 | specify it. |
| 107 | |
| 108 | 3) Edit config.h to comment out "#define HAVE_SELECT 1"; select() on |
| 109 | BeOS doesn't work on file descriptors (such as stdin). |
| 110 | |
| 111 | 4) For PowerPC, make with: |
| 112 | |
| 113 | make AR=ar-posix |
| 114 | |
| 115 | For x86, make with: |
| 116 | |
| 117 | make |
| 118 | |
| 119 | 5) Install with: |
| 120 | |
| 121 | make install |
| 122 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 123 | Enjoy! |
Guido van Rossum | eb45232 | 1998-12-18 22:00:58 +0000 | [diff] [blame] | 124 | |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 125 | - Chris Herborth (chrish@pobox.com) |
| 126 | July 21, 2000 |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame] | 127 | |
| 128 | - Donn Cave (donn@oz.net) |
| 129 | October 4, 2000 |