PyOxidizer
PyOxidizer copied to clipboard
Build fails in Centos 7 due to jemalloc error
Hi, running pyoxidizer build --release in a standard docker container centos:7 for the project q.
The build fails with the following error:
thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2/build.rs:389:19
When compiling on centos:8 everything works fine (working on centos8, failing on glibc version for centos7).
Would be really glad to get any insight you might have.
Attached --verbose log file.
Also, running with RUST_BACKTRACE=full shows the following trace:
thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2/build.rs:389:19
stack backtrace:
0: 0x562647cb9c00 - std::backtrace_rs::backtrace::libunwind::trace::h34055254b57d8e79
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
1: 0x562647cb9c00 - std::backtrace_rs::backtrace::trace_unsynchronized::h8f1e3fbd9afff6ec
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x562647cb9c00 - std::sys_common::backtrace::_print_fmt::h3a99a796b770c360
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:67:5
3: 0x562647cb9c00 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h32d1f94a80615d18
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:46:22
4: 0x562647cd9dfc - core::fmt::write::h306731c068f7162c
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/fmt/mod.rs:1110:17
5: 0x562647cb68f5 - std::io::Write::write_fmt::hd2fa90334eee2a21
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/io/mod.rs:1588:15
6: 0x562647cbc21b - std::sys_common::backtrace::_print::h5abaa2601a852287
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:49:5
7: 0x562647cbc21b - std::sys_common::backtrace::print::h8d81445442bb638f
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:36:9
8: 0x562647cbc21b - std::panicking::default_hook::{{closure}}::hcfe804496a9fa747
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:208:50
9: 0x562647cbbcf1 - std::panicking::default_hook::hbea8e3ccf2ba8901
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:225:9
10: 0x562647cbc8e4 - std::panicking::rust_panic_with_hook::h7ee9e1a2d0f8975a
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:622:17
11: 0x562647cbc3c7 - std::panicking::begin_panic_handler::{{closure}}::h8ab3b4491718b2c7
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:519:13
12: 0x562647cba0fc - std::sys_common::backtrace::__rust_end_short_backtrace::hd489062ffa586a9f
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:141:18
13: 0x562647cbc329 - rust_begin_unwind
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
14: 0x562647c3e4ab - std::panicking::begin_panic_fmt::h5479575e112541f8
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:457:5
15: 0x562647c44ca4 - build_script_build::run::he58de59919e9495c
16: 0x562647c435f4 - build_script_build::main::hac32f579a21b86f3
17: 0x562647c49a43 - core::ops::function::FnOnce::call_once::he16954a34d4be86f
18: 0x562647c50fd9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3d2f8e162b36fad0
19: 0x562647c4ecd9 - std::rt::lang_start::{{closure}}::hc97222691d52e5f6
20: 0x562647cbcde9 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h2aabc384aab89b7b
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/function.rs:259:13
21: 0x562647cbcde9 - std::panicking::try::do_call::hc5fcacb7a85fc7b1
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:401:40
22: 0x562647cbcde9 - std::panicking::try::hb5d9603af3abbe3a
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:365:19
23: 0x562647cbcde9 - std::panic::catch_unwind::h98fe6ac3925e64b4
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panic.rs:434:14
24: 0x562647cbcde9 - std::rt::lang_start_internal::h22ac7383c516f93e
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/rt.rs:34:21
25: 0x562647c4ecc1 - std::rt::lang_start::h2a7ad7b2f8266150
26: 0x562647c45253 - main
27: 0x7fa07e3e3555 - __libc_start_main
28: 0x562647c3f3b1 - <unknown>
29: 0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
error: build failed
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest
Caused by:
0: building Python executable
1: building executable with Rust project
2: reading cargo output
3: command ["/root/.cache/pyoxidizer/rust/1.54.0-x86_64-unknown-linux-gnu/bin/cargo", "build", "--target", "x86_64-unknown-linux-gnu", "--target-dir", "/tmp/pyoxidizer0XgANl/build/target", "--bin", "q", "--locked", "--release", "--no-default-features", "--features", "build-mode-prebuilt-artifacts cpython-link-unresolved-static global-allocator-jemalloc allocator-jemalloc"] exited with code 101
What was the output before this failure? We were seeing a bunch of No such file or directory reports in earlier versions of PyOxidizer. I think they are all fixed in the main branch / upcoming 0.18 release. But it is possible they remain.
thanks for the reply.
Sending here the output. I'd be glad to provide any more info which is needed. Btw, running with the latest version 0.17.0, not from master/pre-0.18
Perhaps I should mention that I'm testing this on a docker container inside an OSX Catalina machine:
docker run -it centos:7 /bin/bash
Compiling mailparse v0.13.5
error: failed to run custom build command for `jemalloc-sys v0.3.2`
Caused by:
process didn't exit successfully: `/tmp/pyoxidizerEm3cQJ/build/target/release/build/jemalloc-sys-3eed98022922331b/build-script-build` (exit status: 101)
--- stdout
TARGET=x86_64-unknown-linux-gnu
HOST=x86_64-unknown-linux-gnu
NUM_JOBS=6
OUT_DIR="/tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out"
BUILD_DIR="/tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/build"
SRC_DIR="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2"
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
CC="cc"
CFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall"
JEMALLOC_REPO_DIR="jemalloc"
JEMALLOC_SRC_DIR="/tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/jemalloc"
cargo:rustc-cfg=prefixed
--with-jemalloc-prefix=_rjem_
running: "sh" "/tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/jemalloc/configure" "--disable-cxx" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-unknown-linux-gnu" "--build=x86_64-unknown-linux-gnu" "--prefix=/tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out"
checking for xsltproc... false
checking for x86_64-unknown-linux-gnu-gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether compiler is cray... no
checking whether compiler supports -std=gnu11... yes
checking whether compiler supports -Wall... yes
checking whether compiler supports -Wshorten-64-to-32... no
checking whether compiler supports -Wsign-compare... yes
checking whether compiler supports -Wundef... yes
checking whether compiler supports -Wno-format-zero-length... yes
checking whether compiler supports -pipe... yes
checking whether compiler supports -g3... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking size of void *... 8
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of intmax_t... 8
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether pause instruction is compilable... yes
checking number of significant virtual address bits... 48
checking for x86_64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-unknown-linux-gnu-nm... no
checking for nm... nm
checking for gawk... gawk
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking whether malloc_usable_size definition can use const argument... no
checking for library containing log... -lm
checking whether __attribute__ syntax is compilable... yes
checking whether compiler supports -fvisibility=hidden... yes
checking whether compiler supports -fvisibility=hidden... no
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether tls_model attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether alloc_size attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether format(gnu_printf, ...) attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether format(printf, ...) attribute is compilable... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for x86_64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for ld... /usr/bin/ld
checking for autoconf... false
checking for memalign... yes
checking for valloc... yes
checking whether compiler supports -O3... yes
checking whether compiler supports -O3... no
checking whether compiler supports -funroll-loops... yes
checking configured backtracing method... N/A
checking for sbrk... yes
checking whether utrace(2) is compilable... no
checking whether a program using __builtin_unreachable is compilable... yes
checking whether a program using __builtin_ffsl is compilable... yes
checking LG_PAGE... 12
Missing VERSION file, and unable to generate it; creating bogus VERSION
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlsym... no
checking for dlsym in -ldl... yes
checking whether pthread_atfork(3) is compilable... yes
checking whether pthread_setname_np(3) is compilable... yes
checking for library containing clock_gettime... none required
checking whether clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is compilable... yes
checking whether clock_gettime(CLOCK_MONOTONIC, ...) is compilable... yes
checking whether mach_absolute_time() is compilable... no
checking whether compiler supports -Werror... yes
checking whether syscall(2) is compilable... yes
checking for secure_getenv... yes
checking for sched_getcpu... yes
checking for sched_setaffinity... yes
checking for issetugid... no
checking for _malloc_thread_cleanup... no
checking for _pthread_mutex_init_calloc_cb... no
checking for TLS... yes
checking whether C11 atomics is compilable... no
checking whether GCC __atomic atomics is compilable... yes
checking whether GCC __sync atomics is compilable... yes
checking whether Darwin OSAtomic*() is compilable... no
checking whether madvise(2) is compilable... yes
checking whether madvise(..., MADV_FREE) is compilable... no
checking whether madvise(..., MADV_DONTNEED) is compilable... yes
checking whether madvise(..., MADV_DO[NT]DUMP) is compilable... yes
checking whether madvise(..., MADV_[NO]HUGEPAGE) is compilable... yes
checking whether to force 32-bit __sync_{add,sub}_and_fetch()... no
checking whether to force 64-bit __sync_{add,sub}_and_fetch()... no
checking for __builtin_clz... yes
checking whether Darwin os_unfair_lock_*() is compilable... no
checking whether Darwin OSSpin*() is compilable... no
checking whether glibc malloc hook is compilable... yes
checking whether glibc memalign hook is compilable... yes
checking whether pthreads adaptive mutexes is compilable... yes
checking whether compiler supports -D_GNU_SOURCE... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether strerror_r returns char with gnu source is compilable... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating jemalloc.pc
config.status: creating doc/html.xsl
config.status: creating doc/manpages.xsl
config.status: creating doc/jemalloc.xml
config.status: creating include/jemalloc/jemalloc_macros.h
config.status: creating include/jemalloc/jemalloc_protos.h
config.status: creating include/jemalloc/jemalloc_typedefs.h
config.status: creating include/jemalloc/internal/jemalloc_preamble.h
config.status: creating test/test.sh
config.status: creating test/include/test/jemalloc_test.h
config.status: creating config.stamp
config.status: creating bin/jemalloc-config
config.status: creating bin/jemalloc.sh
config.status: creating bin/jeprof
config.status: creating include/jemalloc/jemalloc_defs.h
config.status: creating include/jemalloc/internal/jemalloc_internal_defs.h
config.status: creating test/include/test/jemalloc_test_defs.h
config.status: executing include/jemalloc/internal/public_symbols.txt commands
config.status: executing include/jemalloc/internal/private_symbols.awk commands
config.status: executing include/jemalloc/internal/private_symbols_jet.awk commands
config.status: executing include/jemalloc/internal/public_namespace.h commands
config.status: executing include/jemalloc/internal/public_unnamespace.h commands
config.status: executing include/jemalloc/internal/size_classes.h commands
config.status: executing include/jemalloc/jemalloc_protos_jet.h commands
config.status: executing include/jemalloc/jemalloc_rename.h commands
config.status: executing include/jemalloc/jemalloc_mangle.h commands
config.status: executing include/jemalloc/jemalloc_mangle_jet.h commands
config.status: executing include/jemalloc/jemalloc.h commands
===============================================================================
jemalloc version : 0.0.0-0-g0000000000000000000000000000000000000000
library revision : 2
CONFIG : --disable-cxx --with-jemalloc-prefix=_rjem_ --with-private-namespace=_rjem_ --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --prefix=/tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out build_alias=x86_64-unknown-linux-gnu host_alias=x86_64-unknown-linux-gnu CC=cc 'CFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall' 'LDFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall' 'CPPFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall'
CC : cc
CONFIGURE_CFLAGS : -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops
SPECIFIED_CFLAGS : -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall
EXTRA_CFLAGS :
CPPFLAGS : -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT
CXX :
CONFIGURE_CXXFLAGS :
SPECIFIED_CXXFLAGS :
EXTRA_CXXFLAGS :
LDFLAGS : -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall
EXTRA_LDFLAGS :
DSO_LDFLAGS : -shared -Wl,-soname,$(@F)
LIBS : -lm -lpthread -ldl
RPATH_EXTRA :
XSLTPROC : false
XSLROOT :
PREFIX : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out
BINDIR : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/bin
DATADIR : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/share
INCLUDEDIR : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/include
LIBDIR : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/lib
MANDIR : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/share/man
srcroot : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/jemalloc/
abs_srcroot : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/jemalloc/
objroot :
abs_objroot : /tmp/pyoxidizerEm3cQJ/build/target/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-cac09ba3ea1f5807/out/build/
JEMALLOC_PREFIX : _rjem_
JEMALLOC_PRIVATE_NAMESPACE
: _rjem_je_
install_suffix :
malloc_conf :
autogen : 0
debug : 0
stats : 1
prof : 0
prof-libunwind : 0
prof-libgcc : 0
prof-gcc : 0
fill : 1
utrace : 0
xmalloc : 0
log : 0
lazy_lock : 0
cache-oblivious : 1
cxx : 0
===============================================================================
running: "make" "srcroot=../jemalloc/" "-j" "6"
--- stderr
thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2/build.rs:389:19
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest
Caused by:
0: building Python executable
1: building executable with Rust project
2: reading cargo output
3: command ["/root/.cache/pyoxidizer/rust/1.54.0-x86_64-unknown-linux-gnu/bin/cargo", "build", "--target", "x86_64-unknown-linux-gnu", "--target-dir", "/tmp/pyoxidizerEm3cQJ/build/target", "--bin", "q", "--locked", "--release", "--no-default-features", "--features", "build-mode-prebuilt-artifacts cpython-link-unresolved-static global-allocator-jemalloc allocator-jemalloc"] exited with code 101
--> ./pyoxidizer.bzl:50:5
|
50 | files.add_python_resource(".", exe)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PythonExecutable.to_file_manifest()
error: adding PythonExecutable to FileManifest
Caused by:
0: building Python executable
1: building executable with Rust project
2: reading cargo output
3: command ["/root/.cache/pyoxidizer/rust/1.54.0-x86_64-unknown-linux-gnu/bin/cargo", "build", "--target", "x86_64-unknown-linux-gnu", "--target-dir", "/tmp/pyoxidizerEm3cQJ/build/target", "--bin", "q", "--locked", "--release", "--no-default-features", "--features", "build-mode-prebuilt-artifacts cpython-link-unresolved-static global-allocator-jemalloc allocator-jemalloc"] exited with code 101
I ran into this at one point, and it was because make and autoconf were not installed.
I ran into this issue on RockyLinux8. and it was mainly because make & autoconf were missing. @dae thx for the hint :)
Followed the error message here, also resolved by installing make and autoconf. Thanks!