PACKAGE NAME ------------ neko_python DESCRIPTION ----------- Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. The Python implementation is portable: it runs on many brands of UNIX, on Windows, OS/2, Mac, Amiga, and many other platforms. If your favorite system isn't listed here, it may still be supported, if there's a C compiler for it. Ask around on news:comp.lang.python -- or just try compiling Python yourself. The Python implementation is copyrighted but freely usable and distributable, even for commercial use. More information can be found at: http://www.python.org/ SOURCE/VERSION -------------- python-2.7.16 / 14 IRIX/MIPSPRO VERSION -------------------- 6.5.22 / 7.4.4m ENVIRONMENT VARIABLES --------------------- setenv CC c99 setenv CXX CC setenv CFLAGS '-woff 3970' setenv OPT -O1 setenv SGI_ABI -n32 setenv LDFLAGS '-L/usr/nekoware/lib' setenv CPPFLAGS '-I/usr/nekoware/include -I/usr/nekoware/include/ncurses -D_SGI_MP_SOURCE -D_SGI_REENTRANT_FUNCTIONS' setenv LIBS -lpthread setenv MAKE /usr/nekoware/bin/gmake setenv PERL /usr/nekoware/bin/perl PATCH ----- cd Python-2.7.16 patch -p0 < Python-2.7.16_irix.patch patch -p0 < Python-2.7.16_extra_irix_files.patch cd Lib ln -s plat-irix6 plat-irix6-n32 cd .. CONFIGURE --------- ./configure --enable-shared --prefix=/usr/nekoware --with-system-expat --with-system-ffi --enable-unicode=ucs4 BUILD ----- gmake clean gmake cd Modules cp Setup.dist Setup patch -p0 < Python-2.7.16_irix_Setup.patch setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}: ../python cgen.py < cstubs > glmodule.c cd .. gmake gmake test KNOWN DEPENDENCIES ------------------ Module dependencies neko_bzip2.sw.lib 6 maxint neko_db4.sw.lib 9 maxint neko_expat.sw.lib 7 maxint neko_forms.sw.lib 1 maxint neko_gdbm.sw.lib 4 maxint neko_gettext.sw.lib 10 maxint neko_libffi.sw.lib 3 maxint neko_libiconv.sw.lib 5 maxint neko_ncurses.sw.lib 6 maxint neko_openssl.sw.lib 33 maxint neko_readline.sw.lib 6 maxint neko_sqlite3.sw.lib 4 maxint neko_tcl.sw.lib 3 maxint neko_tk.sw.lib 2 maxint neko_zlib.sw.lib 9 maxint gmake to build the package perl to make the documentation and the unittests ERRORS/MISCELLANEOUS -------------------- The patch is extensive and fixes, among other things, shared library creation, ABI settings, semaphore handling and a few bugs in separate modules. I've started running the test suite and noted down each failed test, find the module which causes it and try to fix it. Unittests which fail(ed) are: test_bsddb185 This fails on the byte check for a particular test database. I've checked this with db_dump185 in the db4 package and it turns out that SGI's bsddb 1.8.5 version in /usr/lib32/libdb.a is not compatible with the test185.db database in the Python test directory, but it does work for db files like /etc/mail/aliases.db. Nevertheless, bsddb185 is buggy and deprecated, and can be replaced entirely by a db4 implementation. test_codecs see test_locale test_ctypes There are at least two bugs: one bug when returning a NULL Python object pointer to callproc.c and its NULL reference in GetResult:callproc.c triggering a segfault. The latter can be fixed with a patch by checking for the NULL pointer in advance before a call to Py_DECREF() is made. This will cause an exception if the first bug isn't fixed, but that is much better than a segfault in the python module. A separate bug concerns the qsort test. This test in ctypes incorrectly sorts a string: It looks like it has problems swapping bytes around. test_distutils This tests the various compiler tools on the python binary but fails on test_config_cmd.py in line 50 where preprocessing is tested with search_cpp from Lib/distutils/command/config.py . What happens is that an 'empty' c file with body /* xxx */ is sent throught the preprocessor stage. Unlike the first test, which succeeds, the second test assumes that the preprocessing output can be redirected with -o _configtest.i option and checks for that filename, but MIPSPro can't do that with cc -P. This is the same situation on AIX, see https://bugs.python.org/issue11191 : it is there that they recommended skipping the test on AIX and so do we. test_fileio The failure is the test that /dev/tty's should not be fseekable, but in IRIX (and AIX and SunOS) they actually are. This has been ticketed and marked as "Won't Fix' in https://smartos.org/bugview/OS-4023 so the patch adds IRIX to the list of fseekable /dev/tty OS'ses. test_gzip A checksum error in the gzip file manifests this bug, but this bug is a bit ethereal. It usually happens when the system is running for some time causing the random filename generator in the unittest module to produce filenames with 13 characters instead of 12 because it generates the filename from the PID the test_gzip.py program instance is given. It then turns out that for some filename sizes in the gzip module the fseeko/fseek64 function produces wrong results, i.e. misses the target offset by 8 bytes, so the patch fixes that by falling back on fgetpos/fsetpos. This might be relevant for more libraries and programs, even outside Python... test_httpservers The bug is that paths without trailing slashes aren't suppose to work, but yet they do. test_io In test_io.check_interrupted_write() there is a problem as described in https://bugs.python.org/issue12429 . The read thread will sometimes fail reading one byte because the pipe isn't filled yet from the write thread, a classic race condition. Some freeBSD versions have this problem as well, and they skipped the test for these... test_locale This bug apparently manifests IRIX failure setting a locale. If setting it to 'en_US' the 'setlocale' is okay, but subsequent number formatting using this locale fails, notably the thousands separator. Cooked locales do work fine. I've tried to add 'en_US.ISO8859-15' to the list of admissible IRIX locales but that didn't work. test_multiprocessing This fails for ordinary users, but succeeds for root. Has to do with semaphore file creation on the filesystem. What most people have done is to change the leading slash of the semaphore filename in SEM_CREAT (macro for sem_open) in Modules/_multiprocessing/semaphore.c to '/tmp/', so the semaphore is on a path in /tmp folder. I don't know if this fixes everything, but since it's being used by other Modules, we'll soon find out :-) test_os This failure in test_unset_error is looking at the return value of unsetenv but IRIX doesn't have unsetenv returning an int. This is fixed in the patch adding a setenv/unsetenv function from Michael Kerrisk's proc/setenv.c and thanks to the contributors in the discussion from http://forums.irixnet.org/thread-201.html test_posix Two failures: The first one involves testing for chown operations by users. The python script expects them to fail since users cannot chown files to other users in BSD type chown, however the chown on IRIX is from System V and it allows chowning files to other users. There are two possible fixes for this particular bug: 1) Add IRIX to line 341 of Lib/test/test_posix.py: elif platform.system() in ('HP-UX', 'SunOS', 'IRIX'): This skips the test for IRIX systems 2) Issue as root: systune restricted_chown 1 and reboot the system This will change the behavior of chown to BSD type: ordinary users cannot chown files to other users. Since this also is a security risk if they can do this, it is recommended to always set this kernel parameter. The second failure is reopening a read-only file descriptor as write-only via posix.fdopen. POSIX implementations should get an EINVAL error but IRIX doesn't do that and flips the file descriptor to write-only. So this is clearly a bug and the patch skips this test. test_signal Can't reproduce this one yet with OPT=-g. Suspect a race condition. test_time This is a bug in which IRIX mktime() is been given a negative time of -2. IRIX' mktime implementation is incomplete and will return -1 for every negative number. I have fixed this by adding a separate my_mktime() function as C code. Also, because the python module uses the weekday as a sentinel for checking if the mk_time function has actually done something, i added the weekday code calculation as well. test_urllib2_localnet Can't reproduce this one yet with OPT=-g but i think i've fixed this with a kernel parameter: systune rlimit_nofile_cur 400 (instead of 200) (i don't see it on certain builds anymore: Race condition?) S/N VER PORTER Date --------------------------------------------------------------- 1 2.3.3 squeen ? 28-01-2004 2 2.3.4 07-09-2004 3 2.4.1 Jeremy Meng (voidfoo at cwazy.co.uk) 03-09-2005 4 2.5.2 Pete Plank (neko@nekochan.net) 12-08-2008 8 2.7.3 Rainer Canavan (nekoware@canavan.de) 05-12-2012 2.7.4 Rainer Canavan (nekoware@canavan.de) 2.7.6 Rainer Canavan (nekoware@canavan.de) 2.7.8 Rainer Canavan (nekoware@canavan.de) 2.7.10 Rainer Canavan (nekoware@canavan.de) 2.7.11 Rainer Canavan (nekoware@canavan.de) 2071200 2.7.12 Rainer Canavan (nekoware@canavan.de) 03-07-2016 14 2.7.16 Frank Everdij (dexter1@gmail.com) 02-01-2020