[Python-Dev] Solaris 8
Fri, 13 Jul 2001 17:08:55 +0200
After much frobbing, I managed to compile Python using the SUNpro compiler
as well as gcc. gcc was no problem, asside from the inability to link with
static libraries as if they were shared, but the Sun compiler (which is an
optional, fairly expensive piece of software, IIRC :) is a nasty little
It defaults to a half-ANSI, half-K&R mode with Sun extentions, that has
broken thread support and refuses to compile most of the modules because of
ANSI-style token-stringification and -concatenation ('#x' and 'x ## y').
Adding '-mt' to the flags, as suggested by the README, didn't help much.
Passing '-Xa' to the compiler switches it into an
ANSI-compliant-with-Sun-extentions mode, and though threads were still
broken, I managed to compile Python and most of the modules. And it
remarkably passed all the tests it could find: all 6 of them. For some
reason (I couldn't figure it out for the life of me) 'readdir' silently
chopped off the first two characters of the entry name, causing the
'findtests' function in the regrtest to not find any tests besides the
standard ones. Sounds like a mismatch between include-files and structs
actually used by the operating system, but none of the manual pages hinted
to anything like it.
Finally, '-Xc' turns it into a strictly ANSI compiler, though apparently not
as strict as 'gcc -ansi': it compiles with only a few warnings, passes all
tests, and with '-mt' it even had working thread suport! There seems to be
only one oddness: audioop.so uses sqrt() without being linked to libm,
though why this isn't an issue on other systems, I'm not sure. I've added a
blob to the 2.1.1 README to mention this all (but not in time for the
2.1.1c1 release), and will add it to the 2.2 one as soon as I've tested that
tree on Solaris, too.
Thomas Wouters <firstname.lastname@example.org>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!