Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerPC pip package is not suitable for systems with 64 KiB pages #10073

Closed
nwf opened this issue Feb 21, 2024 · 3 comments · Fixed by #10080
Closed

PowerPC pip package is not suitable for systems with 64 KiB pages #10073

nwf opened this issue Feb 21, 2024 · 3 comments · Fixed by #10080

Comments

@nwf
Copy link

nwf commented Feb 21, 2024

I'm not sure if this is the right place; if not, please point me in the right direction and sorry for the noise.

Trying to run the pip packaged ruff on Debian 12.2 on a PowerPC LE system (in Docker, on a Raptor Computing Talos II workstation, if it matters) whose uname -a describes itself as Linux 0abaa1dc35a7 6.1.0-13-powerpc64le #1 SMP Debian 6.1.55-1 (2023-09-29) ppc64le GNU/Linux results in a very short trip:

root@0abaa1dc35a7:/# python3 -m venv /root/venv

root@0abaa1dc35a7:/# /root/venv/bin/pip3 install ruff
Collecting ruff
  Using cached ruff-0.2.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (8.2 MB)
Installing collected packages: ruff
Successfully installed ruff-0.2.2

root@0abaa1dc35a7:/# /root/venv/bin/ruff
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 5 bytes failed
Aborted (core dumped)

Debian builds their PowerPC kernels to use 64 KiB pages; /boot/config-$(uname -r) contains

# CONFIG_PPC_4K_PAGES is not set
CONFIG_PPC_64K_PAGES=y
CONFIG_PAGE_SIZE_64KB=y
CONFIG_PPC_PAGE_SHIFT=16

I suspect that configuring jemalloc to assume 64 KiB pages will allow it to also function on 4 KiB page systems: jemalloc/jemalloc#2572 (comment)

@MichaReiser
Copy link
Member

I think this is the same root cause as #3791 (comment)

The difference is that you're building from source. So you would have to set the env variable yourself as far as I understand. @konstin or is there a way for us to set an env variable in the wheel code?

@nwf
Copy link
Author

nwf commented Feb 21, 2024

I didn't mean to be building from source. I see that the log I attached above was the second time through so pip said "Using cached" rather than "Downloading" but it definitely downloaded the first time:

root@0abaa1dc35a7:/# python3 -m venv /usr/local/pyvenv && /usr/local/pyvenv/bin/pip3 install ruff
Collecting ruff
  Downloading ruff-0.2.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (8.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.2/8.2 MB 11.1 MB/s eta 0:00:00

@konstin
Copy link
Member

konstin commented Feb 22, 2024

is there a way for us to set an env variable in the wheel code?

maturin doesn't support this atm, but it should be passed through if you set it outside the build command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants