Py 3.3.2, MacBookPro, segmentation fault, GCC issue?

J

John Ladasky

I am trying to help a student of mine install Python 3 on his MacBook Pro. The installation succeeds. However, upon opening the Python interpreter, he can only execute one Python command successfully. On the second command, the interpreter crashes, giving the error "Segmentation fault: 11".

I have installed Python 3 on Linux and on Windows before, but I have no prior experience with Macs. I know that OSX is Unix-like, but I'm sure that there are significant differences between the Linux that I normally use and OSX.

My student's computer is configured as follows: MacBook Pro, 2.5 GHz Intel Core i5, 4 GB RAM 1600 MHz DDR3, OS X 10.9. We installed the Python 3.3.2 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and later) from http://python.org/download.

The Python interpreter reported the following when it was opened:

Python 3.3.2 : d047928ae3f6, May 13 2013, 13:52:24
GCC 4.2.1 (Apple Inc. build 5666) (dot3) on darwin

I do not know exactly how the Mac installer works. It seemed to operate quickly. It reported very little about what work it was actually doing. Does it install pre-compiled binaries, or does it actually build Python locally from source code? GCC 4.2.1 strikes me as OLD. According to http://gcc.gnu.org/releases.html, it was released in 2007! I would guess that the segfault is occurring because the Python interpreter was compiled using an outdated GCC.

First question: did this outdated compiler execute its work at python.org (seems unlikely), or on my student's computer (seems more likely, though still rather absurd)?

Follow-up questions: if I need a more current GCC for my student's Mac, howdo I obtain it? And are there any backwards-compatibility issues I might need to worry about if I do upgrade? From my Linux experience, upgrading GCC has never caused problems. But I want to be cautious, since this isn't my computer I'll be playing with, but someone else's.

Thanks for any advice you may have.
 
M

Mark Lawrence

I am trying to help a student of mine install Python 3 on his MacBook Pro. The installation succeeds. However, upon opening the Python interpreter, he can only execute one Python command successfully. On the second command, the interpreter crashes, giving the error "Segmentation fault: 11".

I have installed Python 3 on Linux and on Windows before, but I have no prior experience with Macs. I know that OSX is Unix-like, but I'm sure that there are significant differences between the Linux that I normally use and OSX.

My student's computer is configured as follows: MacBook Pro, 2.5 GHz Intel Core i5, 4 GB RAM 1600 MHz DDR3, OS X 10.9. We installed the Python 3.3.2 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and later) from http://python.org/download.

The Python interpreter reported the following when it was opened:

Python 3.3.2 : d047928ae3f6, May 13 2013, 13:52:24
GCC 4.2.1 (Apple Inc. build 5666) (dot3) on darwin

I do not know exactly how the Mac installer works. It seemed to operate quickly. It reported very little about what work it was actually doing. Does it install pre-compiled binaries, or does it actually build Python locally from source code? GCC 4.2.1 strikes me as OLD. According to http://gcc.gnu.org/releases.html, it was released in 2007! I would guess that the segfault is occurring because the Python interpreter was compiled using an outdated GCC.

First question: did this outdated compiler execute its work at python.org (seems unlikely), or on my student's computer (seems more likely, though still rather absurd)?

Follow-up questions: if I need a more current GCC for my student's Mac, how do I obtain it? And are there any backwards-compatibility issues I might need to worry about if I do upgrade? From my Linux experience, upgrading GCC has never caused problems. But I want to be cautious, since this isn't my computer I'll be playing with, but someone else's.

Thanks for any advice you may have.

http://bugs.python.org/issue18458
 
J

John Ladasky

Thanks, Mark.

Reading through the information in your link, I appear to have encountered an actual bug specific to Python 3.3.2 and OS X 10.9. And it appears that the 3.3.3 version of Python that fixes this bug is still in beta. And thatI can have my student download the working version from here:

http://www.python.org/download/releases/3.3.3/

Does that all sound correct?
 
L

Laurent Pointal

John said:
I am trying to help a student of mine install Python 3 on his MacBook Pro.
Follow-up questions: if I need a more current GCC for my student's Mac,
how do I obtain it? And are there any backwards-compatibility issues I
might need to worry about if I do upgrade? From my Linux experience,
upgrading GCC has never caused problems. But I want to be cautious, since
this isn't my computer I'll be playing with, but someone else's.

AFAIK Apple stop delivering new gcc when it goes to GPL3 licence.
In place, they use llvm compiler tool.

See discussions and links in
http://stackoverflow.com/questions/9353444/how-to-use-install-gcc-on-mac-os-x-10-8-xcode-4-4

There may be other solutions, but you should prefer ask in a specific MacOS
usenet group.

A+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top