Open kraln opened 4 months ago
@kraln @args.tmp
is a way to workaround Windows' limitations regarding the maximum length of the command arguments. It means that the script should read the arguments from the args.tmp
file.
What's strange is that we validate Windows build for nRF Connect SDK applications, so I wonder what is different in your application. Anyway, it would help if you pasted the contents of the args.tmp
file in your build directory.
Reproduction steps
Enabling the Mattery library in the nRF Connect SDK (latest, 2.6.1) causes a build step to be added to the firmware. This build step does not (and can not) function--I would suppose there's some bashism or other assumption about the environment--and results in an error.
Here's the build step which is added (copied out of a fresh project). Note the flipped path separators:
cd /D C:\projects\example\build_new\modules\connectedhomeip && C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe -E echo "Starting Matter library build in C:/projectexample/build_new/modules/connectedhomeip" && C:\ncs\toolchains\cf2149caf2\opt\bin\python.exe C:/ncs/v2.6.1/modules/lib/matter/config/common/cmake/make_gn_args.py @args.tmp > args.gn.tmp && ( C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe -E compare_files args.gn.tmp args.gn || C:/ncs/toolchains/cf2149caf2/opt/bin/cmake.exe -E rename args.gn.tmp args.gn ) && C:\ncs\toolchains\cf2149caf2\opt\bin\gn.exe --root=C:/ncs/v2.6.1/modules/lib/matter --root-target=C:/ncs/v2.6.1/modules/lib/matter/config/nrfconnect/chip-gn --dotfile=C:/ncs/v2.6.1/modules/lib/matter/config/nrfconnect/chip-gn/.gn --script-executable=C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe gen --check --fail-on-unused-args C:/projects/example/build_new/modules/connectedhomeip && ninja && C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe -E echo "Matter library build complete"
The failure is here: make_gn_args.py @args.tmp > args.gn.tmp
make_gn_args.py: error: argument --arg-cflags: expected 2 arguments
Whatever @args.tmp is supposed to be expanded to, is not expanded.
Bug prevalence
100% of the time
GitHub hash of the SDK that was being used
ca3672fbb939180da8e43e6994e01c89fa9dcd02
Platform
windows
Platform Version(s)
No response
Anything else?
No response