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

jemalloc is not building on windows #309

Closed
jasonwilliams opened this issue Apr 13, 2020 · 2 comments · Fixed by #312
Closed

jemalloc is not building on windows #309

jasonwilliams opened this issue Apr 13, 2020 · 2 comments · Fixed by #312
Labels
bug Something isn't working windows Issues and PRs related to the Windows platform.
Milestone

Comments

@jasonwilliams
Copy link
Member

jasonwilliams commented Apr 13, 2020

This is my fault i should have tested this on my windows machine, but ive noticed since the jemalloc is merged cargo buld fails for me on windows.

cargo build
   Compiling fs_extra v1.1.0
   Compiling cc v1.0.50
   Compiling unicode-width v0.1.7
   Compiling ppv-lite86 v0.2.6
   Compiling strsim v0.8.0
   Compiling itoa v0.4.5
   Compiling regex-syntax v0.6.17
   Compiling vec_map v0.8.1
   Compiling gc v0.3.3
   Compiling thread_local v1.0.1
   Compiling getrandom v0.1.14
   Compiling memchr v2.3.3    
   Compiling winapi v0.3.8    
   Compiling libc v0.2.68     
   Compiling bitflags v1.2.1
   Compiling ryu v1.0.3
   Compiling textwrap v0.11.0
   Compiling rand_core v0.5.1
   Compiling serde v1.0.105
   Compiling wasm-bindgen v0.2.60
   Compiling aho-corasick v0.7.10
   Compiling rand_chacha v0.2.2
   Compiling rand v0.7.3
   Compiling jemalloc-sys v0.3.2
error: failed to run custom build command for `jemalloc-sys v0.3.2`

Caused by:
  process didn't exit successfully: `C:\Users\jasew\workspace\boa\target\debug\build\jemalloc-sys-ca10a7d760cdd634\build-script-build` (exit code: 101)
--- stdout
TARGET=x86_64-pc-windows-msvc
HOST=x86_64-pc-windows-msvc
NUM_JOBS=16
OUT_DIR="C:\\Users\\jasew\\workspace\\boa\\target\\debug\\build\\jemalloc-sys-cb31257d9274fda5\\out"
BUILD_DIR="C:\\Users\\jasew\\workspace\\boa\\target\\debug\\build\\jemalloc-sys-cb31257d9274fda5\\out\\build"
SRC_DIR="C:\\Users\\jasew\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\jemalloc-sys-0.3.2"
cargo:warning="jemalloc support for `x86_64-pc-windows-msvc` is untested"
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
CC_x86_64-pc-windows-msvc = None
CC_x86_64_pc_windows_msvc = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-msvc = None
CFLAGS_x86_64_pc_windows_msvc = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,mmx,sse,sse2")
DEBUG = Some("true")
CC="C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX64\\x64\\cl.exe"
CFLAGS="-nologo -MD -Z7 -Brepro -W4"
JEMALLOC_REPO_DIR="jemalloc"
JEMALLOC_SRC_DIR="C:\\Users\\jasew\\workspace\\boa\\target\\debug\\build\\jemalloc-sys-cb31257d9274fda5\\out\\jemalloc"
cargo:rustc-cfg=prefixed
--with-jemalloc-prefix=_rjem_
running: "sh" "/c/Users/jasew/workspace/boa/target/debug/build/jemalloc-sys-cb31257d9274fda5/out/jemalloc/configure" "--disable-cxx" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-pc-win32" "--build=x86_64-pc-win32" "--prefix=C:\\Users\\jasew\\workspace\\boa\\target\\debug\\build\\jemalloc-sys-cb31257d9274fda5\\out"

--- stderr
thread 'main' panicked at 'failed to execute command: The system cannot find the file specified. (os error 2)', C:\Users\jasew\.cargo\registry\src\github.com-1ecc6299db9ec823\jemalloc-sys-0.3.2\build.rs:389:19
stack backtrace:
   0: std::sys_common::backtrace::_print::{{impl}}::fmt
             at /rustc/f509b26a7730d721ef87423a72b3fdf8724b4afa\/src\libstd\sys_common\backtrace.rs:59
   1: core::fmt::write
             at /rustc/f509b26a7730d721ef87423a72b3fdf8724b4afa\/src\libcore\fmt\mod.rs:1069
   2: std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
             at /rustc/f509b26a7730d721ef87423a72b3fdf8724b4afa\/src\libstd\io\mod.rs:1427
   3: std::panicking::default_hook::{{closure}}
             at /rustc/f509b26a7730d721ef87423a72b3fdf8724b4afa\/src\libstd\panicking.rs:198
   4: std::panicking::default_hook
             at /rustc/f509b26a7730d721ef87423a72b3fdf8724b4afa\/src\libstd\panicking.rs:218
cargo:warning="jemalloc support for `x86_64-pc-windows-msvc` is untested"

This could be a problem

ping @Razican what OS you using?

@jasonwilliams
Copy link
Member Author

jasonwilliams commented Apr 13, 2020

I may have to revert the commit until we know what it is because im a bit blocked at the moment, looks like it may have issue with Windows rust-lang/rust-analyzer#696

@jasonwilliams jasonwilliams added the bug Something isn't working label Apr 13, 2020
@Razican
Copy link
Member

Razican commented Apr 13, 2020

What we can do is to not use jemalloc on Windows, and use it only on Linux / MacOS. On Linux seems to be working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants