Build failure on Ubuntu 20.04 (v8 10.0.139.15), likely due to clang upgrade

55 views
Skip to first unread message

Tudor Bosman

unread,
Apr 20, 2022, 4:10:51 PM4/20/22
to v8-dev
Hello,

It seems to me that a recent clang upgrade made -Wextra more strict and v8 now fails to build:


../../src/heap/mark-compact.cc:4748:10: error: variable 'aborted_pages_verified' set but not used [-Werror,-Wunused-but-set-variable]

size_t aborted_pages_verified = 0;

^

1 error generated.


These are the commands I'm using to build:

export PATH="/src/depot_tools:$PATH"
echo "--- leafagg_dev building v8 -- $(date -Iseconds)" \
    && apt-get -qq install python2 \
    && cd /src \
    && git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git \
    && hash -r \
    && mkdir v8 \
    && cd v8 \
    && fetch v8 \
    && gclient sync \
    && cd v8 \
    && git checkout 10.0.139.15 \
    && python2 tools/dev/v8gen.py x64.release.sample -- use_rtti=true \
    && ninja -C out.gn/x64.release.sample v8_monolith

Full logs (long and spammy).

Any suggestions?

Thank you,
-Tudor.

Tudor Bosman

unread,
Apr 20, 2022, 4:24:30 PM4/20/22
to v8-dev
Note that this happens in release mode (with assertions disabled); the variable aborted_pages_verified is used in a DCHECK.

Glog defines DCHECK in release mode carefully so it doesn't trigger this warning; v8 defines it as ((void)0).

Still, any suggestions?

Thanks,
-Tudor.

Tudor Bosman

unread,
Apr 20, 2022, 5:52:28 PM4/20/22
to v8-dev
Never mind, this was my fault -- I need to run "gclient sync" after checking out the desired v8 version, not before, so it uses the correct versions of dependent packages (including clang).

Thanks,
-Tudor.

Reply all
Reply to author
Forward
0 new messages