Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building fails on FreeBSD #34

Closed
kellytk opened this issue Aug 4, 2022 · 3 comments
Closed

Building fails on FreeBSD #34

kellytk opened this issue Aug 4, 2022 · 3 comments

Comments

@kellytk
Copy link

kellytk commented Aug 4, 2022

I'm attempting to get Vector running on FreeBSD and tikv-jemalloc-sys is the current blocker.

Environment

  • FreeBSD 13.1
  • Rust 1.62.1 installed via rustup

Building

From jemallocator's directory, RUST_BACKTRACE=1 cargo build errors at:

Compiling tikv-jemalloc-sys v0.5.1+5.3.0-patched (/usr/home/testing/tmp/jemallocator/jemalloc-sys)
error: failed to run custom build command for `tikv-jemalloc-sys v0.5.1+5.3.0-patched (/usr/home/testing/tmp/jemallocator/jemalloc-sys)`

Caused by:
  process didn't exit successfully: `/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-bb85bbfc5d535467/build-script-build` (exit status: 101)
  --- stdout
  TARGET=x86_64-unknown-freebsd
  HOST=x86_64-unknown-freebsd
  NUM_JOBS=2
  OUT_DIR="/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out"
  BUILD_DIR="/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build"
  SRC_DIR="/usr/home/testing/tmp/jemallocator/jemalloc-sys"
  cargo:rustc-cfg=prefixed
  cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE
  OPT_LEVEL = Some("0")
  TARGET = Some("x86_64-unknown-freebsd")
  HOST = Some("x86_64-unknown-freebsd")
  CC_x86_64-unknown-freebsd = None
  CC_x86_64_unknown_freebsd = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-freebsd = None
  CFLAGS_x86_64_unknown_freebsd = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  CC="cc"
  CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -g -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" "/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build/configure" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-unknown-freebsd" "--build=x86_64-unknown-freebsd" "--prefix=/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out"
  running: "tail" "-n" "100" "/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build/config.log"

  --- stderr
  configure: error: cannot find sources (Makefile.in) in /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build or ..
  tail: /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build/config.log: No such file or directory
  thread 'main' panicked at 'command did not execute successfully: "tail" "-n" "100" "/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build/config.log"
  expected success, got: exit status: 1', jemalloc-sys/build.rs:331:9
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
     1: core::panicking::panic_fmt
               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
     2: build_script_build::execute
               at ./build.rs:331:9
     3: build_script_build::run
               at ./build.rs:320:5
     4: build_script_build::run_and_log::{{closure}}
               at ./build.rs:315:9
     5: build_script_build::execute
               at ./build.rs:330:9
     6: build_script_build::run_and_log
               at ./build.rs:314:5
     7: build_script_build::main
               at ./build.rs:254:5
     8: core::ops::function::FnOnce::call_once
               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/ops/function.rs:248:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@BusyJay
Copy link
Member

BusyJay commented Aug 4, 2022

Probably duplicated with #32.

@kellytk
Copy link
Author

kellytk commented Aug 4, 2022

Initializing the repo with git clone --recursive https://github.com/tikv/jemallocator.git

RUST_BACKTRACE=1 cargo build

Compiling tikv-jemalloc-sys v0.5.1+5.3.0-patched (/usr/home/testing/tmp/jemallocator/jemalloc-sys)
error: failed to run custom build command for `tikv-jemalloc-sys v0.5.1+5.3.0-patched (/usr/home/testing/tmp/jemallocator/jemalloc-sys)`

Caused by:
  process didn't exit successfully: `/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-bb85bbfc5d535467/build-script-build` (exit status: 101)
  --- stdout
  TARGET=x86_64-unknown-freebsd
  HOST=x86_64-unknown-freebsd
  NUM_JOBS=2
  OUT_DIR="/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out"
  BUILD_DIR="/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build"
  SRC_DIR="/usr/home/testing/tmp/jemallocator/jemalloc-sys"
  cargo:rustc-cfg=prefixed
  cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE
  OPT_LEVEL = Some("0")
  TARGET = Some("x86_64-unknown-freebsd")
  HOST = Some("x86_64-unknown-freebsd")
  CC_x86_64-unknown-freebsd = None
  CC_x86_64_unknown_freebsd = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-freebsd = None
  CFLAGS_x86_64_unknown_freebsd = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  CC="cc"
  CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -g -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" "/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build/configure" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-unknown-freebsd" "--build=x86_64-unknown-freebsd" "--prefix=/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out"
  checking for xsltproc... false
  checking for x86_64-unknown-freebsd-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 -Werror=unknown-warning-option... yes
  checking whether compiler supports -Wall... yes
  checking whether compiler supports -Wextra... yes
  checking whether compiler supports -Wshorten-64-to-32... yes
  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 -Wpointer-arith... yes
  checking whether compiler supports -Wno-missing-braces... yes
  checking whether compiler supports -Wno-missing-field-initializers... yes
  checking whether compiler supports -Wno-missing-attributes... no
  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-freebsd
  checking host system type... x86_64-unknown-freebsd
  checking whether pause instruction is compilable... yes
  checking number of significant virtual address bits... 48
  checking for x86_64-unknown-freebsd-ar... no
  checking for ar... ar
  checking for x86_64-unknown-freebsd-nm... no
  checking for nm... nm
  checking for gawk... no
  checking for mawk... no
  checking for nawk... nawk
  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... yes
  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... no
  checking whether compiler supports -Werror... yes
  checking whether compiler supports -herror_on_warning... no
  checking whether format(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 whether compiler supports -Wimplicit-fallthrough... yes
  checking whether fallthrough attribute is compilable... yes
  checking whether compiler supports -Wimplicit-fallthrough... yes
  checking whether compiler supports -Wimplicit-fallthrough... no
  checking whether compiler supports -Werror... yes
  checking whether compiler supports -herror_on_warning... no
  checking whether cold attribute is compilable... yes
  checking whether vm_make_tag is compilable... no
  checking for a BSD-compatible install... /usr/bin/install -c
  checking for x86_64-unknown-freebsd-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 for malloc_size... no
  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... yes
  checking whether a program using __builtin_unreachable is compilable... yes
  checking whether a program using __builtin_ffsl is compilable... yes
  checking whether a program using __builtin_popcountl is compilable... yes
  checking LG_PAGE... 12
  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... yes
  checking whether pthread_atfork(3) is compilable... yes
  checking whether pthread_setname_np(3) is compilable... yes
  checking whether pthread_getname_np(3) is compilable... yes
  checking whether pthread_get_name_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 clock_gettime(CLOCK_REALTIME, ...) is compilable... yes
  checking whether compiler supports -Werror... yes
  checking whether syscall(2) is compilable... yes
  checking for secure_getenv... no
  checking for sched_getcpu... yes
  checking for sched_setaffinity... yes
  checking for issetugid... yes
  checking for _malloc_thread_cleanup... yes
  checking for _pthread_mutex_init_calloc_cb... yes
  checking for memcntl... no
  Forcing lazy-lock to avoid allocator/threading bootstrap issues
  checking for TLS... yes
  checking whether C11 atomics is compilable... yes
  checking whether GCC __atomic atomics is compilable... yes
  checking whether GCC 8-bit __atomic atomics is compilable... yes
  checking whether GCC __sync atomics is compilable... yes
  checking whether GCC 8-bit __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... yes
  checking whether madvise(..., MADV_DONTNEED) is compilable... yes
  checking whether madvise(..., MADV_DO[NT]DUMP) is compilable... no
  checking whether madvise(..., MADV_[NO]HUGEPAGE) is compilable... no
  checking whether madvise(..., MADV_[NO]CORE) is compilable... yes
  checking whether mprotect(2) is compilable... yes
  checking for __builtin_clz... yes
  checking whether Darwin os_unfair_lock_*() is compilable... no
  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... no
  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/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   : 5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c
  library revision   : 2

  CONFIG             : --disable-cxx --enable-doc=no --enable-shared=no --with-jemalloc-prefix=_rjem_ --with-private-namespace=_rjem_ --host=x86_64-unknown-freebsd --build=x86_64-unknown-freebsd --prefix=/usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out build_alias=x86_64-unknown-freebsd host_alias=x86_64-unknown-freebsd CC=cc 'CFLAGS=-O0 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall' 'LDFLAGS=-O0 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall' 'CPPFLAGS=-O0 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall'
  CC                 : cc
  CONFIGURE_CFLAGS   : -std=gnu11 -Werror=unknown-warning-option -Wall -Wextra -Wshorten-64-to-32 -Wsign-compare -Wundef -Wno-format-zero-length -Wpointer-arith -Wno-missing-braces -Wno-missing-field-initializers -pipe -g3 -fvisibility=hidden -Wimplicit-fallthrough -O3 -funroll-loops
  SPECIFIED_CFLAGS   : -O0 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall
  EXTRA_CFLAGS       :
  CPPFLAGS           : -O0 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall -D_BSD_SOURCE -D_REENTRANT
  CXX                :
  CONFIGURE_CXXFLAGS :
  SPECIFIED_CXXFLAGS :
  EXTRA_CXXFLAGS     :
  LDFLAGS            : -O0 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall
  EXTRA_LDFLAGS      :
  DSO_LDFLAGS        : -shared -Wl,-soname,$(@F)
  LIBS               : -lm  -pthread
  RPATH_EXTRA        :

  XSLTPROC           : false
  XSLROOT            :

  PREFIX             : /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out
  BINDIR             : /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/bin
  DATADIR            : /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/share
  INCLUDEDIR         : /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/include
  LIBDIR             : /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/lib
  MANDIR             : /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/share/man

  srcroot            :
  abs_srcroot        : /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build/
  objroot            :
  abs_objroot        : /usr/home/testing/tmp/jemallocator/target/debug/build/tikv-jemalloc-sys-fb2dd7309adbc360/out/build/

  JEMALLOC_PREFIX    : _rjem_
  JEMALLOC_PRIVATE_NAMESPACE
                     : _rjem_je_
  install_suffix     :
  malloc_conf        :
  documentation      : 0
  shared libs        : 0
  static libs        : 1
  autogen            : 0
  debug              : 0
  stats              : 1
  experimental_smallocx : 0
  prof               : 0
  prof-libunwind     : 0
  prof-libgcc        : 0
  prof-gcc           : 0
  fill               : 1
  utrace             : 0
  xmalloc            : 0
  log                : 0
  lazy_lock          : 1
  cache-oblivious    : 1
  cxx                : 0
  ===============================================================================
  running: "gmake" "-j" "2"

  --- stderr
  thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', jemalloc-sys/build.rs:327:19
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
     1: core::panicking::panic_fmt
               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
     2: build_script_build::execute
               at ./build.rs:327:19
     3: build_script_build::run
               at ./build.rs:320:5
     4: build_script_build::main
               at ./build.rs:258:5
     5: core::ops::function::FnOnce::call_once
               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/ops/function.rs:248:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@kellytk
Copy link
Author

kellytk commented Aug 4, 2022

After installing the gmake pkg it built successfully. I apologize for the erroneous issue.

@kellytk kellytk closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants