make_css_property_names et al fail mysteriously if gperf unavailable |
|||||||
Issue description
OS: Linux
What steps will reproduce the problem?
(1) fresh checkout of chromium (no previously installed build tools)
(2) ninja -C etc. webkit_layout_tests
What is the expected result?
Build succeeds
OR
When build fails, it prints a useful error which describes the error (in this case, I need to install gperf with build/install-build-deps.sh )
What happens instead?
Unhelpful stacktrace from python with no mention of missing gperf:
[48/17064] ACTION //third_party/WebKit/Source/core:make_core_generated_css_property_names(//build/toolchain/linux:clang_x64)
FAILED: gen/blink/core/CSSPropertyNames.cpp gen/blink/core/CSSPropertyNames.h
python ../../third_party/WebKit/Source/build/scripts/make_css_property_names.py ../../third_party/WebKit/Source/core/css/CSSProperties.in --output_dir gen/blink/core --gperf gperf
Traceback (most recent call last):
File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 238, in <module>
in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv)
File "/usr/local/google/home/djd/chromium/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 108, in main
writer.write_files(options.output_dir)
File "/usr/local/google/home/djd/chromium/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 60, in write_files
self._write_file_if_changed(output_dir, generator(), file_name)
File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 233, in generate_implementation
gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[79/17064] CXX obj/third_party/angle/libANGLE/Caps.o
,
Nov 20 2016
,
Nov 21 2016
,
Nov 21 2016
Is this something we actually care about? Chrome uses a non-standard build process (i.e. not ./configure && make) so to get into this state I think you'd have to follow the build steps but skip some steps, which seems like user error to me. I'd expect there are lots more non-obvious errors by having varying sets of build dependencies missing.
,
Nov 22 2016
Yes. You don't have to actually do anything useful, but you should atleast report a useful error message. One solution is to just add "shell=True" to that command line. I assume you don't want to do this because you want it to work well on Windows. Hence you can use this patch -> https://codereview.chromium.org/2521893002/
,
Nov 22 2016
build/install-build-deps.sh is part of setting up a build environment.
,
Dec 1 2016
gperf being installed via build/install-build-deps.sh doesn't excuse you from returning useful error messages. How did I know that I have to run build/install-build-deps.sh after you CL added gperf as a required dependency? What if I accidently uninstalled gperf, how do I know that this is a missing dependency error? The current error message is "OSError: [Errno 2] No such file or directory" which normally means a missing file - not a missing executable. It took two people ~15 minutes of wasted time because this error message is so poor.
,
Dec 1 2016
I even created a fix for you (which took ~5 minutes) -> https://codereview.chromium.org/2521893002/
,
Dec 1 2016
gperf has been required at least since Blink was WebKit, and probably long before that. The error's coming from subprocess.Popen(), so it seems pretty clear to me what's not found. But /shrug.
,
Jan 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7eb63c7a0993f13b444e4a2fda274d0d7df9a576 commit 7eb63c7a0993f13b444e4a2fda274d0d7df9a576 Author: tansell <tansell@chromium.org> Date: Tue Jan 31 17:28:33 2017 webkit: Catch OSError for when gperf isn't avaliable. Previously the error output would look like this; ---- [48/17064] ACTION //third_party/WebKit/Source/core:make_core_generated_css_property_names(//build/toolchain/linux:clang_x64) FAILED: gen/blink/core/CSSPropertyNames.cpp gen/blink/core/CSSPropertyNames.h python ../../third_party/WebKit/Source/build/scripts/make_css_property_names.py ../../third_party/WebKit/Source/core/css/CSSProperties.in --output_dir gen/blink/core --gperf gperf Traceback (most recent call last): File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 238, in <module> in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) File "/usr/local/google/home/djd/chromium/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 108, in main writer.write_files(options.output_dir) File "/usr/local/google/home/djd/chromium/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 60, in write_files self._write_file_if_changed(output_dir, generator(), file_name) File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 233, in generate_implementation gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True) File "/usr/lib/python2.7/subprocess.py", line 710, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory [79/17064] CXX obj/third_party/angle/libANGLE/Caps.o ---- ninja: Entering directory `out/Release' [2/3] ACTION //third_party/WebKit/Source/core:make_core_generated_css_property_names(//build/toolchain/linux:clang_x64) FAILED: python ../../third_party/WebKit/Source/build/scripts/make_css_property_names.py ../../third_party/WebKit/Source/core/css/CSSProperties.in --output_dir gen/blink/core --gperf gperf --key-positions=*: gperf: command not found Traceback (most recent call last): File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 238, in <module> in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) File "/fast/chrome/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 108, in main writer.write_files(options.output_dir) File "/fast/chrome/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 60, in write_files self._write_file_if_changed(output_dir, generator(), file_name) File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 234, in generate_implementation return subprocess.check_output(gperf_args, universal_newlines=True, shell=True) File "/usr/lib/python2.7/subprocess.py", line 573, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['gperf', '--key-positions=*', '-P', '-n', '-m', '50', '-D']' returned non-zero exit status 127 ---- BUG= 666161 Review-Url: https://codereview.chromium.org/2521893002 Cr-Commit-Position: refs/heads/master@{#447256} [modify] https://crrev.com/7eb63c7a0993f13b444e4a2fda274d0d7df9a576/third_party/WebKit/Source/build/scripts/make_css_property_names.py
,
Feb 13 2017
tansell - Is this now fixed? If not, what remains?
,
Feb 13 2017
I ran into this the other day and was confused because I thought my change had landed. Turned out I also needed to make the same change in third_party/WebKit/Source/build/scripts/make_css_value_keywords.py See https://codereview.chromium.org/2521893002 Once that lands, this can be marked as fixed.
,
Feb 13 2017
Sorry that should have been https://codereview.chromium.org/2521893002
,
Feb 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9eb78b78bdc41b99596e1b03c40e8eabfa6fe957 commit 9eb78b78bdc41b99596e1b03c40e8eabfa6fe957 Author: tansell <tansell@chromium.org> Date: Mon Feb 13 22:08:21 2017 webkit: Catch OSError for when gperf isn't avaliable. This was fixed for make_css_property_names.py in https://crrev.com/2521893002 but I missed make_css_value_keywords.py which also needed the change. Previously the error output would look like this; ---- [48/17064] ACTION //third_party/WebKit/Source/core:make_core_generated_css_property_names(//build/toolchain/linux:clang_x64) FAILED: gen/blink/core/CSSPropertyNames.cpp gen/blink/core/CSSPropertyNames.h python ../../third_party/WebKit/Source/build/scripts/make_css_property_names.py ../../third_party/WebKit/Source/core/css/CSSProperties.in --output_dir gen/blink/core --gperf gperf Traceback (most recent call last): File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 238, in <module> in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) File "/usr/local/google/home/djd/chromium/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 108, in main writer.write_files(options.output_dir) File "/usr/local/google/home/djd/chromium/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 60, in write_files self._write_file_if_changed(output_dir, generator(), file_name) File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 233, in generate_implementation gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True) File "/usr/lib/python2.7/subprocess.py", line 710, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory [79/17064] CXX obj/third_party/angle/libANGLE/Caps.o ---- ninja: Entering directory `out/Release' [2/3] ACTION //third_party/WebKit/Source/core:make_core_generated_css_property_names(//build/toolchain/linux:clang_x64) FAILED: python ../../third_party/WebKit/Source/build/scripts/make_css_property_names.py ../../third_party/WebKit/Source/core/css/CSSProperties.in --output_dir gen/blink/core --gperf gperf --key-positions=*: gperf: command not found Traceback (most recent call last): File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 238, in <module> in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) File "/fast/chrome/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 108, in main writer.write_files(options.output_dir) File "/fast/chrome/src/third_party/WebKit/Source/build/scripts/in_generator.py", line 60, in write_files self._write_file_if_changed(output_dir, generator(), file_name) File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 234, in generate_implementation return subprocess.check_output(gperf_args, universal_newlines=True, shell=True) File "../../third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 242, in generate_implementation raise subprocess.CalledProcessError(127, gperf_args, output='Command not found.') subprocess.CalledProcessError: Command '['gperf', '--key-positions=*', '-P', '-n', '-m', '50', '-D']' returned non-zero exit status 127 ---- BUG= 666161 Review-Url: https://codereview.chromium.org/2691083003 Cr-Commit-Position: refs/heads/master@{#450111} [modify] https://crrev.com/9eb78b78bdc41b99596e1b03c40e8eabfa6fe957/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py
,
Feb 13 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by tansell@chromium.org
, Nov 17 2016Components: Blink>CSS