$ poudriere jail -cj clang8 -v projects/clang800-import -m svn+https $ poudriere testport -j clang8 devel/llvm40 [...] tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6275:24: error: a lambda parameter cannot shadow an explicitly captured entity CodeGenFunction &CGF, PrePostActionTy &) { ^ tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6321:62: error: a lambda parameter cannot shadow an explicitly captured entity auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF, ^ tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6400:56: error: a lambda parameter cannot shadow an explicitly captured entity auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) { ^ http://package18.nyi.freebsd.org/data/headamd64PR236062-default/2019-03-01_06h42m53s/logs/errors/llvm40-4.0.1_12.log
Reminder: Clang 8 was merged to 13.0-CURRENT in base r344779. Maintainers, expect pkg-fallout@ mail soon.
I get totally different compile errors on this port, which seems to be compiled with g++5 by default? FAILED: lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o /usr/local/bin/g++5 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Demangle -I/wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle -Iinclude -I/wrkdirs/share/dim/ports/deve /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp: In instantiation of 'const char* parse_floating_number(const char*, const char*, C&) [with Float = float; C = {anonymous}::Db]': /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:2422:51: required from 'const char* parse_expr_primary(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:2926:33: required from 'const char* parse_expression(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:1517:39: required from 'const char* parse_array_type(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:1702:31: required from 'const char* parse_type(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:4180:31: required from 'void demangle(const char*, const char*, C&, int&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:4242:65: required from here /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:142:23: error: 'snprintf' was not declared in this scope int n = snprintf(num, sizeof(num), float_data<Float>::spec, value); ^ /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp: In instantiation of 'const char* parse_floating_number(const char*, const char*, C&) [with Float = double; C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:2427:52: required from 'const char* parse_expr_primary(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:2926:33: required from 'const char* parse_expression(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:1517:39: required from 'const char* parse_array_type(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:1702:31: required from 'const char* parse_type(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:4180:31: required from 'void demangle(const char*, const char*, C&, int&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:4242:65: required from here /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:142:23: error: 'snprintf' was not declared in this scope /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp: In instantiation of 'const char* parse_floating_number(const char*, const char*, C&) [with Float = long double; C = {anonymous}:/wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:2432:57: required from 'const char* parse_expr_primary(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:2926:33: required from 'const char* parse_expression(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:1517:39: required from 'const char* parse_array_type(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:1702:31: required from 'const char* parse_type(const char*, const char*, C&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:4180:31: required from 'void demangle(const char*, const char*, C&, int&) [with C = {anonymous}::Db]' /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:4242:65: required from here /wrkdirs/share/dim/ports/devel/llvm40/work/llvm-4.0.1.src/lib/Demangle/ItaniumDemangle.cpp:142:23: error: 'snprintf' was not declared in this scope
Oh I see, there is this horrid hack in the port Makefile: # Force GCC 5 on non-clang systems because GCC 8 won't compile this code. .if exists(/usr/lib/libstdc++.so) USE_GCC= 5 .endif Apparently gcc 8 also doesn't like the code :)
(In reply to Dimitry Andric from comment #2) > lib/Demangle/ItaniumDemangle.cpp:142:23: error: 'snprintf' was not declared in this scope > int n = snprintf(num, sizeof(num), float_data<Float>::spec, value); ^ Maybe caused by bug 193528. Can you reproduce with later GCC versions?
Created attachment 202672 [details] Apply upstream r291939 to fix lambda issues Here's a patch which fixes the compilation issues, adapted from upstream <https://reviews.llvm.org/rL291939>.
A commit references this bug: Author: brooks Date: Thu Mar 7 17:25:30 UTC 2019 New revision: 494964 URL: https://svnweb.freebsd.org/changeset/ports/494964 Log: Apply upstream r291939 to fix lambda issues. This fixes build with clang 8.0.0. PR: 236193 Submitted by: dim Changes: head/devel/llvm40/Makefile head/devel/llvm40/files/clang-patch-svn-r291939