homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Useless error message when distutils fails compiling
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: alexis, eric.araujo, pitrou, python-dev, tarek
Priority: normal Keywords: patch

Created on 2011年03月18日 18:33 by pitrou, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix-11599.diff eric.araujo, 2011年08月18日 17:10
Messages (10)
msg131352 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011年03月18日 18:33
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 compile
 self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
 File "/home/antoine/cpython/default/Lib/distutils/unixccompiler.py", line 178, in _compile
 raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
msg131601 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011年03月21日 01:43
It appears a choice has been made to print only the first argument in the error messages; attached patch changes that, please test.
msg131602 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011年03月21日 01:50
> It appears a choice has been made to print only the first argument in
> the error messages; attached patch changes that, please test.
Well, I don't have the failing setup at hand anymore, but the patch
looks reasonable to me. Thank you!
msg138172 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011年06月11日 18:01
New changeset 3ba34c03f2fc by Éric Araujo in branch 'default':
Adjust logging in packaging.util.spawn (related to #11599)
http://hg.python.org/cpython/rev/3ba34c03f2fc 
msg138178 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011年06月11日 18:06
I intend to ask on distutils-sig whether doing the change in distutils would break code.
msg159314 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012年04月25日 16:28
Ping.
msg159319 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012年04月25日 16:59
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.
msg213343 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014年03月13日 02:20
New changeset 37bca30c3e19 by Éric Araujo in branch '2.7':
Make distutils error messages more helpful (#11599).
http://hg.python.org/cpython/rev/37bca30c3e19 
msg213379 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014年03月13日 10:02
New changeset 43b06352221b by Éric Araujo in branch '3.3':
Make distutils error messages more helpful (#11599).
http://hg.python.org/cpython/rev/43b06352221b
New changeset c04260b59e8c by Éric Araujo in branch 'default':
Merge 3.3 (#11599)
http://hg.python.org/cpython/rev/c04260b59e8c 
msg213380 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014年03月13日 10:03
Fixed!
History
Date User Action Args
2022年04月11日 14:57:15adminsetgithub: 55808
2020年11月16日 19:17:15iritkatriellinkissue4672 superseder
2014年03月13日 10:03:44eric.araujosetstatus: open -> closed
versions: + Python 3.4, - 3rd party, Python 3.2
messages: + msg213380

components: - Distutils2
resolution: fixed
stage: needs patch -> resolved
2014年03月13日 10:02:28python-devsetmessages: + msg213379
2014年03月13日 02:20:01python-devsetmessages: + msg213343
2012年04月25日 16:59:00eric.araujosetmessages: + msg159319
versions: - Python 3.1
2012年04月25日 16:28:11pitrousetmessages: + msg159314
2011年08月18日 17:10:10eric.araujosetfiles: + fix-11599.diff
2011年08月18日 17:09:47eric.araujosetfiles: - fix-compile-error-messages.diff
2011年06月11日 18:06:38eric.araujosetassignee: tarek -> eric.araujo
messages: + msg138178
2011年06月11日 18:01:43python-devsetnosy: + python-dev
messages: + msg138172
2011年03月21日 01:50:49pitrousetnosy: pitrou, tarek, eric.araujo, alexis
messages: + msg131602
2011年03月21日 01:43:03eric.araujosetfiles: + fix-compile-error-messages.diff

components: + Distutils2
versions: + 3rd party
keywords: + patch
nosy: + alexis

messages: + msg131601
2011年03月18日 18:33:56pitroucreate

AltStyle によって変換されたページ (->オリジナル) /