Created attachment 185824 [details] src/llvm_wrapper/llvm_wrapper.cpp (preprocessed, compressed) $ pkg install llvm40 cmake sdl2 git $ cd /tmp $ git clone https://github.com/programmerjake/vulkan-cpu $ cd vulkan-cpu $ cmake . $ make [...] [ 2%] Building CXX object src/llvm_wrapper/CMakeFiles/vulkan_cpu_llvm_wrapper.dir/llvm_wrapper.cpp.o cd /tmp/vulkan-cpu/src/llvm_wrapper && /usr/bin/CC -I/usr/local/llvm40/include -I/tmp/vulkan-cpu/src -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Wall -ftemplate-depth=1024 -Werror "-Wno-error=#warnings" -std=gnu++14 -o CMakeFiles/vulkan_cpu_llvm_wrapper.dir/llvm_wrapper.cpp.o -c /tmp/vulkan-cpu/src/llvm_wrapper/llvm_wrapper.cpp Assertion failed: (Replacement.isCanonical() && "replacement types must always be canonical"), function getSubstTemplateTypeParmType, file /poudriere/jails/head-amd64/usr/src/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp, line 3520. c++: error: unable to execute command: Abort trap c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 5.0.0 (trunk 308421) (based on LLVM 5.0.0svn) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin c++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. c++: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: c++: note: diagnostic msg: /tmp/llvm_wrapper-eb0531.cpp c++: note: diagnostic msg: /tmp/llvm_wrapper-eb0531.sh c++: note: diagnostic msg: ******************** *** Error code 254
Created attachment 185825 [details] command line args (for clang 5.0) clang++40 from devel/llvm40 is not affected.
I can still reproduce with more recent -CURRENT snapshot. $ c++ -v FreeBSD clang version 5.0.0 (branches/release_50 311606) (based on LLVM 5.0.0svn) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin
Given devel/llvm50 port is still missing (-devel snapshot is too old to be of any use) I can't check if the issue is due to libLLVM and Clang mismatch.
This also reproduces with upstream trunk r311836. I'll bisect and/or minimize.
Reported upstream: https://bugs.llvm.org/show_bug.cgi?id=34343
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
https://github.com/llvm/llvm-project/issues/33691 was finally closed, but it was fixed a while ago in clang 14.0.0. We still use 13.0.0 in 12.4-RELEASE, but it doesn't have assertions enabled, so I think this failure should no longer occur.