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

Not Working Cargo Install? #73

Closed
JewishLewish opened this issue Jun 13, 2024 · 7 comments · Fixed by #74
Closed

Not Working Cargo Install? #73

JewishLewish opened this issue Jun 13, 2024 · 7 comments · Fixed by #74
Assignees
Labels
bug Something isn't working priority-high High priority issue

Comments

@JewishLewish
Copy link

Doing cargo install quincy outputs the following:

error: failed to run custom build command for `jemalloc-sys v0.5.4+5.3.0-patched`
@M0dEx M0dEx self-assigned this Jun 13, 2024
@M0dEx M0dEx added bug Something isn't working priority-high High priority issue labels Jun 13, 2024
@M0dEx
Copy link
Owner

M0dEx commented Jun 13, 2024

Hi!

Are there any errors before or after this message?

@JewishLewish
Copy link
Author

Full error:

error: failed to run custom build command for `jemalloc-sys v0.5.4+5.3.0-patched`

Caused by:
  process didn't exit successfully: `C:\Users\Name\AppData\Local\Temp\cargo-installNK7afH\release\build\jemalloc-sys-083d50a52f86f4e4\build-script-build` (exit code: 101)
  --- stdout
  TARGET=x86_64-pc-windows-gnu
  HOST=x86_64-pc-windows-gnu
  NUM_JOBS=6
  OUT_DIR="C:\\Users\\Name\\AppData\\Local\\Temp\\cargo-installNK7afH\\release\\build\\jemalloc-sys-01a725aa2cb2e3ba\\out"
  BUILD_DIR="C:\\Users\\Name\\AppData\\Local\\Temp\\cargo-installNK7afH\\release\\build\\jemalloc-sys-01a725aa2cb2e3ba\\out\\build"
  SRC_DIR="C:\\Users\\Name\\.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("3")
  TARGET = Some("x86_64-pc-windows-gnu")
  HOST = Some("x86_64-pc-windows-gnu")
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
  CC_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
  CC_x86_64_pc_windows_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=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,sse,sse2,sse3")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
  CFLAGS_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
  CFLAGS_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  CC="gcc.exe"
  CFLAGS="-O3 -ffunction-sections -fdata-sections -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" "/c/Users/Name/AppData/Local/Temp/cargo-installNK7afH/release/build/jemalloc-sys-01a725aa2cb2e3ba/out/build/configure" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-w64-mingw32" "--build=x86_64-w64-mingw32" "--prefix=C:\\Users\\Name\\AppData\\Local\\Temp\\cargo-installNK7afH\\release\\build\\jemalloc-sys-01a725aa2cb2e3ba\\out"

  --- stderr
  thread 'main' panicked at C:\Users\Name\.cargo\registry\src\index.crates.io-6f17d22bba15001f\jemalloc-sys-0.5.4+5.3.0-patched\build.rs:347:19:
  failed to execute command: program not found
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `quincy v0.10.0`, intermediate artifacts can be found at `C:\Users\Name\AppData\Local\Temp\cargo-installNK7afH`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

"Name" is my PC name. I wanted it private

@JewishLewish
Copy link
Author

JewishLewish commented Jun 15, 2024

Update on issue. The error above was solved by adding a new PATH onto the window's client for sh.

However... a new error occurs

error: failed to run custom build command for `jemalloc-sys v0.5.4+5.3.0-patched`

