[Patches] [ python-Patches-488073 ] AtheOS port of Python 2.2b2
noreply@sourceforge.net
noreply@sourceforge.net
Sat, 20 Apr 2002 10:12:38 -0700
Patches item #488073, was opened at 2001-12-02 14:57
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=488073&group_id=5470
>Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 4
Submitted By: Octavian Cerna (tavyc)
>Assigned to: Martin v. Löwis (loewis)
Summary: AtheOS port of Python 2.2b2
Initial Comment:
Hi,
While I was playing with AtheOS in the last few days, I saw
that it comes
with Python 1.5.2. Being a Python enthusiast, I
tried to see if a recent
version of Python would work. It did not
even compile, so I decided to port
it, knowing that AtheOS is
almost POSIX-compatible.
The result is a full-blown Python port
with only a (relative) small amount
of changes, that builds
OOTB.
And here it is, with all the details:
About the patch:
- The diff is against CVS 2001-11-26
- 20 files changed, 1962
insertions, 23 deletions
- It does not include changes to
autoconf-generated files
- The patch includes a few very small
fixes not directly related to
the AtheOS port, but which were
necessary to ensure the port works OK:
- setup.py - look for the
_curses_panel.c file in $srcdir/Modules, not
in $PWD/Modules
(otherwise VPATH builds will not build _curses_panel.so)
-
Makefile.pre.in - only ranlib *.a files (how will this affect
other ports?)
- Tools/freeze/bkfile.py - not all platforms have
the file.truncate method
- Tools/scripts/h2py.py - environment-
paths code was made more portable
Environment:
- AtheOS
0.3.6
- gcc 2.95.2
- binutils 2.10
- glibc 2.1.2
Features:
-
Dynamic loading of modules
- Native thread support
Issues:
Although AtheOS is not a BeOS clone, it is in many ways similar to
BeOS,
and some issues from BeOS also apply on AtheOS.
- dlopen is
not properly implemented, so I had to add support for native
dynamic loading.
- The POSIX threads emulation is almost
inexistent, so I added support for
native AtheOS threads.
-
AtheOS doesn't support importing symbols in a shared library
from the
main executable (the `-export-dynamic' linker flag), so
the Python core
must be built as a shared library, like on BeOS.
-
mmap is not implemented in AtheOS, the mmap module was disabled
-
statvfs is not implemented, os.statvfs and os.fstatvfs
disabled
- crypt on AtheOS crashes with SEGV if salt is not "$1$"
(glibc bug?),
disabled
- poll - it seems that poll never returns
POLLNVAL for an invalid fd
(hangs), disabled
- Don't mix
threading with fork() -- see test_popen2 below.
All tests pass,
except:
- test_nis hangs on my system, probably because NIS is
not set up
- test_popen2 hangs when imported from regrtest.py,
otherwise working
(like on BeOS). I suspect that the import
semaphore is locked when
popen2 forks and AtheOS doesn't like
that.
- test_mhlib fails, I don't know exactly why, but I suspect a
filesystem issue
(It corrupted some of my files several times,
and I don't want to run it
again ;)
- test_locale skipped, locale
en_US not supported (maybe something's wrong
with my
environment?)
- test_largefile skipped (unless you tell it to
eat 2GB disk space)
because apparently afs doesn't support
sparse files.
Notes:
- If you build Python, make sure you have
shared versions of your
libraries and you have links in
/system/libs for them, otherwise the
kernel won't load
modules.
AtheOS doesn't have a shared version for each library,
I had serious
problems with ncurses and the _curses_panel
module.
Binary packages:
- I have prepared binary packages of
Python-2.2b2 and Numeric-20.2.1
for testing, I will post them on
kamidake.org later.
Future:
- I'm going to try Zope these
days, I think it should work with a minimum
amount of changes,
almost OOTB ;)
(Maybe I should have included this text in the
README file?)
Please excuse my bad English, I am not a native
speaker :)
Python is an excellent language/environment, keep
going with the good work!
--------
Best Regards,
Octavian Cerna
(Tavy)
yLabs
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2002-04-20 19:12
Message:
Logged In: YES
user_id=21627
Can you please update the patch for the current CVS? A few
comments:
- the plat-*/FCNTL are not generated anymore, FCNTL is
deprecated.
- Why does test_nis need to skip explicitly on atheos? If
the nis module builds, why does the test fail?
- Please use the .startswith method over the (historic) [:n]
form when testing sys.platform.
- I don't understand the O_LARGEFILE chunk. What is the
problem with just not defining O_LARGEFILE?
----------------------------------------------------------------------
Comment By: Octavian Cerna (tavyc)
Date: 2001-12-02 19:40
Message:
Logged In: YES
user_id=382173
I know that Python is now in a "feature freeze" or something similar, but
this patch could go in Python 2.3.
I added the HAVE_GETADDRINFO to
acconfig.h because it was simply missing and autoheader complained,
(outdated CVS snapshot). I should have removed it from the patch. I
posted it here just to make it available to anyone who wants to try it
out.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2001-12-02 16:42
Message:
Logged In: YES
user_id=21627
I'd advise not to add this port so shortly before 2.2, in
particular since these changes need careful review. As an
example: Why does it add HAVE_GETADDRINFO to acconfig.h?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=488073&group_id=5470