-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.O-freebsdOperating system: FreeBSDOperating system: FreeBSD
Description
The Polars project builds the shared library that can't be loaded. dlopen fails with the error:
No space available for static Thread Local Storage
The binary is /usr/local/lib/python3.11/site-packages/polars/polars.abi3.so
Meta
rustc --version --verbose
:
$ rustc --version --verbose
rustc 1.88.0-nightly (e2014e876 2025-04-01) (built from a source tarball)
binary: rustc
commit-hash: e2014e876e3efaa69bf51c19579adb16c3df5f81
commit-date: 2025-04-01
host: x86_64-unknown-freebsd
release: 1.88.0-nightly
LLVM version: 20.1.1
FreeBSD 14.2 amd64
Description
One possible reason is that wrong tls-model is used. It probably uses the tls-model initial-exec intended for non-PIC binaries instead of the tls-model global-dynamic intended for PIC binaries.
The tls-model choice is buried in Rust and Maturin code and it is unclear where the problem lies.
Additional details are in this downstream bug report.
How to reproduce:
1. Install the [FreeBSD VM image](https://download.freebsd.org/ftp/releases/VM-IMAGES/14.2-RELEASE/amd64/Latest/) into VirtualBox.
2. Boot FreeBSD
3. Install git: pkg install git
4. Check out the ports tree: git clone https://git.FreeBSD.org/ports.git /usr/ports
5. cd /usr/ports
6. Apply this patch: https://freebsd.org/~yuri/py-polars.patch
7. cd misc/py-polars
8. Install dependencies: pkg install -A `make missing`
9. Build: make
10. Install: make install```
Please help.
Metadata
Metadata
Assignees
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.O-freebsdOperating system: FreeBSDOperating system: FreeBSD