I believe this is due to 11.2 containing a newer version of LLVM. If I add the following to the Makefile, the build completes successfully. Makefile Diff ... --- Makefile.old 2018-05-17 11:45:28.661295000 -0500 +++ Makefile 2018-05-17 11:45:45.353226000 -0500 @@ -39,6 +39,9 @@ CXXFLAGS+= -Wno-tautological-undefined-compare .if ${COMPILER_VERSION} >= 36 CXXFLAGS+= -Wno-unused-local-typedef +.if ${COMPILER_VERSION} >= 60 +CXXFLAGS+= -Wno-null-pointer-arithmetic -Wno-vexing-parse +.endif .endif .endif .endif Source code diff ( not sure how to make that conditional on clang 6.0 ) ... --- src/stub-cache.cc.old 2018-05-17 12:13:38.104285000 -0500 +++ src/stub-cache.cc 2018-05-17 12:13:53.180471000 -0500 @@ -1474,7 +1474,7 @@ Handle<Name> name) { return (FLAG_print_code_stubs && !name.is_null() && name->IsString()) ? GetCodeWithFlags(flags, *Handle<String>::cast(name)->ToCString()) - : GetCodeWithFlags(flags, reinterpret_cast<char*>(NULL)); + : GetCodeWithFlags(flags, static_cast<char*>(NULL)); }
Please try https://people.FreeBSD.org/~sunpoet/patch/lang-v8.txt
Yes. After applying that diff to the ports tree, it appears to build correctly on 11.2-RC3. Thanks for putting that together. Note: I posted a similar patch for mongodb which also fails to build with a newer version of clang.
A commit references this bug: Author: sunpoet Date: Tue Jun 19 21:46:27 UTC 2018 New revision: 472824 URL: https://svnweb.freebsd.org/changeset/ports/472824 Log: Fix build with Clang 6 PR: 228320 Submitted by: Matthew Grooms <mgrooms@shrew.net> Changes: head/lang/v8/Makefile head/lang/v8/files/extra-patch-src-stub-cache.cc
Committed. Thanks!