pip install fails for OSX machine with no compiler #1074

Closed
matthew-brett opened this Issue Jun 6, 2014 · 4 comments

2 participants

@matthew-brett

On an OSX 10.6 machine with no compiler installed:

$ python setup.py build                                                                              
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 183, in <module>
    **kwargs
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 85, in run
    build_ext.run(self)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 307, in run
    customize_compiler(self.compiler)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 170, in customize_compiler
    _osx_support.customize_compiler(_config_vars)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.py", line 418, in customize_compiler
    _find_appropriate_compiler(_config_vars)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.py", line 191, in _find_appropriate_compiler
    "Cannot locate working compiler")
SystemError: Cannot locate working compiler

This seems to be because the customize_compiler step is now failing, rather than the build_extension step, and the check / fallback routine overrides build_ext.build_extension. Thus the build_ext.run command fails before it gets to the check / fallback routine.

@bdarnell
tornadoweb member

Which version of Tornado is this? This was supposed to be fixed in 3.2.1.

@matthew-brett

Current master. When I submitted that fix, it worked, but checking out 3.2.1 now gives the same error. I wonder whether something changed in distutils?

@bdarnell
tornadoweb member

Hmm, maybe the exception is coming from a different place now? Perhaps the except clause at https://github.com/tornadoweb/tornado/blob/master/setup.py#L86 needs to catch build_errors instead.

@matthew-brett

For example - works OK on older Python 2.7.3 I have to hand.

@bdarnell bdarnell added a commit that closed this issue Jun 7, 2014
@bdarnell bdarnell Broaden catch clause in extension building.
This should allow Tornado to be installed again on OSX with no
compiler available.

Closes #1074.
9fa52d7
@bdarnell bdarnell closed this in 9fa52d7 Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment