indygreg / PyOxidizer

A modern Python application packaging and distribution tool
Mozilla Public License 2.0
5.48k stars 239 forks source link

PyOxidizer project build fails due to jemalloc-sys unable to build with toolchain x86_64-unknown-linux-musl #276

Open 4mtalhas opened 4 years ago

4mtalhas commented 4 years ago

Hi,

I am attempting to build a fully static binary using PyOxidizer. But the build fails due to jemalloc-sys not able to build.

Steps to reproduce: Install musl-tools and musl-dev: $ sudo apt-get install musl-tools musl-dev Create a new pyoxidizer project $ pyoxidizer init-config-file helloworld Add musl toolchain: $ rustup target add x86_64-unknown-linux-musl Build pyoxidizer project against musl toolchain ubuntu@ubuntu:~/helloworld$ RUST_BACKTRACE=1 pyoxidizer build --target-triple x86_64-unknown-linux-musl

Using nightly toolchain also fails with the same error. Platform is Ubuntu 18.04.

Many thanks in advance.

gormux commented 4 years ago

Interested too, I'm experiencing the same problem.

4mtalhas commented 4 years ago

@indygreg Any idea on how to fix this issue?

indygreg commented 4 years ago

If jemalloc isn't supported on musl, we shouldn't be attempting to use it there.

In the mean time, you should be able to work around this by setting PythonInterpreterConfig raw_allocator="system" in the pyoxidizer.bzl file.