NetBSD build failure
0-wiz-0 opened this issue · comments
The build of d5bfccf from the git checkout fails on NetBSD:
mimalloc_rust> cargo build
Updating crates.io index
Compiling cc v1.0.73
Compiling libmimalloc-sys v0.1.25 (.../mimalloc_rust/libmimalloc-sys)
The following warnings were emitted during compilation:
warning: cc: error: c_src/mimalloc/src/static.c: No such file or directory
warning: cc: fatal error: no input files
warning: compilation terminated.
error: failed to run custom build command for `libmimalloc-sys v0.1.25 (.../mimalloc_rust/libmimalloc-sys)`
Caused by:
process didn't exit successfully: `.../mimalloc_rust/target/debug/build/libmimalloc-sys-e59021f0191df012/build-script-build` (exit status: 1)
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-unknown-netbsd")
HOST = Some("x86_64-unknown-netbsd")
CC_x86_64-unknown-netbsd = None
CC_x86_64_unknown_netbsd = None
HOST_CC = None
CC = None
CFLAGS_x86_64-unknown-netbsd = None
CFLAGS_x86_64_unknown_netbsd = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
CC_x86_64-unknown-netbsd = None
CC_x86_64_unknown_netbsd = None
HOST_CC = None
CC = None
CFLAGS_x86_64-unknown-netbsd = None
CFLAGS_x86_64_unknown_netbsd = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_SECURE=4" "-DMI_DEBUG=0" "-o" ".../mimalloc_rust/target/debug/build/libmimalloc-sys-e908aa27d8713004/out/c_src/mimalloc/src/static.o" "-c" "c_src/mimalloc/src/static.c"
cargo:warning=cc: error: c_src/mimalloc/src/static.c: No such file or directory
cargo:warning=cc: fatal error: no input files
cargo:warning=compilation terminated.
exit status: 1
--- stderr
error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_SECURE=4" "-DMI_DEBUG=0" "-o" ".../mimalloc_rust/target/debug/build/libmimalloc-sys-e908aa27d8713004/out/c_src/mimalloc/src/static.o" "-c" "c_src/mimalloc/src/static.c" with args "cc" did not execute successfully (status code exit status: 1).
I tried building libmimalloc (the C source, from https://github.com/ErnyTech/libmimalloc-sys.git, git commit 1d89dc49dcd0a081d631b12fa423382f29343781, and this worked fine, including the tests:
Running tests...
Test project /archive/foreign/libmimalloc-sys/build
Start 1: test_api,
1/2 Test #1: test_api, ........................ Passed 0.00 sec
Start 2: test_stress,
2/2 Test #2: test_stress, ..................... Passed 2.22 sec
100% tests passed, 0 tests failed out of 2
Total Test time (real) = 2.23 sec
so I suspect something is wrong in how this code is included in the crate.
Oops. PEBKAC, I didn't do the 'git submodule'