Summary: | >=sys-libs/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 | ||
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 |
||
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. |
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) { | ^