Closed texiaote closed 3 months ago
Could you paste the full error messages? I suspect that this is because some C/C++ toolchain missing for jemalloc.
/Users/litq/.cargo/bin/cargo build --message-format=json-diagnostic-rendered-ansi --color=always --example server --manifest-path "/Users/litq/Documents/Open Sources/Rust/pingora/pingora/Cargo.toml"
Compiling jemalloc-sys v0.5.4+5.3.0-patched
error: failed to run custom build command for jemalloc-sys v0.5.4+5.3.0-patched
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: /Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-82147e675f820418/build-script-build
(exit status: 101)
--- stdout
TARGET=aarch64-apple-darwin
HOST=aarch64-apple-darwin
NUM_JOBS=8
OUT_DIR="/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out"
BUILD_DIR="/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out/build"
SRC_DIR="/Users/litq/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jemalloc-sys-0.5.4+5.3.0-patched"
cargo:rustc-cfg=prefixed
cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-apple-darwin")
HOST = Some("aarch64-apple-darwin")
cargo:rerun-if-env-changed=CC_aarch64-apple-darwin
CC_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CC_aarch64_apple_darwin
CC_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
cargo:rerun-if-env-changed=CFLAGS_aarch64-apple-darwin
CFLAGS_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_apple_darwin
CFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
CC="cc"
CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -mmacosx-version-min=14.4 --target=arm64-apple-darwin -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: cd "/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out/build" && CC="cc" CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -mmacosx-version-min=14.4 --target=arm64-apple-darwin -Wall" CPPFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -mmacosx-version-min=14.4 --target=arm64-apple-darwin -Wall" LDFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -mmacosx-version-min=14.4 --target=arm64-apple-darwin -Wall" "sh" "/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out/build/configure" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=rjem" "--with-private-namespace=rjem" "--host=aarch64-apple-darwin" "--build=aarch64-apple-darwin" "--prefix=/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out"
running: "tail" "-n" "100" "/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out/build/config.log"
XSLROOT=''
XSLTPROC=''
a=''
abi=''
abs_objroot='/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out/build/'
abs_srcroot='/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out/build/'
ac_ct_CC=''
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='aarch64-apple-darwin'
build_alias='aarch64-apple-darwin'
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='aarch64-apple-darwin'
host_alias='aarch64-apple-darwin'
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
importlib=''
includedir='${prefix}/include'
infodir='${datarootdir}/info'
installsuffix=''
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='/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/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 /
configure: exit 1
--- stderr
configure: error: Prefix should not contain spaces
thread 'main' panicked at /Users/litq/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jemalloc-sys-0.5.4+5.3.0-patched/build.rs:351:9:
command did not execute successfully: cd "/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out/build" && CC="cc" CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -mmacosx-version-min=14.4 --target=arm64-apple-darwin -Wall" CPPFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -mmacosx-version-min=14.4 --target=arm64-apple-darwin -Wall" LDFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -mmacosx-version-min=14.4 --target=arm64-apple-darwin -Wall" "sh" "/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out/build/configure" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=rjem" "--with-private-namespace=rjem" "--host=aarch64-apple-darwin" "--build=aarch64-apple-darwin" "--prefix=/Users/litq/Documents/Open Sources/Rust/pingora/target/debug/build/jemalloc-sys-b175381e5e46b426/out"
expected success, got: exit status: 1
stack backtrace:
0: rust_begin_unwind
at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/panicking.rs:647:5
1: core::panicking::panic_fmt
at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/panicking.rs:72:14
2: build_script_build::execute
3: build_script_build::run_and_log
4: build_script_build::main
5: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with RUST_BACKTRACE=full
for a verbose backtrace.
This sounds like https://github.com/jemalloc/jemalloc/pull/2567
Meanwhile you can remove the jemalloc section in the example code to make it work.
This question has been stale for a week. It will be closed in an additional day if not updated.
This issue has been closed because it has been stalled with no activity.
When I cloned the pingora source code and try to run it in my MacOS, i occurred the "error: failed to run custom build command for
jemalloc-sys v0.5.4+5.3.0-patched
" error message, how can i to solve the problem and what's the reason