$ echo "#include <sanitizer/asan_interface.h>" >a.c $ cc -fsanitize=address -c a.c $ clang10 -fsanitize=address -c a.c a.c:1:10: fatal error: 'sanitizer/asan_interface.h' file not found #include <sanitizer/asan_interface.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Found via Firefox's --enable-address-sanitizer: In file included from ipc/glue/BackgroundChildImpl.cpp:13: In file included from objdir/dist/include/CamerasChild.h:20: In file included from media/webrtc/trunk/webrtc/modules/video_capture/video_capture_defines.h:15: In file included from media/webrtc/trunk/webrtc/modules/include/module_common_types.h:20: In file included from media/webrtc/trunk/webrtc/api/optional.h:25: In file included from media/webrtc/trunk/webrtc/rtc_base/sanitizer.h:32: objdir/dist/system_wrappers/sanitizer/asan_interface.h:3:15: fatal error: 'sanitizer/asan_interface.h' file not found #include_next <sanitizer/asan_interface.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
We do install it so I think that means firefox isn't discovering the include directory correctly. They should be using `llvm-config10 --includedir` rather than praying the llvm bits are in the include path.
ASan is a Clang feature. Why llvm-config is required? $ CFLAGS=-fsanitize=address CC=clang10 CXX=clang++10 make clean all BATCH= -C/usr/ports/multimedia/aom [...] In file included from common/ivfdec.c:19: aom_ports/sanitizer.h:32:10: fatal error: 'sanitizer/asan_interface.h' file not found #include <sanitizer/asan_interface.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
Passing -DCOMPILER_RT_INSTALL_PATH:STRING=lib/clang/${DISTVERSION} like PkgSrc should help. It'd be also consistent with FreeBSD base Clang.
A commit references this bug: Author: brooks Date: Tue Jul 28 18:52:13 UTC 2020 New revision: 543629 URL: https://svnweb.freebsd.org/changeset/ports/543629 Log: Upgrade to 10.0.1 release. Fix sanitizer runtime install location. [0] PR: 245542 [0] Reported by: jbeich [0] Sponsored by: DARPA Changes: head/devel/llvm10/Makefile head/devel/llvm10/distinfo head/devel/llvm10/files/compiler-rt/patch-.._compiler-rt-10.0.0.src_lib_sanitizer__common_sanitizer__platform__interceptors.h head/devel/llvm10/files/compiler-rt/patch-.._compiler-rt-10.0.1.src_lib_sanitizer__common_sanitizer__platform__interceptors.h head/devel/llvm10/pkg-plist
^Triage: Brookes, is this now resolved?
Believed to be fixed and no feedback to the contrary.