jemallocator
jemallocator copied to clipboard
can't build any crate with jemallocator as a dependency when path contains spaces
to reproduce:
cd /tmp
mkdir "j (1)"
cd "j (1)"
git clone --recursive https://github.com/tikv/jemallocator
cd jemallocator/jemalloc-sys
cargo build
result:
Compiling libc v0.2.138
Compiling fs_extra v1.2.0
Compiling cc v1.0.78
Compiling tikv-jemalloc-sys v0.5.2+5.3.0-patched (/tmp/j (1)/jemallocator/jemalloc-sys)
error: failed to run custom build command for `tikv-jemalloc-sys v0.5.2+5.3.0-patched (/tmp/j (1)/jemallocator/jemalloc-sys)`
Caused by:
process didn't exit successfully: `/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-0e4cf34acb03cab2/build-script-build` (exit status: 101)
--- stdout
TARGET=x86_64-unknown-linux-gnu
HOST=x86_64-unknown-linux-gnu
NUM_JOBS=8
OUT_DIR="/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out"
BUILD_DIR="/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out/build"
SRC_DIR="/tmp/j (1)/jemallocator/jemalloc-sys"
cargo:rustc-cfg=prefixed
cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,llvm14-builtins-abi,sse,sse2")
CC="cc"
CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-4 -fno-omit-frame-pointer -m64 -Wall"
JEMALLOC_REPO_DIR="jemalloc"
cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_MALLOC_CONF
cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_PAGE
cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_HUGEPAGE
cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_QUANTUM
cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_VADDR
--with-jemalloc-prefix=_rjem_
running: "sh" "/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out/build/configure" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-unknown-linux-gnu" "--build=x86_64-unknown-linux-gnu" "--prefix=/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out"
running: "tail" "-n" "100" "/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out/build/config.log"
XSLROOT=''
XSLTPROC=''
a=''
abi=''
abs_objroot='/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out/build/'
abs_srcroot='/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out/build/'
ac_ct_CC=''
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias='x86_64-unknown-linux-gnu'
build_cpu=''
build_os=''
build_vendor=''
cfghdrs_in=''
cfghdrs_out=''
cfgoutputs_in=''
cfgoutputs_out=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
enable_autogen=''
enable_cache_oblivious=''
enable_cxx='no'
enable_debug=''
enable_doc='no'
enable_experimental_smallocx=''
enable_fill=''
enable_initial_exec_tls=''
enable_lazy_lock=''
enable_log=''
enable_opt_safety_checks=''
enable_opt_size_checks=''
enable_prof=''
enable_readlinkat=''
enable_shared='no'
enable_static=''
enable_stats=''
enable_tls=''
enable_uaf_detection=''
enable_utrace=''
enable_xmalloc=''
enable_zone_allocator=''
exe=''
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias='x86_64-unknown-linux-gnu'
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
importlib=''
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_suffix=''
je_=''
jemalloc_version=''
jemalloc_version_bugfix=''
jemalloc_version_gid=''
jemalloc_version_major=''
jemalloc_version_minor=''
jemalloc_version_nrev=''
libdir='${exec_prefix}/lib'
libdl=''
libexecdir='${exec_prefix}/libexec'
libprefix=''
link_whole_archive=''
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
o=''
objroot=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out'
private_namespace=''
program_transform_name='s,x,x,'
psdir='${docdir}'
rev='2'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
so=''
srcroot=''
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
configure: exit 1
--- stderr
configure: error: Prefix should not contain spaces
thread 'main' panicked at 'command did not execute successfully: "sh" "/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out/build/configure" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-unknown-linux-gnu" "--build=x86_64-unknown-linux-gnu" "--prefix=/tmp/j (1)/jemallocator/target/debug/build/tikv-jemalloc-sys-6f42aef5bff398e7/out"
expected success, got: exit status: 1', jemalloc-sys/build.rs:330:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Issue exists on previous versions of crate as well.
It seems to be an issue of jemalloc itself. You may want to send the issue to https://github.com/jemalloc/jemalloc.
done.