Skip to content

Compile error in mimalloc 0.1.52 #173

Description

@xBINj

System: Windows 11 Home 25H2, OS Version: 26200.9168
Visual Studio Build Tools Version: 18.10.0
cc version: 1.4.4
mimalloc version: 0.1.52
Cargo.toml config:
[dependencies]
mimalloc = "0.1"

Codes:
`
use mimalloc::MiMalloc;

#[global_allocator]
static GLOBAL_ALLOC: MiMalloc = MiMalloc;

fn main() {
test1_basic();
}

fn test1_basic() {
let mut v = Vec::with_capacity(1024);
v.push(666);
println!("v: {:?}", v);
}
`

In Visual Studio Code and I use cargo run or cargo build, it report the error below:

error: failed to run custom build command for libmimalloc-sys v0.1.49
Caused by:
process didn't exit successfully: C:\prjs_rust_git_src\rust_learning\mytest02\target\debug\build\libmimalloc-sys-3169b469e5474a5c\build-script-build (exit code: 1)
--- stderr

error occurred in cc-rs: command did not execute successfully (status code exit code: 2): "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\VC\Tools\MSVC\14.51.36231\bin\HostX64\x64\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-std:c++17" "-I" "c_src/mimalloc/v3/include" "-I" "c_src/mimalloc/v3/src" "-W4" "/Zc:__cplusplus" "-DMI_DEBUG=0" "-FoC:\prjs_rust_git_src\rust_learning\mytest02\target\debug\build\libmimalloc-sys-0b3f78552cb42b55\out\2a4e75ae9feb7516-mimalloc-static.o" "-c" "C:\prjs_rust_git_src\rust_learning\mytest02\target\debug\build\libmimalloc-sys-0b3f78552cb42b55\out\mimalloc-static.cc"

I looked for the file based on the error message and found that the file 2a4e75ae9feb7516-mimalloc-static.o is missing. But why?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions