joyent/node — pull request #3219 by javihernandez (2012-05-04 22:22:53+00:00)
Title: Warn the user about the lack of an acceptable C compiler on the system

Hi!

I'm running under linux and I went into this error when trying to run the configure script:

Traceback (most recent call last):
File "./configure", line 327, in
configure_node(output)
File "./configure", line 235, in configure_node
o['variables']['host_arch'] = host_arch()
File "./configure", line 210, in host_arch
arch = host_arch_cc()
File "./configure", line 160, in host_arch_cc
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1228, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

My problem was that I didn't had the gcc compiler installed on my system. After getting this error, I thought that this error should be properly shown to the user in a more human-friendly way. Don't you think?

So I catched the expection, added this warning and a sys.exit(). I don't know if you'll like this way, so I'm willing to accept suggestions for changes.

Best regards!