Python 2.2 install on Sun5.6

Laina tankgirl at coranthia.org
Tue Jan 15 13:48:17 EST 2002


I have downloaded Python 2.2, and I am in the process of trying to
install it on a Sparc machine running SunOS 5.6.  I had previously
downloaded and installed the gcc binary, version 2.95.3.  I was
experiencing problems compiling some of the code, but that was because
gcc was not using the appropriate include files.  With that problem
fixed, I am now getting an error right after it tries to build the
struct extension.  Below is the output I get to the screen:

.....
case $MAKEFLAGS in \
*-s*) CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall
-Wstrict-prototypes' ./python -E ./setup.py -q build;; \
*) CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall
-Wstrict-prototypes' ./python -E ./setup.py build;; \
esac
running build
running build_ext
start
building 'struct' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I.
-I/export/home/local/src/Python-2.2/./Include
-I/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/include
-I/export/home/local/src/Python-2.2/./Include -I/usr/local/include
-IInclude/ -c /export/home/local/src/Python-2.2/Modules/structmodule.c
-o build/temp.solaris-2.6-sun4u-2.2/structmodule.o
gcc -shared build/temp.solaris-2.6-sun4u-2.2/structmodule.o
-L/export/home/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3
-L/usr/local/lib -o build/lib.solaris-2.6-sun4u-2.2/struct.so
Segmentation Fault - core dumped
make: *** [sharedmods] Error 139

     If I run make again, I get:

case $MAKEFLAGS in \
*-s*) CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall
-Wstrict-prototypes' ./python -E ./setup.py -q build;; \
*) CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall
-Wstrict-prototypes' ./python -E ./setup.py build;; \
esac
running build
running build_ext
start
skipping 'struct' extension (up-to-date)
Segmentation Fault - core dumped
make: *** [sharedmods] Error 139

     so I assume that struct got built correctly, and that this is not
the problem.

     I have been trying to do some debugging myself, as to why it
might be core dumping.  I modified the
Lib/distutils/commands/build_ext.py file, adding in some simple print
statements.  Maybe I'm missing something extremely simple here, but I
haven't been able to tell.  Here is some of the code from build_ext.py

....
    def build_extensions(self): 
 
        # First, sanity-check the 'extensions' list 
        self.check_extensions_list(self.extensions) 
 
        for ext in self.extensions: 
            print "start"                        <<ADDED BY ME
            self.build_extension(ext) 
            print "done"                         <<ADDED BY ME
........

     I get the "start" statement output to the screen, but I don't get
the "done" statement.  So, at first I had figured that it was crashing
in the build_extension function, but that doesn't seem to be the case,
as I had added in debug statements at the return points in the
function, and they were appropriately output to the screen.  So, I'm
confused.  If you could help shed some light on my situation, I'd be
most appreciative.

Thanks



More information about the Python-list mailing list