jemallocator icon indicating copy to clipboard operation
jemallocator copied to clipboard

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

Open dertuxmalwieder opened this issue 4 years ago • 5 comments

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.

dertuxmalwieder avatar Mar 25 '22 01:03 dertuxmalwieder

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.

BusyJay avatar Mar 25 '22 03:03 BusyJay

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

dertuxmalwieder avatar Mar 25 '22 03:03 dertuxmalwieder

@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 avatar Dec 14 '23 21:12 ghost

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.

ghost avatar Dec 14 '23 21:12 ghost

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

BusyJay avatar Dec 15 '23 02:12 BusyJay