tikv / jemallocator

Rust allocator using jemalloc as a backend
Other
347 stars 58 forks source link

Windows support: tikv-jemalloc-sys not compiling because sh is not a valid command. #22

Open dertuxmalwieder opened 2 years ago

dertuxmalwieder commented 2 years ago

While analyzing the issue mentioned in https://github.com/ezrosent/frawk/issues/87, I found that tikv-jemalloc-sys (build.rs) relays on sh during its build process. As jemalloc, more or less, supports native compilation on Windows without any MinGW, bash, or other emulations of Unix-like platforms, I would suggest that the hard-coded sh call gets a forking path for Windows.

BusyJay commented 2 years ago

jemalloc relies on configure to bootstrap the build system, I'm not sure how to do so without sh. I believe https://github.com/jemalloc/jemalloc/issues/303 is required to achieve cross platform support.

dertuxmalwieder commented 2 years ago

Probably, yes. I admit that I have never tried to use jemalloc itself on Windows, so my initial idea might be wrong indeed.

ghost commented 9 months ago

@BusyJay Hello, I have installed make on windows via Chocolatey, but still sh is a linux command. Would it be possible to remove sh during a build? Thanks.

ghost commented 9 months ago

And I don't know what this line is for https://github.com/tikv/jemallocator/blob/main/jemalloc-sys/build.rs#L161, seems like this is blocking for windows as well.

BusyJay commented 9 months ago

You can check https://github.com/jemalloc/jemalloc/blob/dev/INSTALL.md#building-for-windows for prerequisites of Windows platform.