The following error occurs after 14-CURRENT df8dd6025af8. [ 15% 159/1012] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cpp.o FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cpp.o /usr/local/libexec/ccache/c++ -DHAVE_RPC_XDR_H=0 -I/wrkdirs/usr/ports/devel/llvm10/work/compiler-rt-10.0.1.src/lib/sanitizer_common/.. -O2 -pipe -Wno-misleading-indentation -Wno-tautological-overlap-compare -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DNDEBUG -isystem /usr/local/include -Wall -std=c++14 -Wno-unused-parameter -O2 -pipe -Wno-misleading-indentation -Wno-tautological-overlap-compare -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DNDEBUG -isystem /usr/local/include -m32 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cpp.o -c /wrkdirs/usr/ports/devel/llvm10/work/compiler-rt-10.0.1.src/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp In file included from /wrkdirs/usr/ports/devel/llvm10/work/compiler-rt-10.0.1.src/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp:27: In file included from /usr/include/sys/user.h:51: In file included from /usr/include/sys/proc.h:75: /usr/include/machine/proc.h:78:2: error: use of 'savefpu' with tag type that does not match previous declaration struct savefpu *md_usr_fpu_save; ^ /usr/include/x86/fpu.h:127:7: note: previous use is here union savefpu { ^ 1 error generated. [ 15% 159/1012] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_solaris.cpp.o [ 15% 159/1012] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_rtems.cpp.o [ 15% 159/1012] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_tls_get_addr.cpp.o [ 15% 159/1012] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_stoptheworld_mac.cpp.o [ 15% 159/1012] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_suppressions.cpp.o ninja: build stopped: subcommand failed. *** Error code 1 Stop. make: stopped in /usr/ports/devel/llvm10 =>> Cleaning up wrkdir ===> Cleaning for llvm10-10.0.1_7
Created attachment 228121 [details] Fix llvm10 build And now the patch.
devel/llvm9 suffers the same problem and needs the same patch. [ 15% 159/1007] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cc.o FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cc.o /usr/local/libexec/ccache/c++ -DHAVE_RPC_XDR_H=0 -I/wrkdirs/usr/ports/devel/llvm90/work/compiler-rt-9.0.1.src/lib/sanitizer_common/.. -O2 -pipe -Wno-misleading-indentation -Wno-tautological-overlap-compare -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DNDEBUG -isystem /usr/local/include -Wall -std=c++11 -Wno-unused-parameter -O2 -pipe -Wno-misleading-indentation -Wno-tautological-overlap-compare -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DNDEBUG -isystem /usr/local/include -m32 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cc.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cc.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_procmaps_bsd.cc.o -c /wrkdirs/usr/ports/devel/llvm90/work/compiler-rt-9.0.1.src/lib/sanitizer_common/sanitizer_procmaps_bsd.cc In file included from /wrkdirs/usr/ports/devel/llvm90/work/compiler-rt-9.0.1.src/lib/sanitizer_common/sanitizer_procmaps_bsd.cc:27: In file included from /usr/include/sys/user.h:51: In file included from /usr/include/sys/proc.h:75: /usr/include/machine/proc.h:78:2: error: use of 'savefpu' with tag type that does not match previous declaration struct savefpu *md_usr_fpu_save; ^ /usr/include/x86/fpu.h:127:7: note: previous use is here union savefpu { ^ 1 error generated. [ 15% 159/1007] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_win.cc.o [ 15% 159/1007] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_type_traits.cc.o [ 15% 159/1007] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_tls_get_addr.cc.o [ 15% 159/1007] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_thread_registry.cc.o [ 15% 159/1007] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_suppressions.cc.o ninja: build stopped: subcommand failed. *** Error code 1 Stop. make: stopped in /usr/ports/devel/llvm90
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e36d0e86e3282cde5a12b6a623e6deefaabfd0c4 commit e36d0e86e3282cde5a12b6a623e6deefaabfd0c4 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-09-22 18:54:39 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-09-22 20:17:47 +0000 Revert "linux32: add a hack to avoid redefining the type of the savefpu tag" This reverts commit 0f6829488ef32142b9ea1c0806fb5ecfe0872c02. Also it changes the type of md_usr_fpu_save struct mdthread member to void *, which is what uncovered this trouble. Now the save area is untyped, but since it is hidden behind accessors, it is not too significant. Since apparently there are consumers affected outside the tree, this hack is better than one from the reverted revision. PR: 258678 Reported by: cy Reviewed by: cy, kevans, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32060 sys/amd64/include/proc.h | 2 +- sys/modules/linux/Makefile | 2 +- sys/x86/include/fpu.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-)
The problem has been fixed.