Summary: | Disabling CONFIG_COMPAT_32BIT_TIME breaks 32-bit apps (was: sys-devel/llvm build failure) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Gleb <dickyoubald> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | gk, ionen, mgorny, sam, toolchain |
Priority: | Highest | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=736152 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Build log.
emerge --info '=sys-devel/llvm-12.0.0::gentoo' emerge -pqv '=sys-devel/llvm-12.0.0::gentoo' |
Description
Gleb
2021-07-09 11:56:36 UTC
Created attachment 722902 [details]
Build log.
Created attachment 722905 [details]
emerge --info '=sys-devel/llvm-12.0.0::gentoo'
Created attachment 722908 [details]
emerge -pqv '=sys-devel/llvm-12.0.0::gentoo'
Tried to build sys-devel/llvm-11.1.0 — failed too. With disabled `abi_x86_32`, it compiles normally. llvm-10.0.1 fails too *** Bug 801421 has been marked as a duplicate of this bug. *** *** Bug 801421 has been marked as a duplicate of this bug. *** From the other bug, this may be related to the kernel's CONFIG_COMPAT_32BIT_TIME being unset and kernel 5.13.x (haven't tried). @toolchain, is there some active effort to switch to 64-bit time_t on x86? I don't see anything like that in glibc (i.e. it seems to always force the 32-bit type on 32-bit x86), so this looks like PEBKAC. https://sourceware.org/glibc/wiki/Y2038ProofnessDesign is an effort and API design description. Similar to _FILE_OFFSET_BITS=64 it's an explicit option that would need to be enabled (at least while we are yet far away from 2038). For time_t it will be a _TIME_BITS=64. glibc-2.34 (not released yet) will provide it. The caveat is that even 32-bit time_t calls will use (and probably already uses partially) 64-bit kernel's time_t. Thus it's not a 1-to-1 mapping of 32-bit userspace time_t <=> CONFIG_COMPAT_32BIT_TIME and eventually need for CONFIG_COMPAT_32BIT_TIME should go away for 32-bit time_t. But that day is not today. Ok, so the issue is not LLVM-specific. You can't disable CONFIG_COMPAT_32BIT_TIME if you want to use 32-bit applications on multilib amd64. I suppose we could add a config check somewhere (in glibc maybe?) but LLVM is not the place for it. |