Project

General

Profile

Wt Install Error MSB3073 setlocal

Added by Hamed Davodi about 1 month ago

For this error at install-build step, what is the solution?

Severity    Code    Description Project File    Line    Suppression State   Details
Error   MSB3073 The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. INSTALL C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets   166     

My envirnoment:

Windows 11 Pro
Visual Studio 17 2022 Community
Cmake 3.29 GUI
Boost 1.79
gcc 13.2.0
g++ 13.2.0

Additional logs of cmake configure and generate steps and, vs all_build build step are attached.


Replies (4)

RE: Wt Install Error MSB3073 setlocal - Added by Matthias Van Ceulebroeck about 1 month ago

Hello Hamed,

from the error trace it seems to me like Doxygen is not being executed correctly. If you run your original cmake command, try passing DINSTALL_DOCUMENTATION=OFF.
If that doesn't solve it, it may be possible that your project is configured to have some Post build events triggering, you should try to disable those then.

If that does not work, please let me know.

Best regards,
Matthias

RE: Wt Install Error MSB3073 setlocal - Added by Hamed Davodi 30 days ago

Hi Matthias,

Thank you for your reply. I tried both suggestions couple of times, but it didn't work-out.
In case I've done it incorrectly, please let me know:

On Cmake: Added entry -> DINSTALL_DOCUMENTATION, Bool type, Value unchecked.
On VS: set Post Build Event to "No" for all projects and then, build.
once it was done, INSTALL build step, shows below message:

Build started at 16:04...
1>------ Build started: Project: INSTALL, Configuration: Release x64 ------
1>1>
========== Build: 1 succeeded, 0 failed, 79 up-to-date, 0 skipped ==========
========== Build completed at 16:04 and took 00,617 seconds ==========

And if I set back the Post Build Event to Yes, then same Error MSB3073 "setlocal. Some logs are attached.

I would like to ask, in future, please make YouTube tutorials including build and installation
steps using the latest version of tools on different environment (Linux, Windows, MacOS etc.)

Best,
Hamed

RE: Wt Install Error MSB3073 setlocal - Added by Hamed Davodi 29 days ago

Here are different types of errors on VS at INSTALL build stage:

Severity    Code    Description Project File    Line    Suppression State   Details
Error       Failed to rename file C:/Library/wt-4.10.4/doc/examples/html/classAddresseeEdit__inherit__graph.svg to C:/Library/wt-4.10.4/doc/examples/html/classAddresseeEdit__inherit__graph.svg.tmp!   doxygen-examples    C:\Library\wt-4.10.4\build\CUSTOMBUILD  1       
Error   MSB8066 Custom build for 'C:\Library\wt-4.10.4\build\CMakeFiles\f53d433980df3a805a3b1d4922e23ab7\doxygen-examples.rule' exited with code -1.    doxygen-examples    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets   254     
Error       Failed to rename file C:/Library/wt-4.10.4/doc/reference/html/classWt_1_1Auth_1_1AbstractPasswordService_1_1AbstractStrengthValidator__inherit__graph.svg to C:/Library/wt-4.10.4/doc/reference/html/classWt_1_1Auth_1_1AbstractPasswordService_1_1AbstractStrengthValidator__inherit__graph.svg.tmp!   doxygen C:\Library\wt-4.10.4\build\CUSTOMBUILD  1       
Error       failed to run qhelpgenerator on index.qhp   doxygen C:\Library\wt-4.10.4\build\CUSTOMBUILD  1       
Error   MSB8066 Custom build for 'C:\Library\wt-4.10.4\build\CMakeFiles\f53d433980df3a805a3b1d4922e23ab7\doxygen.rule' exited with code -1. doxygen C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets   254     

According to documentation, install step should create a directory c:/Program Files/WT for headers, but so far, it has not happened.
However, if the tool is ready to use, despite errors, please let me know and don't be shocked because I am new to Cmake, compile and build etc :)
Here's list of lib file under build directory:

C:\Library\wt-4.10.4\build>dir *.lib /S /X
 Volume in drive C has no label.
 Volume Serial Number is 20D4-ABF2

 Directory of C:\Library\wt-4.10.4\build\src\http\Release

03/04/2024  09:44        14.063.532              wthttp.lib
               1 File(s)     14.063.532 bytes

 Directory of C:\Library\wt-4.10.4\build\src\isapi\Release

03/04/2024  09:44         1.218.862              wtisapi.lib
               1 File(s)      1.218.862 bytes

 Directory of C:\Library\wt-4.10.4\build\src\Release

03/04/2024  09:43        74.530.426              wt.lib
03/04/2024  09:44           399.362              wttest.lib
               2 File(s)     74.929.788 bytes

 Directory of C:\Library\wt-4.10.4\build\src\Wt\Dbo\backend\Release

03/04/2024  09:41           186.558 WTDBOM~1.LIB wtdbomssqlserver.lib
03/04/2024  09:41         2.936.112 WTDBOS~1.LIB wtdbosqlite3.lib
               2 File(s)      3.122.670 bytes

 Directory of C:\Library\wt-4.10.4\build\src\Wt\Dbo\Release

03/04/2024  09:41         3.755.230              wtdbo.lib
               1 File(s)      3.755.230 bytes

     Total Files Listed:
               7 File(s)     97.090.082 bytes
               0 Dir(s)  306.629.124.096 bytes free

RE: Wt Install Error MSB3073 setlocal - Added by Matthias Van Ceulebroeck 29 days ago

The CMake trace looks nominal, certain errors are expected there.

The entry should be called INSTALL_DOCUMENTATION, the -D is used for inline/terminal CMake arguments.

EDIT: This is why I also said that some post-actions are failing. I can see that the actual build did succeed. You can copy the headers manually, if you so desire. However, that should be a last resort. The above CMake entry should resolve your issue.
If it doesn't, maybe you can look at the build targets, and disable the documentation (I'm not 100% certain how VS Code handles them).

    (1-4/4)