#protobuf-src build script failure on Windows
20 messages · Page 1 of 1 (latest)
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

protobuf-src build script failure on Windows
We don't allow bounties here, but someone would be happy to help anyway
oh ok, thanks.
From the looks of it, you might be missing the C++ toolchain in your MSVC installation
Try follow this https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170 and hopefully that fixes things
thanks
will test
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:`
C:\Program Files\Microsoft Visual Studio is probably being interpreted as C:\Program ,Files\Microsoft ,Visual ,Studio
seems like the recommended course of action is to
- make a shortcut for
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\cl.exethat does not have any spaces in the file name - somehow configure autotools to use that shortcut instead
i will take a shot at this, thank you.
