Summary: | >=llvm-runtimes/compiler-rt-sanitizers-17.0.6 fails to compile with musl-1.2.4: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:287:19: error: member access into incomplete type 'struct stat64' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tt_1 <herrtimson> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | generik, herrtimson |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=906603 https://bugs.gentoo.org/show_bug.cgi?id=906902 https://bugs.gentoo.org/show_bug.cgi?id=920630 https://github.com/gentoo/gentoo/pull/37212 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 903611 | ||
Attachments: |
compressed build log
output from emerge --info |
Created attachment 889813 [details]
output from emerge --info
I found this llvm pullrequest about fstat redefinition: https://github.com/llvm/llvm-project/pull/86625 but it doesn't fix the issue got the same issue on other 32bit arm targets, aarch64 seems to be fine. Issue happens due to musl deprecating interfaces, that is supposed to be fixed upstream. https://wiki.gentoo.org/wiki/Musl_porting_notes#error:_LFS64_interfaces_.28.2A64_undeclared_here.2C_ex._pread64.29 a workaround is to add -D_LARGEFILE64_SOURCE to your CFLAGS. Dear LLVM team, can we get -D_LARGEFILE64_SOURCE for a stable candidate of compiler-rt-sanitizers-18.1.x? It fixes the compile error on 32bit musl, thanks. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26e7288d58e4e16aa595e03ce5d4e6840df67977 commit 26e7288d58e4e16aa595e03ce5d4e6840df67977 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-16 00:41:09 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-16 00:41:09 +0000 profiles/features/musl: mask clang-runtime[sanitize] Avoid pulling in sys-libs/compiler-rt-sanitizers which fails to build Bug: https://bugs.gentoo.org/928936 Signed-off-by: Sam James <sam@gentoo.org> profiles/features/musl/package.use.mask | 5 +++++ 1 file changed, 5 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44d46e2703d097c49ebfeb48ce753936734d5f66 commit 44d46e2703d097c49ebfeb48ce753936734d5f66 Author: Violet Purcell <vimproved@inventati.org> AuthorDate: 2024-06-19 04:07:30 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-20 17:42:16 +0000 profiles: only mask clang-runtime[sanitize] on 32-bit musl profiles The issue in the bug is only an issue on 32-bit musl platforms, not on 64-bit. The original mask was overzealous, narrow the mask to arm, ppc, and x86. Bug: https://bugs.gentoo.org/928936 Signed-off-by: Violet Purcell <vimproved@inventati.org> Closes: https://github.com/gentoo/gentoo/pull/37212 Signed-off-by: Sam James <sam@gentoo.org> profiles/default/linux/arm/23.0/musl/package.use.stable.mask | 5 +++++ profiles/default/linux/ppc/23.0/musl/package.use.mask | 7 ++++++- profiles/default/linux/x86/23.0/i486/musl/package.use.mask | 6 +++++- profiles/default/linux/x86/23.0/i686/musl/package.use.mask | 5 +++++ profiles/features/musl/package.use.mask | 5 ----- 5 files changed, 21 insertions(+), 7 deletions(-) |
Created attachment 889812 [details] compressed build log the compiler-rt-sanitizers package fails to compile with musl-1.2.4: emerge -pv compiler-rt-sanitzers [ebuild N ] sys-libs/compiler-rt-sanitizers-17.0.6:17::gentoo USE="asan cfi clang libfuzzer lsan orc profile scudo ubsan xray -debug (-dfsan) -gwp-asan (-hwasan) (-memprof) (-msan) (-safestack) (-shadowcallstack) -test (-tsan) -verify-sig" 0 KiB leads to this error: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:287:19: error: member access into incomplete type 'struct stat64' 287 | out->st_dev = in->st_dev; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:288:19: error: member access into incomplete type 'struct stat64' 288 | out->st_ino = in->st_ino; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:289:20: error: member access into incomplete type 'struct stat64' 289 | out->st_mode = in->st_mode; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:290:21: error: member access into incomplete type 'struct stat64' 290 | out->st_nlink = in->st_nlink; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:291:19: error: member access into incomplete type 'struct stat64' 291 | out->st_uid = in->st_uid; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:292:19: error: member access into incomplete type 'struct stat64' 292 | out->st_gid = in->st_gid; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:293:20: error: member access into incomplete type 'struct stat64' 293 | out->st_rdev = in->st_rdev; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:294:20: error: member access into incomplete type 'struct stat64' 294 | out->st_size = in->st_size; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:295:23: error: member access into incomplete type 'struct stat64' 295 | out->st_blksize = in->st_blksize; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:296:22: error: member access into incomplete type 'struct stat64' 296 | out->st_blocks = in->st_blocks; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:297:21: error: member access into incomplete type 'struct stat64' 297 | out->st_atime = in->st_atime; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:298:21: error: member access into incomplete type 'struct stat64' 298 | out->st_mtime = in->st_mtime; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:299:21: error: member access into incomplete type 'struct stat64' 299 | out->st_ctime = in->st_ctime; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:391:17: error: variable has incomplete type 'struct stat64' 391 | struct stat64 buf64; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:423:17: error: variable has incomplete type 'struct stat64' 423 | struct stat64 buf64; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:455:17: error: variable has incomplete type 'struct stat64' 455 | struct stat64 buf64; | ^ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-17.0.6/work/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:285:35: note: forward declaration of '__sanitizer::stat64' 285 | static void stat64_to_stat(struct stat64 *in, struct stat *out) { | ^