Description
- Version: v8.x
- Platform: Linux (x64)
- Subsystem: v8
make test-v8
is not working on Linux (x64) for any v8.x version. clang thinks standard libraries are "missing". From our V8 CI:
15:03:01 In file included from ../src/setup-isolate-full.cc:7:
15:03:01 .././src/base/logging.h:8:10: fatal error: 'cstring' file not found
15:03:01 #include <cstring>
15:03:01 ^~~~~~~~~
15:03:01 In file included from ../src/base/bits.cc:5:
15:03:01 .././src/base/bits.h:9:10: fatal error: 'type_traits' file not found
15:03:01 #include <type_traits>
15:03:01 ^~~~~~~~~~~~~
15:03:01 In file included from In file included from ../src/base/cpu.cc:5:
15:03:01 In file included from .././src/base/cpu.h:16:
15:03:01 In file included from .././src/base/base-export.h:8:
15:03:01 .././include/v8config.h:16:11: fatal error: 'features.h' file not found
15:03:01 # include <features.h>
15:03:01 ^~~~~~~~~~~~
15:03:01 ../src/base/division-by-constant.cc:5:
15:03:01 In file included from .././src/base/division-by-constant.h:10:
15:03:01 In file included from .././src/base/base-export.h:8:
15:03:01 .././include/v8config.h:16:11: fatal error: 'features.h' file not found
15:03:01 # include <features.h>
15:03:01 ^~~~~~~~~~~~
15:03:01 In file included from ../src/base/debug/stack_trace.cc:5:
15:03:01 .././src/base/debug/stack_trace.h:13:10: fatal error: 'iosfwd' file not found
15:03:01 #include <iosfwd>
15:03:01 ^~~~~~~~
15:03:01 1 error generated.
What is actually happening: clang can't find any standard library because the flag --sysroot
is set to /path/to/node/deps/v8/build/linux/debian_jessie_amd64-sysroot
when it should be set either unset or set to /path/to/node/deps/v8/build/linux/debian_sid_amd64-sysroot
. Since /path/to/node/deps/v8/build/linux/debian_jessie_amd64-sysroot
don't exist, clang can't find any standard library.
I think the flag is being set on ./deps/v8/gypfiles/standalone.gypi
:
91 'conditions': [
92 # The system root for linux builds.
93 ['OS=="linux" and use_sysroot==1', {
94 'conditions': [
95 ['target_arch=="arm"', {
96 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_arm-sysroot',
97 }],
98 ['target_arch=="x64"', {
99 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_amd64-sysroot',
100 }],
101 ['target_arch=="ia32"', {
102 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_i386-sysroot',
103 }],
104 ['target_arch=="mipsel"', {
105 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_mips-sysroot',
106 }],
107 ],
108 }], # OS=="linux" and use_sysroot==1
I'm not sure why this just started to happen now, but it is blocking all V8 PRs to v8.x-staging.
Any help to solve this would be really appreciated.
/cc @targos @nodejs/v8 @nodejs/build-files
Ref: #21334