Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950130 - QA check needed for too-large libraries
Summary: QA check needed for too-large libraries
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lfs-tracker
  Show dependency tree
 
Reported: 2025-02-23 03:06 UTC by Sam James
Modified: 2025-02-23 03:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-23 03:06:39 UTC
Earlier, tdr reported that llvm-spirv couldn't find libLLVM on x86:
```
$ /usr/lib/llvm/19/bin/llvm-spirv
/usr/lib/llvm/19/bin/llvm-spirv: error while loading shared libraries: libLLVM.so.19.1: cannot open shared object file: No such file or directory
```

This turns out to be because:
```
$ ldconfig
ldconfig: Cannot mmap file /usr/lib/llvm/19/lib/libLLVM.so.19.1
```
and..
```
2.9G Feb 22 08:22 /usr/lib/llvm/19/lib/libLLVM.so.19.1
```

We could do with a QA check for libraries that become too large to be loadable on 32-bit systems.

The glibc docs on mmap [0] say
"""
If the LFS interface is used the file size on 32-bit systems is not limited to 2GB (offsets are signed which reduces the addressable area of 4GB by half); the full 64-bit are available.
"""

so I guess we want to warn about 2GB in the non-LFS case, but I still wonder whether such a large library will end up causing problems anyway.

[0] https://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-I_002fO.html
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-23 03:07:36 UTC
wrt libLLVM, rebuilding with:
```
LLVM_TARGETS="(WebAssembly) (X86) -AArch64* -AMDGPU* -ARC -ARM* -AVR* -BPF* -CSKY -DirectX -Hexagon* -Lanai* -LoongArch* -M68k -MSP430* -Mips* -NVPTX* -PowerPC* -RISCV* -SPIRV -Sparc* -SystemZ* -VE* -XCore* -Xtensa
```
led to a far more reasonable
```
-rwxr-xr-x 1 root root 51M Feb 22 17:17 /usr/lib/llvm/19/lib/libLLVM.so.19.1
```
which also seems to imply that some targets are far larger than others (probably huge tables)?

We should reconsider bug 767700 in that light.