Caused by:
  process didn't exit successfully: `C:\Users\NAME\AppData\Local\Temp\cargo-installvr0BAT\release\build\jemalloc-sys-083d50a52f86f4e4\build-script-build` (exit code: 101)
  --- stdout
  TARGET=x86_64-pc-windows-gnu
  HOST=x86_64-pc-windows-gnu
  NUM_JOBS=6
  OUT_DIR="C:\\Users\\NAME\\AppData\\Local\\Temp\\cargo-installvr0BAT\\release\\build\\jemalloc-sys-01a725aa2cb2e3ba\\out"
  BUILD_DIR="C:\\Users\\NAME\\AppData\\Local\\Temp\\cargo-installvr0BAT\\release\\build\\jemalloc-sys-01a725aa2cb2e3ba\\out\\build"
  SRC_DIR="C:\\Users\\NAME\\.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("3")
  TARGET = Some("x86_64-pc-windows-gnu")
  HOST = Some("x86_64-pc-windows-gnu")
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
  CC_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
  CC_x86_64_pc_windows_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=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,sse,sse2,sse3")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
  CFLAGS_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
  CFLAGS_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  CC="gcc.exe"
  CFLAGS="-O3 -ffunction-sections -fdata-sections -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" "/c/Users/NAME/AppData/Local/Temp/cargo-installvr0BAT/release/build/jemalloc-sys-01a725aa2cb2e3ba/out/build/configure" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-w64-mingw32" "--build=x86_64-w64-mingw32" "--prefix=C:\\Users\\NAME\\AppData\\Local\\Temp\\cargo-installvr0BAT\\release\\build\\jemalloc-sys-01a725aa2cb2e3ba\\out"
  checking for xsltproc... false
  checking for x86_64-w64-mingw32-gcc... gcc.exe
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.exe
  checking for suffix of executables... .exe
  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 gcc.exe accepts -g... yes
  checking for gcc.exe 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... no
  checking whether compiler supports -Wall... yes
  checking whether compiler supports -Wextra... 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 -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... yes
  checking whether compiler supports -pipe... yes
  checking whether compiler supports -g3... yes
  checking how to run the C preprocessor... gcc.exe -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... 4
  checking size of long long... 8
  checking size of intmax_t... 8
  checking build system type... x86_64-w64-mingw32
  checking host system type... x86_64-w64-mingw32
  checking whether pause instruction is compilable... yes
  checking number of significant virtual address bits... 48
  checking for x86_64-w64-mingw32-ar... no
  checking for ar... ar
  checking for x86_64-w64-mingw32-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... yes
  checking for library containing log... none required
  checking whether __attribute__ syntax is compilable... yes
  checking whether compiler supports -Werror... yes
  checking whether compiler supports -herror_on_warning... yes
  checking whether tls_model attribute is compilable... yes
  checking whether compiler supports -Werror... yes
  checking whether compiler supports -herror_on_warning... yes
  checking whether alloc_size attribute is compilable... yes
  checking whether compiler supports -Werror... yes
  checking whether compiler supports -herror_on_warning... yes
  checking whether format(gnu_printf, ...) attribute is compilable... yes
  checking whether compiler supports -Werror... yes
  checking whether compiler supports -herror_on_warning... yes
  checking whether format(printf, ...) attribute is compilable... yes
  checking whether compiler supports -Werror... yes
  checking whether compiler supports -herror_on_warning... yes
  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... yes
  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-w64-mingw32-ranlib... no
  checking for ranlib... ranlib
  checking for ld... /c/msys64/mingw64/bin/ld
  checking for autoconf... false
  checking for memalign... no
  checking for valloc... no
  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... no
  checking whether utrace(2) is compilable... no
  checking whether utrace(2) with label is compilable... no
  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 for library containing clock_gettime... none required
  checking whether clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is compilable... no
  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... no
  checking for secure_getenv... no
  checking for sched_getcpu... no
  checking for sched_setaffinity... no
  checking for issetugid... no
  checking for _malloc_thread_cleanup... no
  checking for _pthread_mutex_init_calloc_cb... no
  checking for memcntl... no
  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... no
  checking whether posix_madvise is compilable... no
  checking whether mprotect(2) is compilable... no
  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... yes
  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-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=C:\Users\NAME\AppData\Local\Temp\cargo-installvr0BAT\release\build\jemalloc-sys-01a725aa2cb2e3ba\out build_alias=x86_64-w64-mingw32 host_alias=x86_64-w64-mingw32 CC=gcc.exe 'CFLAGS=-O3 -ffunction-sections -fdata-sections -m64 -Wall' 'LDFLAGS=-O3 -ffunction-sections -fdata-sections -m64 -Wall' 'CPPFLAGS=-O3 -ffunction-sections -fdata-sections -m64 -Wall'
  CC                 : gcc.exe
  CONFIGURE_CFLAGS   : -std=gnu11 -Wall -Wextra -Wsign-compare -Wundef -Wno-format-zero-length -Wpointer-arith -Wno-missing-braces -Wno-missing-field-initializers -Wno-missing-attributes -pipe -g3 -Wimplicit-fallthrough -O3 -funroll-loops
  SPECIFIED_CFLAGS   : -O3 -ffunction-sections -fdata-sections -m64 -Wall
  EXTRA_CFLAGS       :
  CPPFLAGS           : -O3 -ffunction-sections -fdata-sections -m64 -Wall -D_REENTRANT
  CXX                :
  CONFIGURE_CXXFLAGS :
  SPECIFIED_CXXFLAGS :
  EXTRA_CXXFLAGS     :
  LDFLAGS            : -O3 -ffunction-sections -fdata-sections -m64 -Wall
  EXTRA_LDFLAGS      :
  DSO_LDFLAGS        : -shared
  LIBS               :
  RPATH_EXTRA        :

  XSLTPROC           : false
  XSLROOT            :

  PREFIX             : C:\Users\NAME\AppData\Local\Temp\cargo-installvr0BAT\release\build\jemalloc-sys-01a725aa2cb2e3ba\out
  BINDIR             : C:UsersNAMEAppDataLocalTempcargo-installvr0BATreleasebuildjemalloc-sys-01a725aa2cb2e3baout/bin
  DATADIR            : C:\Users\NAME\AppData\Local\Temp\cargo-installvr0BAT\release\build\jemalloc-sys-01a725aa2cb2e3ba\out/share
  INCLUDEDIR         : C:UsersNAMEAppDataLocalTempcargo-installvr0BATreleasebuildjemalloc-sys-01a725aa2cb2e3baout/include
  LIBDIR             : C:UsersNAMEAppDataLocalTempcargo-installvr0BATreleasebuildjemalloc-sys-01a725aa2cb2e3baout/lib
  MANDIR             : C:\Users\NAME\AppData\Local\Temp\cargo-installvr0BAT\release\build\jemalloc-sys-01a725aa2cb2e3ba\out/share/man

  srcroot            : /c/Users/NAME/AppData/Local/Temp/cargo-installvr0BAT/release/build/jemalloc-sys-01a725aa2cb2e3ba/out/build/
  abs_srcroot        : /c/Users/NAME/AppData/Local/Temp/cargo-installvr0BAT/release/build/jemalloc-sys-01a725aa2cb2e3ba/out/build/
  objroot            :
  abs_objroot        : /tmp/cargo-installvr0BAT/release/build/jemalloc-sys-01a725aa2cb2e3ba/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          : 0
  cache-oblivious    : 1
  cxx                : 0
  ===============================================================================
  running: "mingw32-make" "-j" "6"

  --- stderr
  mingw32-make: *** No rule to make target '/c/Users/NAME/AppData/Local/Temp/cargo-installvr0BAT/release/build/jemalloc-sys-01a725aa2cb2e3ba/out/build/src/jemalloc.c', needed by 'src/jemalloc.o'.  Stop.
  thread 'main' panicked at C:\Users\NAME\.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: "mingw32-make" "-j" "6"
  expected success, got: exit code: 2
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I have tested my console and it shows that mingw32-make is installed. I am not sure how to troubleshoot the issue because this seems to be an issue on Window's side and it's ability to properly compile the somewhat-funky jemallocator (gnzlbg/jemallocator#91)

Edit: Is there a way to use the service without using jemallocator or make it so if users are interested in using it then they should apply the simple change themselves?

@M0dEx
Copy link
Owner

M0dEx commented Jun 15, 2024

I don't think there is a way to cargo install Quincy without jemallocator (unless you're using MSVC) at the moment. I could probably make it a default feature, as you can disable those if needed during cargo install.

@M0dEx
Copy link
Owner

M0dEx commented Jun 18, 2024

I apologize for the delay; I might have to remove jemallocator for Windows altogether since it requires some extra dependencies and there seem to be frequent problems with it on Windows.

@M0dEx
Copy link
Owner

M0dEx commented Jun 18, 2024

Could you try installing Quincy from this branch?

cargo install quincy --git https://github.com/M0dEx/quincy.git --branch '#73/jemallocator'

@M0dEx
Copy link
Owner

M0dEx commented Jun 23, 2024

@JewishLewish Did you manage to build Quincy using the command I provided?

@M0dEx M0dEx closed this as completed in #74 Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-high High priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants