Skip to content

v0.7.0 no longer builds on target x86_64-unknown-linux-musl #166

Description

@martinstuder

Version 0.7.0 of jemallocator no longer builds on target x86_64-unknown-linux-musl while version 0.6.1 works just fine.

warning: tikv-jemalloc-sys@0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8: "`background_threads_runtime_support` not supported for `x86_64-unknown-linux-musl`"
error: failed to run custom build command for `tikv-jemalloc-sys v0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8`

Caused by:
  process didn't exit successfully: `/home/xyz/scratch/target/debug/build/tikv-jemalloc-sys-7919d1c5f128d638/build-script-build` (exit status: 101)
  --- stdout
  TARGET=x86_64-unknown-linux-musl
  HOST=x86_64-unknown-linux-gnu
  NUM_JOBS=24
  OUT_DIR="/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out"
  BUILD_DIR="/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out/build"
  SRC_DIR="/home/xyz/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8"
  cargo:rustc-cfg=prefixed
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_MUSL_JEMALLOC_OVERRIDE
  cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-musl
  CC_x86_64-unknown-linux-musl = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_musl
  CC_x86_64_unknown_linux_musl = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CROSS_COMPILE
  CROSS_COMPILE = None
  PATH = Some(/home/xyz/.cargo/bin:/home/xyz/.pixi/bin:/home/xyz/.cargo/bin:/home/xyz/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/rocm/bin:/var/lib/snapd/snap/bin:/home/xyz/.local/share/JetBrains/Toolbox/scripts)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_musl
  CFLAGS_x86_64_unknown_linux_musl = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-musl
  CFLAGS_x86_64-unknown-linux-musl = None
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_MUSL_LDFLAGS
  cargo:rerun-if-env-changed=LDFLAGS
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_MUSL_CPPFLAGS
  cargo:rerun-if-env-changed=CPPFLAGS
  CC="x86_64-linux-musl-gcc"
  CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -g -gdwarf-4 -fno-omit-frame-pointer -m64 -Wall"
  LDFLAGS=""
  CPPFLAGS=""
  JEMALLOC_REPO_DIR="jemalloc"
  cargo:warning="`background_threads_runtime_support` not supported for `x86_64-unknown-linux-musl`"
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_MUSL_JEMALLOC_SYS_WITH_MALLOC_CONF
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_MALLOC_CONF
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_MUSL_JEMALLOC_SYS_WITH_LG_PAGE
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_PAGE
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_MUSL_JEMALLOC_SYS_WITH_LG_HUGEPAGE
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_HUGEPAGE
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_MUSL_JEMALLOC_SYS_WITH_LG_QUANTUM
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_QUANTUM
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_MUSL_JEMALLOC_SYS_WITH_LG_VADDR
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_VADDR
  --with-jemalloc-prefix=_rjem_
  CARGO_FEATURE_STATS set
  running: cd "/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out/build" && CC="x86_64-linux-musl-gcc" CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -g -gdwarf-4 -fno-omit-frame-pointer -m64 -Wall" CPPFLAGS="" LDFLAGS="" "sh" "/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out/build/configure" "--with-version=5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--enable-stats" "--host=x86_64-unknown-linux-musl" "--build=x86_64-unknown-linux-gnu" "--prefix=/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out"
  checking for xsltproc... /usr/bin/xsltproc
  checking for x86_64-unknown-linux-musl-gcc... x86_64-linux-musl-gcc
  checking whether the C compiler works... no
  running: "tail" "-n" "100" "/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out/build/config.log"
  abi=''
  abs_objroot='/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out/build/'
  abs_srcroot='/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/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_sdt=''
  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='yes'
  enable_tls=''
  enable_uaf_detection=''
  enable_utrace=''
  enable_xmalloc=''
  enable_zone_allocator=''
  exe=''
  exec_prefix='/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out'
  force_getenv=''
  host='x86_64-unknown-linux-musl'
  host_alias='x86_64-unknown-linux-musl'
  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='/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out'
  private_namespace=''
  program_transform_name='s,x,x,'
  psdir='${docdir}'
  rev='2'
  runstatedir='${localstatedir}/run'
  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 77

  --- stderr
  configure: error: in `/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out/build':
  configure: error: C compiler cannot create executables
  See `config.log' for more details

  thread 'main' (28063) panicked at /home/xyz/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/build.rs:441:9:
  command did not execute successfully: cd "/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out/build" && CC="x86_64-linux-musl-gcc" CFLAGS="-O0 -ffunction-sections -fdata-sections -fPIC -g -gdwarf-4 -fno-omit-frame-pointer -m64 -Wall" CPPFLAGS="" LDFLAGS="" "sh" "/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out/build/configure" "--with-version=5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--enable-stats" "--host=x86_64-unknown-linux-musl" "--build=x86_64-unknown-linux-gnu" "--prefix=/home/xyz/scratch/target/x86_64-unknown-linux-musl/debug/build/tikv-jemalloc-sys-b22b58680e27ccb8/out"
  expected success, got: exit status: 77
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

The relevant lines from config.log are:

configure:3868: x86_64-linux-musl-gcc --version >&5
gcc (GCC) 16.1.1 20260430
Copyright (C) 2026 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3879: $? = 0
configure:3868: x86_64-linux-musl-gcc -v >&5
Using built-in specs.
Reading specs from /usr/lib/musl/lib/musl-gcc.specs
rename spec cpp_options to old_cpp_options
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust,cobol --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --disable-fixincludes
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.1.1 20260430 (GCC) 
... rest of stderr output deleted ...
configure:3879: $? = 0
configure:3868: x86_64-linux-musl-gcc -V >&5
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3879: $? = 1
configure:3868: x86_64-linux-musl-gcc -qversion >&5
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:3879: $? = 1
configure:3868: x86_64-linux-musl-gcc -version >&5
gcc: error: unrecognized command-line option '-version'
gcc: fatal error: no input files
compilation terminated.
configure:3879: $? = 1
configure:3899: checking whether the C compiler works
configure:3921: x86_64-linux-musl-gcc -O0 -ffunction-sections -fdata-sections -fPIC -g -gdwarf-4 -fno-omit-frame-pointer -m64 -Wall   conftest.c  >&5
/usr/bin/ld: cannot find -latomic_asneeded: No such file or directory
collect2: error: ld returned 1 exit status
configure:3925: $? = 1
configure:3965: result: no

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions