"make update" Fails: Building on Windows 10

So, I have been trying to build the latest version of blender but I cant run the “make update” command without it failing on me.

$ make update
python3 ./build_files/utils/make_update.py
GNUmakefile:495: recipe for target ‘update’ failed
process_begin: CreateProcess(NULL, python3 ./build_files/utils/make_update.py, …) failed.
make (e=2): The system cannot find the file specified.
make: *** [update] Error 2

The file is definitely there.
I’m kind of at a loss, this hasn’t happened to me when building before.

Re-installed Python, no luck.

is python3 in the PATH ?

It’s using GNUMakefile instead of make.bat, only the latter works on Windows.

Either use ./make.bat update or use the Windows command prompt.
https://wiki.blender.org/wiki/Building_Blender/Windows

@Brecht, this happens more often than i’d like, is there any chance we can have something like

ifeq ($(OS),Windows_NT)
	error out, and tell them about make.bat
endif

in the GNUMakefile file? i tried having a go at it, but make and i are not friends

Does this work?

diff --git a/GNUmakefile b/GNUmakefile
index 98bfded..0e84b47 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -152,6 +152,9 @@ Information
 endef
 # HELP_TEXT (end)
 
+ifeq ($(OS),Windows_NT)
+    $(error "On Windows, please use ./make.bat instead of make")
+endif
 
 # System Vars
 OS:=$(shell uname -s)

Sorry, my brain was fried last night and I used GitBash to build blender instead of the command prompt. That was the issue. Maybe specify that you need to run from CMD in the error message.

I think the suggested message is fine since the important bit is to use the make.bat batch script. Works in a powershell window too that way.

yup that did the trick!

bash-3.1$ make full
GNUmakefile:145: *** "On Windows, please use ./make.bat instead of make".  Stop.

however… we may need to tweak the message a little bit, if you stay in the bash shell and follow instructions…

bash-3.1$ ./make.bat
./make.bat: line 1: @echo: command not found
./make.bat: line 2: REM: command not found
./make.bat: line 3: REM: command not found
./make.bat: line 3: build: command not found
./make.bat: line 4: setlocal: command not found
./make.bat: line 5: setlocal: command not found
./make.bat: line 8: call: command not found
./make.bat: line 10: call: command not found
./make.bat: line 19: syntax error near unexpected token `('
./make.bat: line 19: `if "%BUILD_SHOW_HASHES%" == "1" ('
bash-3.1$

which is not unexpected, two options at this point

  1. ask them to switch shell
  2. change the messaging to have them run the windows batch from the bash shell using
bash-3.1$ cmd //c make.bat showhash
Branch_hash=525fc36a8056048245cc89f4904d232480ce2258
Locale_hash=0fd21a7cc382066d184fda8153f925bb825af2c6
Addons_Hash=115df62ee4fa9bbbe4ac8d052a3525df4caaa181
bash-3.1$

note: double slash in //c is not a typo

i’m leaning towards 1, mostly since i have no idea how many skeletons are hiding in the bash+calling cmd.exe to run a batch file closet

Are you using WSL? ./make.bat has always worked for me in Git Bash.

Maybe we need to print something different for both cases.

i tested with mingw64’s bash.

edit got curious and tried WSL with this patch:

WSL will just call the linux make and make a linux build, that still works fine after applying the patch.