[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #20 from Dimitry Andric --- (In reply to feh from comment #19) It looks rather different: this bug was originally about aarch64 not supporting some (or all) of the sanitizers. Later, it became about some refactoring in the Makefiles causing libraries for some architectures to be erroneously skipped. In your case, it looks like you used freebsd-update? And maybe it was not aware that you had the /usr/lib/clang directory at all, so it did not update it? How did you upgrade, exactly? -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #19 from f...@fehcom.de --- Sorry: Should say: the same *kind* of error. --eh. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 f...@fehcom.de changed: What|Removed |Added CC||f...@fehcom.de --- Comment #18 from f...@fehcom.de --- I get the same error here after upgrade from 13.2 => 13.3: ld: error: cannot open /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-x86_64.a: No such file or directory The machine IS a AMD64: FreeBSD bigchief.fehnet.de 13.3-RELEASE-p1 FreeBSD 13.3-RELEASE-p1 GENERIC amd64 All updates installed. regards. --eh. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #17 from commit-h...@freebsd.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=72d9e1e0ca66ca39ca157731a65be32c63916252 commit 72d9e1e0ca66ca39ca157731a65be32c63916252 Author: Dimitry Andric AuthorDate: 2024-03-21 13:53:36 + Commit: Dimitry Andric CommitDate: 2024-03-24 00:37:23 + Fix building of several libclang_rt libraries for powerpc64 and powerp64le I reorganized the libclang_rt Makefile in e77a1bb27574 to make it more readable and maintainable, but the check for 32-bit powerpc was wrong. This caused almost no libclang_rt libraries to be built for powerpc64 and powerpc64le. PR: 262706 Reported by:tuexen Fixes: e77a1bb27574 MFC after: 3 days (cherry picked from commit f0620ceeccf070a69352105c5dbc23cff499a732) lib/libclang_rt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #16 from commit-h...@freebsd.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5c588a23c96b88327f87bb8ef6c795c442d56c2a commit 5c588a23c96b88327f87bb8ef6c795c442d56c2a Author: Dimitry Andric AuthorDate: 2024-03-21 20:44:46 + Commit: Dimitry Andric CommitDate: 2024-03-24 00:37:29 + Slightly reorganize libclang_rt Makefile again Make a separate .elif section for MACHINE_ARCH==powerpc, and subdivide the MACHINE_CPUARCH values under it. If at some point more sanitizer libraries become available for powerpc CPU architectures, they can be added before the "nothing for other powerpc yet" case. Similar for the MACHINE_ARCH==arm case. PR: 262706 Fixes: e77a1bb27574 MFC after: 3 days (cherry picked from commit 897a485c34464a44b768f13127d94137229eb83d) lib/libclang_rt/Makefile | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #15 from commit-h...@freebsd.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=880f35eb5d489ae6b8d09da82f577381f24157d2 commit 880f35eb5d489ae6b8d09da82f577381f24157d2 Author: Dimitry Andric AuthorDate: 2024-03-21 13:53:36 + Commit: Dimitry Andric CommitDate: 2024-03-24 00:36:18 + Fix building of several libclang_rt libraries for powerpc64 and powerp64le I reorganized the libclang_rt Makefile in e77a1bb27574 to make it more readable and maintainable, but the check for 32-bit powerpc was wrong. This caused almost no libclang_rt libraries to be built for powerpc64 and powerpc64le. PR: 262706 Reported by:tuexen Fixes: e77a1bb27574 MFC after: 3 days (cherry picked from commit f0620ceeccf070a69352105c5dbc23cff499a732) lib/libclang_rt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #14 from commit-h...@freebsd.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=35a61f4a25ac5301b83d2c4835081d60de5b8b1e commit 35a61f4a25ac5301b83d2c4835081d60de5b8b1e Author: Dimitry Andric AuthorDate: 2024-03-21 20:44:46 + Commit: Dimitry Andric CommitDate: 2024-03-24 00:36:26 + Slightly reorganize libclang_rt Makefile again Make a separate .elif section for MACHINE_ARCH==powerpc, and subdivide the MACHINE_CPUARCH values under it. If at some point more sanitizer libraries become available for powerpc CPU architectures, they can be added before the "nothing for other powerpc yet" case. Similar for the MACHINE_ARCH==arm case. PR: 262706 Fixes: e77a1bb27574 MFC after: 3 days (cherry picked from commit 897a485c34464a44b768f13127d94137229eb83d) lib/libclang_rt/Makefile | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #13 from commit-h...@freebsd.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=897a485c34464a44b768f13127d94137229eb83d commit 897a485c34464a44b768f13127d94137229eb83d Author: Dimitry Andric AuthorDate: 2024-03-21 20:44:46 + Commit: Dimitry Andric CommitDate: 2024-03-21 20:44:46 + Slightly reorganize libclang_rt Makefile again Make a separate .elif section for MACHINE_ARCH==powerpc, and subdivide the MACHINE_CPUARCH values under it. If at some point more sanitizer libraries become available for powerpc CPU architectures, they can be added before the "nothing for other powerpc yet" case. Similar for the MACHINE_ARCH==arm case. PR: 262706 Fixes: e77a1bb27574 MFC after: 3 days lib/libclang_rt/Makefile | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #12 from commit-h...@freebsd.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f0620ceeccf070a69352105c5dbc23cff499a732 commit f0620ceeccf070a69352105c5dbc23cff499a732 Author: Dimitry Andric AuthorDate: 2024-03-21 13:53:36 + Commit: Dimitry Andric CommitDate: 2024-03-21 17:05:25 + Fix building of several libclang_rt libraries for powerpc64 and powerp64le I reorganized the libclang_rt Makefile in e77a1bb27574 to make it more readable and maintainable, but the check for 32-bit powerpc was wrong. This caused almost no libclang_rt libraries to be built for powerpc64 and powerpc64le. PR: 262706 Reported by:tuexen Fixes: e77a1bb27574 MFC after: 3 days lib/libclang_rt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 Dimitry Andric changed: What|Removed |Added Resolution|--- |FIXED Status|New |Closed --- Comment #11 from Dimitry Andric --- Let's close this then. The libraries will be available in the upcoming 14.1-RELEASE (and 13.3-RELEASE, when it's there). -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 Kyle Evans changed: What|Removed |Added CC||kev...@freebsd.org --- Comment #10 from Kyle Evans --- (In reply to Dimitry Andric from comment #9) IMO no, this is a missing feature that should've been there but at the same time there is a suitable replacement in the llvm ports, so without a compelling reason I'm not sure it's worth the overhead to write up the details and roll a build. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #9 from Dimitry Andric --- I'm not sure if this is worth an Errata Notice? It's a bit of a pity that 14.0 shipped without most of the sanitizer libraries on arm64, though. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #8 from commit-h...@freebsd.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5c95aeb90f70a66c75869fa0de44283c04bbd725 commit 5c95aeb90f70a66c75869fa0de44283c04bbd725 Author: Dimitry Andric AuthorDate: 2023-12-28 12:57:41 + Commit: Dimitry Andric CommitDate: 2024-01-01 16:41:43 + Reorganize libclang_rt Makefile and make more lib/arch combos available Upstream has made more clang runtime libraries available for more architectures, so add them. To make this easier, split up subdir lists into functional parts (asan, tsan, etc), and put each architecture into its own .if block. Effectively, this adds the following libraries for aarch64: asan, cfi, fuzzer, msan, safestack, stats, tsan, ubsan, xray. PR: 262706 MFC after: 3 days (cherry picked from commit e77a1bb2757471ab3fed0750b76eeb15d0c7b10a) lib/libclang_rt/Makefile | 161 ++- 1 file changed, 91 insertions(+), 70 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #7 from commit-h...@freebsd.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8334205c84cf8fb2006cc9dc9fdeecaa855242b3 commit 8334205c84cf8fb2006cc9dc9fdeecaa855242b3 Author: Dimitry Andric AuthorDate: 2023-12-28 12:57:41 + Commit: Dimitry Andric CommitDate: 2024-01-01 16:34:04 + Reorganize libclang_rt Makefile and make more lib/arch combos available Upstream has made more clang runtime libraries available for more architectures, so add them. To make this easier, split up subdir lists into functional parts (asan, tsan, etc), and put each architecture into its own .if block. Effectively, this adds the following libraries for aarch64: asan, cfi, fuzzer, msan, safestack, stats, tsan, ubsan, xray. PR: 262706 MFC after: 3 days (cherry picked from commit e77a1bb2757471ab3fed0750b76eeb15d0c7b10a) lib/libclang_rt/Makefile | 162 ++- 1 file changed, 91 insertions(+), 71 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #6 from commit-h...@freebsd.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e77a1bb2757471ab3fed0750b76eeb15d0c7b10a commit e77a1bb2757471ab3fed0750b76eeb15d0c7b10a Author: Dimitry Andric AuthorDate: 2023-12-28 12:57:41 + Commit: Dimitry Andric CommitDate: 2023-12-28 12:57:41 + Reorganize libclang_rt Makefile and make more lib/arch combos available Upstream has made more clang runtime libraries available for more architectures, so add them. To make this easier, split up subdir lists into functional parts (asan, tsan, etc), and put each architecture into its own .if block. Effectively, this adds the following libraries for aarch64: asan, cfi, fuzzer, msan, safestack, stats, tsan, ubsan, xray. PR: 262706 MFC after: 3 days lib/libclang_rt/Makefile | 162 ++- 1 file changed, 91 insertions(+), 71 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 --- Comment #5 from Dimitry Andric --- (In reply to ota from comment #4) The Makefile for this (lib/libclang_rt/Makefile) still has only x86 listed for asan, cfi, ubsan and a few other components. I think upstream does support these (or at least part of them) for aarch64, so thanks for the reminder. I will take another look at getting those libraries in. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 o...@j.email.ne.jp changed: What|Removed |Added CC||o...@j.email.ne.jp --- Comment #4 from o...@j.email.ne.jp --- Is it still the case arm64 is not yet supported? I tested this on 13.2-RELEASE and 14.0-RELEASE. I get the following errors: 14.0 % ... c++ -o xxx.pm -g main.o -L/usr/local/lib -fprofile-instr-generate -fcoverage-map ping -fsanitize=address -fno-omit-frame-pointer -L.. -Wl,--rpath=.. -lpthread - ledit -lboost_program_options -lboost_system -lboost_system -lpthread -ledit ld: error: cannot open /usr/lib/clang/16/lib/freebsd/libclang_rt.asan_static-aar ch64.a: No such file or directory ld: error: cannot open /usr/lib/clang/16/lib/freebsd/libclang_rt.asan-aarch64.a: No such file or directory ld: error: cannot open /usr/lib/clang/16/lib/freebsd/libclang_rt.asan_cxx-aarch6 4.a: No such file or directory c++: error: linker command failed with exit code 1 (use -v to see invocation) 13.2 % ld: error: cannot open /usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_static -aarch64.a: No such file or directory ld: error: cannot open /usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-aarch6 4.a: No such file or directory ld: error: cannot open /usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_cxx-aa rch64.a: No such file or directory c++: error: linker command failed with exit code 1 (use -v to see invocation) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 Dimitry Andric changed: What|Removed |Added CC||d...@freebsd.org --- Comment #2 from Dimitry Andric --- Yep, upstream doesn't yet support aarch64 for the sanitizers. If I attempt to build it on an aarch64 machine, I see: /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1811:23: error: field has incomplete type 'struct _aarch64_ctx' struct _aarch64_ctx head; ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1811:10: note: forward declaration of '__sanitizer::_aarch64_ctx' struct _aarch64_ctx head; ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1817:35: error: no member named '__reserved' in '__mcontext' u8 *aux = ucontext->uc_mcontext.__reserved; ~ ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1820:12: error: member access into incomplete type '__sanitizer::_aarch64_ctx' if (ctx->size == 0) break; ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1811:10: note: forward declaration of '__sanitizer::_aarch64_ctx' struct _aarch64_ctx head; ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1821:12: error: member access into incomplete type '__sanitizer::_aarch64_ctx' if (ctx->magic == kEsrMagic) { ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1811:10: note: forward declaration of '__sanitizer::_aarch64_ctx' struct _aarch64_ctx head; ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1825:15: error: member access into incomplete type '__sanitizer::_aarch64_ctx' aux += ctx->size; ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1811:10: note: forward declaration of '__sanitizer::_aarch64_ctx' struct _aarch64_ctx head; ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:2055:31: error: no member named 'pc' in '__mcontext' *pc = ucontext->uc_mcontext.pc; ~ ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:2056:31: error: no member named 'regs' in '__mcontext' *bp = ucontext->uc_mcontext.regs[29]; ~ ^ /home/dim/src/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:2057:31: error: no member named 'sp' in '__mcontext' *sp = ucontext->uc_mcontext.sp; ~ ^ 8 errors generated. `_aarch64_ctx` is a Linux-specific context struct from /usr/include/aarch64-linux-gnu/asm/sigcontext.h: /* * Header to be used at the beginning of structures extending the user * context. Such structures must be placed after the rt_sigframe on the stack * and be 16-byte aligned. The last structure must be a dummy one with the * magic and size set to 0. */ struct _aarch64_ctx { __u32 magic; __u32 size; }; but obviously it doesn't exist in FreeBSD. Similarly, struct ucontext and mcontext have different members, and aren't generally compatible. I think the only way to get this implemented is to have somebody with aarch64 knowledge, who can attempt to fix them up and submit reviews upstream. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 Ed Maste changed: What|Removed |Added CC||ema...@freebsd.org --- Comment #1 from Ed Maste --- asan runtime support is currently built only for i386, amd64, and riscv. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 262706] Build on arm64 fails to find libclang_rt.asan-aarch64.a
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262706 Yuri Victorovich changed: What|Removed |Added Assignee|b...@freebsd.org|toolchain@FreeBSD.org -- You are receiving this mail because: You are the assignee for the bug.