You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Useless error message when distutils fails compiling #55808
Really, can't distutils at least display the command-line that failed to execute?
Traceback (most recent call last):
File "/home/antoine/cpython/default/Lib/distutils/unixccompiler.py", line 176, in _compile
extra_postargs)
File "/home/antoine/cpython/default/Lib/distutils/ccompiler.py", line 911, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/antoine/cpython/default/Lib/distutils/spawn.py", line 34, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/antoine/cpython/default/Lib/distutils/spawn.py", line 138, in _spawn_posix% (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/antoine/cpython/default/Lib/test/test_embed.py", line 42, in test_subinterps
exe =self.make_exe("embed1.c")
File "/home/antoine/cpython/default/Lib/test/test_embed.py", line 29, in make_exe
compiler.compile([srcpath], output_dir=build_dir)
File "/home/antoine/cpython/default/Lib/distutils/ccompiler.py", line 576, in compileself._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/antoine/cpython/default/Lib/distutils/unixccompiler.py", line 178, in _compileraise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
I will apply this this week; I don’t think I need to ask the ML after all, the output is already different when you run with DISTUTILS_DEBUG — and it’s debug mode anyway, not regular use, so I don’t foresee any compat issue.
Activity
pitrou commentedon Mar 18, 2011
Really, can't distutils at least display the command-line that failed to execute?
merwok commentedon Mar 21, 2011
It appears a choice has been made to print only the first argument in the error messages; attached patch changes that, please test.
pitrou commentedon Mar 21, 2011
Well, I don't have the failing setup at hand anymore, but the patch
looks reasonable to me. Thank you!
python-dev commentedon Jun 11, 2011
New changeset 3ba34c03f2fc by Éric Araujo in branch 'default':
Adjust logging in packaging.util.spawn (related to bpo-11599)
http://hg.python.org/cpython/rev/3ba34c03f2fc
merwok commentedon Jun 11, 2011
I intend to ask on distutils-sig whether doing the change in distutils would break code.
pitrou commentedon Apr 25, 2012
Ping.
merwok commentedon Apr 25, 2012
I will apply this this week; I don’t think I need to ask the ML after all, the output is already different when you run with DISTUTILS_DEBUG — and it’s debug mode anyway, not regular use, so I don’t foresee any compat issue.
python-dev commentedon Mar 13, 2014
New changeset 37bca30c3e19 by Éric Araujo in branch '2.7':
Make distutils error messages more helpful (bpo-11599).
http://hg.python.org/cpython/rev/37bca30c3e19
python-dev commentedon Mar 13, 2014
New changeset 43b06352221b by Éric Araujo in branch '3.3':
Make distutils error messages more helpful (bpo-11599).
http://hg.python.org/cpython/rev/43b06352221b
New changeset c04260b59e8c by Éric Araujo in branch 'default':
Merge 3.3 (bpo-11599)
http://hg.python.org/cpython/rev/c04260b59e8c
merwok commentedon Mar 13, 2014
Fixed!