protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.64k stars 15.49k forks source link

[MSVC] [WINDOWS] Error copying file "C:/gitP/google/protobuf/upb/base/descriptor_constants.h" to "C:/gitP/google/protobuf/build_amd64/tmp-install-test/C:/gitP/google/protobuf/upb/base/descriptor_constants.h". 'true' is not recognized as an internal or external command, operable program or batch file. #16828

Open SyahmieS opened 5 months ago

SyahmieS commented 5 months ago

[MSVC] [WINDOWS] _Error copying file "C:/gitP/google/protobuf/upb/base/descriptor_constants.h" to "C:/gitP/google/protobuf/build_amd64/tmp-install-test/C:/gitP/google/protobuf/upb/base/descriptorconstants.h". 'true' is not recognized as an internal or external command, operable program or batch file. It can be reproduced on this commit 2f6e705. Could you please help and take a look at this? Thanks in advance!

Steps to reproduce the behaviour:

  1. git clone https://github.com/google/protobuf C:\gitP\google\protobuf
  2. Open a VS2022 x64 cmd
  3. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 & set CL= /Bcapture_repro C:\a_work_temp\rwc_project_logs\Google_Protobuf\preprocessed_repro_build & set LINK= /onfailrepro:C:\a_work_temp\rwc_project_logs\Google_Protobuf\link_repro_build
  4. set CL=/bigobj %CL%
  5. cd /d C:\gitP\google\protobuf\build_amd64
  6. msbuild /m /p:Platform=x64 /p:Configuration=Release protobuf.sln /t:Rebuild 2>&1

Error Message: Error copying file "C:/gitP/google/protobuf/upb/base/descriptor_constants.h" to "C:/gitP/google/protobuf/build_amd64/tmp-install-test/C:/gitP/google/protobuf/upb/base/descriptor_constants.h". 'true' is not recognized as an internal or external command, operable program or batch file. & Error copying file "C:/gitP/google/protobuf/upb/base/descriptor_constants.h" to "C:/gitP/google/protobuf/build_amd64_ltcg/tmp-install-test/C:/gitP/google/protobuf/upb/base/descriptor_constants.h". 'true' is not recognized as an internal or external command, operable program or batch file.

Expected behaviour: Project passed.

Yukimura-2K commented 4 months ago

I'm also got this probmle. In span of days, there was no any feedback for this question. Can anyone pay attention to this problem?

zhangskz commented 3 months ago

Seems like this is a result of something like https://stackoverflow.com/questions/22046780/whats-the-windows-command-shell-equivalent-of-bashs-true-command though its not clear to me where.

AFAICT, this doesn't obviously seem to be a protobuf issue but seems likely to be something broken for windows in your specific workflow (maybe VsDevCmd.bat or msbuild?). I'm not certain msbuild falls under our official support, but happy to take a contribution here if there's something that can be fixed on our side.

Zhaojun-Liu commented 3 months ago

Seems like this is a result of something like https://stackoverflow.com/questions/22046780/whats-the-windows-command-shell-equivalent-of-bashs-true-command though its not clear to me where.

AFAICT, this doesn't obviously seem to be a protobuf issue but seems likely to be something broken for windows in your specific workflow (maybe VsDevCmd.bat or msbuild?). I'm not certain msbuild falls under our official support, but happy to take a contribution here if there's something that can be fixed on our side.

Hi, I use commit 62d5d9b, it builds ok, but when I use the latest commit, it issues the same error (Error copying file......) with this issue. I also build with Visual Studio.

JasonLunn commented 1 month ago

I don't have access to a Windows system to reproduce the issue. Would it be possible to use https://git-scm.com/docs/git-bisect to pinpoint what commit broke this for you?

Zhaojun-Liu commented 2 weeks ago

I don't have access to a Windows system to reproduce the issue. Would it be possible to use https://git-scm.com/docs/git-bisect to pinpoint what commit broke this for you?

@JasonLunn This commit 6898451f5e4c84e79a6f48ea6c46959960743970 caused the issue. Can you take a look? Thanks.

JasonLunn commented 2 weeks ago

@mkruskal-google - can you take a look as the comment in question is part of your work to setup upb installation?

CC: @haberman