#protobuf-src build script failure on Windows

20 messages · Page 1 of 1 (latest)

vernal lily
#

i cannot upload files

#

lovely

#
   Compiling solana-thin-client v1.16.19
   Compiling solana-client v1.16.19
error: failed to run custom build command for `protobuf-src v1.1.0+21.5`

Caused by:
  process didn't exit successfully: `C:\Users\archi\OneDrive\Desktop\roobot\apps\roobot-backend\target\debug\build\protobuf-src-40e4928404fb4679\build-script-build` (exit code: 101)
  --- stdout
  running: "sh" "-c" "exec \"$0\" \"$@\"" "C:\\Users\\archi\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\protobuf-src-1.1.0+21.5\\protobuf\\configure" "--prefix=C:\\Users\\archi\\OneDrive\\Desktop\\roobot\\apps\\roobot-backend\\target\\debug\\build\\protobuf-src-348ae1cbe2a1e0de\\out\\install" "--prefix=/c/Users/archi/OneDrive/Desktop/roobot/apps/roobot-backend/target/debug/build/protobuf-src-348ae1cbe2a1e0de/out/install" "--srcdir=/c/Users/archi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/protobuf-src-1.1.0+21.5/protobuf" "--disable-shared" "--enable-static" "--disable-maintainer-mode"
  checking whether to enable maintainer-specific portions of Makefiles... no
  checking build system type... x86_64-pc-mingw64
  checking host system type... x86_64-pc-mingw64
  checking target system type... x86_64-pc-mingw64
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a race-free mkdir -p... /usr/bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... no
  checking whether make supports nested variables... no
  checking whether UID '197609' is supported by ustar format... yes
  checking whether GID '197609' is supported by ustar format... yes
  checking how to create a ustar tar archive... gnutar
  checking whether make supports nested variables... (cached) no
  checking for gcc... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\cl.exe
  checking whether the C compiler works... no

  --- stderr
  configure: error: in `/c/Users/archi/OneDrive/Desktop/roobot/apps/roobot-backend/target/debug/build/protobuf-src-348ae1cbe2a1e0de/out/install/build':
  configure: error: C compiler cannot create executables
  See `config.log' for more details
  thread 'main' panicked at C:\Users\archi\.cargo\registry\src\index.crates.io-6f17d22bba15001f\autotools-0.2.6\src\lib.rs:781:5:

  command did not execute successfully, got: exit code: 77

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
#

sorry for horrible format but i am unable to upload files here

#

please ping me if you reply

rancid hedge
#

protobuf-src build script failure on Windows

#

We don't allow bounties here, but someone would be happy to help anyway

rancid hedge
#

From the looks of it, you might be missing the C++ toolchain in your MSVC installation

vernal lily
#

still same error, here is a snippet from config.log:

C:\Users\archi\.cargo\registry\src\index.crates.io-6f17d22bba15001f\protobuf-src-1.1.0+21.5\protobuf\configure: line 4712: C:\Program: No such file or directory```

why is it trying to go to `C:\Program:`
rancid hedge
#

C:\Program Files\Microsoft Visual Studio is probably being interpreted as C:\Program ,Files\Microsoft ,Visual ,Studio

vernal lily
#

thank you

rancid hedge
#

seems like the recommended course of action is to

  1. make a shortcut for C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\cl.exe that does not have any spaces in the file name
  2. somehow configure autotools to use that shortcut instead
vernal lily