Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mismatched parenthesis in build_win.bat #12451

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcus-sonestedt
Copy link

This fix removes confusing error output at end of a successful build.

@jschuh
Copy link
Contributor

jschuh commented Apr 1, 2024

I don't know what error output you're seeing, but the proposed change is incorrect. The code currently works, because the parentheses match after the final variable expansion, prior to arithmetic evaluation. Whereas removing those parentheses would break the batch file by generating mismatched parentheses after expansion.

Just to be sure, I ran build_win.bat, and here's the last two lines of output that I see, which confirm that the results of DIFF_TIME match the observed wall time (5 minutes and 2 seconds):

Total Build Time Elapsed 00:05:02.11
All steps completed successfully.

@marcus-sonestedt
Copy link
Author

marcus-sonestedt commented Apr 1, 2024

Huh. I got an error on mismatched parenthesis (was in error message) reported and making that adjustment fixed it for me. Will double check tomorrow to try to replicate it.

Might be some build environment differences.

@marcus-sonestedt
Copy link
Author

marcus-sonestedt commented Apr 3, 2024

Yeah. I am getting this, when starting cmd.exe and just running build_win.bat
The build did succeed though.
I am on Windows 11 and it's using VS2022 Pro to build.

-- Build files have been written to: D:/Dev/PrusaSlicer/build
MSBuild version 17.9.8+b34f75857 for .NET Framework
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification [D:\Dev\PrusaSlicer\build\src\Prus
aSlicer.vcxproj]
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library [D:\Dev\PrusaSlicer\build\src\PrusaSlicer.vcxproj]
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library [D:\Dev\PrusaSlicer\build\src\PrusaSlicer.vcxproj]
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification [D:\Dev\PrusaSlicer\build\tests\sl
ic3rutils\slic3rutils_tests.vcxproj]
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library [D:\Dev\PrusaSlicer\build\tests\slic3rutils\slic3rutils_tests.vcxproj]
LINK : w1arning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library [D:\Dev\PrusaSlicer\build\tests\slic3rutils\slic3rutils_tests.vcxproj]
Unbalanced parenthesis.
Total Build Time Elapsed 00:00:00,00
ERROR: *** Build process failed at run step. ***

@marcus-sonestedt
Copy link
Author

marcus-sonestedt commented Apr 3, 2024

I get same result if i start cmd.exe directly, or from a power shell terminal (my go-to shell prompt).
There's nothing obvious in my environment vars that sticks out.

Huh. I mean, it's nothing major but it's odd. Looking at the code more carefully I agree with you that it should work as is.
Is "DelayedExpansion" somehow not working as intended?

@marcus-sonestedt
Copy link
Author

marcus-sonestedt commented Apr 3, 2024

I've been wrestling with cmd.exe for 25+ years but never seen this mismatch in behavior.

I could volunteer to write a powershell script that does the same instead, I guess. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants