Home › Forum › SOFA › Building SOFA › Building Sofa, binaries are not generated
Tagged: 64_bits, building sofa, SOFA_1912, VS2019, Windows_10
- This topic has 17 replies, 4 voices, and was last updated 4 years, 5 months ago by Guillaume.
-
AuthorPosts
-
20 May 2020 at 13:12 #16328AnonymousInactive
Dear Sofa team,
I am using windows with VS2019. I have followed the documentation on the website to download and install SOFA. The CMake configuration and generation ran without issues. The solution build was failing at first because a file bin/debug is created at the Cmake step so I deleted it and this allowed the solution to successfully compile without errors. However, the binary files are not created at the end of the compilation and the bin folder doesn’t contain runSofa.exe
Thank you for your help
20 May 2020 at 22:47 #16331HugoKeymasterHi @eliekhairallah
Are you sure the compilation succeeded (if no binary is generated)?
Did you specify the compilation CMAKE_BUILD_TYPE = Release ?Could you please share all the output of the CMake configuration? the output of the compilation?
Best
Hugo
24 May 2020 at 12:10 #16350AnonymousInactiveHello @hugo,
Thank you for your reply. Not all the files were being built, I added them manually and I obtained some errors that I was able to fix. I am down to my last compilation error:
Error MSB3073 The command “setlocal
“D:\Program Files\CMake\bin\ctest.exe” –force-new-ctest-process -C Debug
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 8. RUN_TESTS C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 149Do you know how I could fix that?
Thank you,
Elie24 May 2020 at 12:40 #16351BineshBlockedHi @eliekhairallah
Maybe you have permission problem in your system. such as administrator privilege.
Can you test it in administrator mode?Best,
Behnam Binesh
24 May 2020 at 13:09 #16353AnonymousInactiveHello @secretdevil,
Thank you for your answer. I tried running visual studio as administrator but it still gives the same error.
Best regards,
Elie24 May 2020 at 13:19 #16354BineshBlocked@eliekhairallah
can you share cmake output OR cmake configure?24 May 2020 at 13:30 #16355AnonymousInactiveThis is the output of CMake:
Install prefix: D:/Polytechnique/stage-2020/GIT/sofa/build/install
Adding collection SofaComponentBase
Adding collection SofaComponentCommon
Adding collection SofaComponentGeneral
Adding collection SofaComponentMisc
Adding collection SofaComponentAdvanced
Adding collection SofaComponentAll
— FFmpeg executable was found C:/FFmpeg/bin/ffmpeg.exe
Adding plugin SofaPython
SofaTest: optional dependency SofaPython found, Python_test will be built
Adding module SofaExporter
Adding module SofaSparseSolver
— metis was not found, SparseLDLSolver won’t be built
— csparse was found, SparseLUSolver and SparseCholeskySolver will be built
Adding module SofaPreconditioner
Adding module SofaHaptics
Adding module SofaOpenglVisual
Adding plugin CImgPlugin
CImgPlugin: TIFF Image Format enabled
CImgPlugin: JPEG Image Format enabled
CImgPlugin: PNG Image Format enabled
Adding plugin SofaMiscCollision
SofaMiscModule: build all maintained sofa components.
SofaMiscCollision: optional dependency SofaSphFluid not found de-activing: <SpatialGridPointModel>
— PSL is an experimental feature, use it at your own risk.
Adding application runSofa
Write Plugin list at D:/Polytechnique/stage-2020/GIT/sofa/build/bin/plugin_list.conf.default
CMake Deprecation Warning at CMakeLists.txt:306 (message):
Deprecated components are activated (SOFA_WITH_DEPRECATED_COMPONENTS
variable is ON)Configuring done
Generating done24 May 2020 at 13:56 #16356HugoKeymasterHi @eliekhairallah
I don’t see anything about Qt in CMake, it is a dependency though. Did you follow the Build instructions for Windows?
You are not supposed to move files during compilation.
What is the error when the compilation stops?Best,
Hugo
24 May 2020 at 15:08 #16357AnonymousInactiveHello @hugo,
I followed the build instructions for windows. I only delete the /bin/debug file created after Cmake generation because the compilation fails if that file already exists. Otherwise, I am not moving any files.
I get: error MSB3073: The command “setlocal
The output is below
13>CPack: Create package
13>CPack: – package: D:/Polytechnique/stage-2020/GIT/sofa/build/SOFA_v19.12.00_Win64.exe generated.
12> 1/46 Test #1: SofaHelper_test …………………***Failed 751.38 sec
12> Start 2: SofaDefaultType_test
12> 2/46 Test #2: SofaDefaultType_test ……………. Passed 1.27 sec
12> Start 3: SofaCore_test
12> 3/46 Test #3: SofaCore_test ………………….. Passed 0.83 sec
12> Start 4: SofaSimulationCore_test
12> 4/46 Test #4: SofaSimulationCore_test …………. Passed 7.16 sec
12> Start 5: SofaValidation_test
12> 5/46 Test #5: SofaValidation_test ……………..Exit code 0xc0000135
12>***Exception: 0.53 sec
12> Start 6: SceneCreator_test
12> 6/46 Test #6: SceneCreator_test ……………….Exit code 0xc0000135
12>***Exception: 0.64 sec
12> Start 7: SofaExporter_test
12> 7/46 Test #7: SofaExporter_test ……………….Exit code 0xc0000135
12>***Exception: 0.78 sec
12> Start 8: SofaOpenglVisual_test
12> 8/46 Test #8: SofaOpenglVisual_test ……………Exit code 0xc0000135
12>***Exception: 0.34 sec
12> Start 9: SofaHelper_simutest
12> 9/46 Test #9: SofaHelper_simutest …………….. Passed 0.93 sec
12> Start 10: SofaDefaultType_simutest
12>10/46 Test #10: SofaDefaultType_simutest ………… Passed 0.73 sec
12> Start 11: SofaCore_simutest
12>11/46 Test #11: SofaCore_simutest ……………….***Failed 1.05 sec
12> Start 12: SofaSimulationCore_simutest
12>12/46 Test #12: SofaSimulationCore_simutest ………***Failed 0.53 sec
12> Start 13: Name
12>Could not find executable SofaSimulationGraph_test
12>Unable to find executable: SofaSimulationGraph_test
12>Looked in the following places:
12>SofaSimulationGraph_test
12>SofaSimulationGraph_test.exe
12>Debug/SofaSimulationGraph_test
12>Debug/SofaSimulationGraph_test.exe
12>Debug/SofaSimulationGraph_test
12>Debug/SofaSimulationGraph_test.exe
12>13/46 Test #13: Name …………………………..***Not Run 0.00 sec
12> Start 14: SofaSimulationTree_test
12>14/46 Test #14: SofaSimulationTree_test …………. Passed 1.03 sec
12> Start 15: SofaBaseCollision_test
12>15/46 Test #15: SofaBaseCollision_test …………..Exit code 0xc0000135
12>***Exception: 0.66 sec
12> Start 16: SofaBaseLinearSolver_test
12>16/46 Test #16: SofaBaseLinearSolver_test ………..Exit code 0xc0000135
12>***Exception: 1.36 sec
12> Start 17: SofaBaseMechanics_test
12>17/46 Test #17: SofaBaseMechanics_test …………..Exit code 0xc0000135
12>***Exception: 1.26 sec
12> Start 18: SofaBaseTopology_test
12>18/46 Test #18: SofaBaseTopology_test ……………Exit code 0xc0000135
12>***Exception: 1.09 sec
12> Start 19: SofaBaseVisual_test
12>19/46 Test #19: SofaBaseVisual_test …………….. Passed 1.88 sec
12> Start 20: SofaDeformable_test
12>20/46 Test #20: SofaDeformable_test ……………..Exit code 0xc0000135
12>***Exception: 0.67 sec
12> Start 21: SofaEngine_test
12>21/46 Test #21: SofaEngine_test …………………Exit code 0xc0000135
12>***Exception: 1.37 sec
12> Start 22: SofaExplicitOdeSolver_test
12>22/46 Test #22: SofaExplicitOdeSolver_test ……….Exit code 0xc0000135
12>***Exception: 1.38 sec
12> Start 23: SofaImplicitOdeSolver_test
12>23/46 Test #23: SofaImplicitOdeSolver_test ……….Exit code 0xc0000135
12>***Exception: 1.48 sec
12> Start 24: SofaLoader_test
12>24/46 Test #24: SofaLoader_test ………………… Passed 1.84 sec
12> Start 25: SofaMeshCollision_test
12>25/46 Test #25: SofaMeshCollision_test …………..Exit code 0xc0000135
12>***Exception: 0.45 sec
12> Start 26: SofaRigid_test
12>26/46 Test #26: SofaRigid_test ………………….Exit code 0xc0000135
12>***Exception: 0.59 sec
12> Start 27: SofaSimpleFem_test
12>27/46 Test #27: SofaSimpleFem_test ………………Exit code 0xc0000135
12>***Exception: 0.50 sec
12> Start 28: SofaBoundaryCondition_test
12>28/46 Test #28: SofaBoundaryCondition_test ……….Exit code 0xc0000135
12>***Exception: 1.70 sec
12> Start 29: SofaConstraint_test
12>29/46 Test #29: SofaConstraint_test ……………..***Failed 1.46 sec
12> Start 30: SofaGeneralEngine_test
12>30/46 Test #30: SofaGeneralEngine_test …………..Exit code 0xc0000135
12>***Exception: 1.35 sec
12> Start 31: SofaGeneralExplicitOdeSolver_test
12>31/46 Test #31: SofaGeneralExplicitOdeSolver_test …Exit code 0xc0000135
12>***Exception: 0.48 sec
12> Start 32: SofaGeneralImplicitOdeSolver_test
12>32/46 Test #32: SofaGeneralImplicitOdeSolver_test …Exit code 0xc0000135
12>***Exception: 0.63 sec
12> Start 33: SofaGeneralTopology_test
12>33/46 Test #33: SofaGeneralTopology_test …………Exit code 0xc0000135
12>***Exception: 1.68 sec
12> Start 34: SofaGeneralLoader_test
12>34/46 Test #34: SofaGeneralLoader_test …………..***Failed 3.68 sec
12> Start 35: SofaGeneralSimpleFem_test
12>35/46 Test #35: SofaGeneralSimpleFem_test ………..Exit code 0xc0000135
12>***Exception: 0.71 sec
12> Start 36: SofaGraphComponent_test
12>36/46 Test #36: SofaGraphComponent_test ………….Exit code 0xc0000135
12>***Exception: 0.39 sec
12> Start 37: SofaMiscFem_test
12>37/46 Test #37: SofaMiscFem_test ………………..Exit code 0xc0000135
12>***Exception: 0.97 sec
12> Start 38: SofaMisc_test
12>38/46 Test #38: SofaMisc_test …………………..Exit code 0xc0000135
12>***Exception: 0.34 sec
12> Start 39: SofaMiscMapping_test
12>39/46 Test #39: SofaMiscMapping_test …………….Exit code 0xc0000135
12>***Exception: 0.61 sec
12> Start 40: SofaMiscSolver_test
12>40/46 Test #40: SofaMiscSolver_test ……………..Exit code 0xc0000135
12>***Exception: 0.42 sec
12> Start 41: SofaMiscTopology_test
12>41/46 Test #41: SofaMiscTopology_test ……………Exit code 0xc0000135
12>***Exception: 0.59 sec
12> Start 42: SofaMiscForceField_test
12>42/46 Test #42: SofaMiscForceField_test ………….Exit code 0xc0000135
12>***Exception: 0.80 sec
12> Start 43: SofaComponentBase_test
12>43/46 Test #43: SofaComponentBase_test ………….. Passed 0.77 sec
12> Start 44: SofaPython_test
12>44/46 Test #44: SofaPython_test …………………Exit code 0xc0000135
12>***Exception: 0.54 sec
12> Start 45: CImgPlugin_test
12>45/46 Test #45: CImgPlugin_test …………………Exit code 0xc0000135
12>***Exception: 0.76 sec
12> Start 46: runSofa_test
12>46/46 Test #46: runSofa_test ……………………Exit code 0xc0000135
12>***Exception: 0.48 sec
12>
12>20% tests passed, 37 tests failed out of 46
12>
12>Total Test time (real) = 800.72 sec
12>
12>The following tests FAILED:
12> 1 – SofaHelper_test (Failed)
12> 5 – SofaValidation_test (Exit code 0xc0000135
12>)
12> 6 – SceneCreator_test (Exit code 0xc0000135
12>)
12> 7 – SofaExporter_test (Exit code 0xc0000135
12>)
12> 8 – SofaOpenglVisual_test (Exit code 0xc0000135
12>)
12> 11 – SofaCore_simutest (Failed)
12> 12 – SofaSimulationCore_simutest (Failed)
12> 13 – Name (Not Run)
12> 15 – SofaBaseCollision_test (Exit code 0xc0000135
12>)
12> 16 – SofaBaseLinearSolver_test (Exit code 0xc0000135
12>)
12> 17 – SofaBaseMechanics_test (Exit code 0xc0000135
12>)
12> 18 – SofaBaseTopology_test (Exit code 0xc0000135
12>)
12> 20 – SofaDeformable_test (Exit code 0xc0000135
12>)
12> 21 – SofaEngine_test (Exit code 0xc0000135
12>)
12> 22 – SofaExplicitOdeSolver_test (Exit code 0xc0000135
12>)
12> 23 – SofaImplicitOdeSolver_test (Exit code 0xc0000135
12>)
12> 25 – SofaMeshCollision_test (Exit code 0xc0000135
12>)
12> 26 – SofaRigid_test (Exit code 0xc0000135
12>)
12> 27 – SofaSimpleFem_test (Exit code 0xc0000135
12>)
12> 28 – SofaBoundaryCondition_test (Exit code 0xc0000135
12>)
12> 29 – SofaConstraint_test (Failed)
12> 30 – SofaGeneralEngine_test (Exit code 0xc0000135
12>)
12> 31 – SofaGeneralExplicitOdeSolver_test (Exit code 0xc0000135
12>)
12> 32 – SofaGeneralImplicitOdeSolver_test (Exit code 0xc0000135
12>)
12> 33 – SofaGeneralTopology_test (Exit code 0xc0000135
12>)
12> 34 – SofaGeneralLoader_test (Failed)
12> 35 – SofaGeneralSimpleFem_test (Exit code 0xc0000135
12>)
12> 36 – SofaGraphComponent_test (Exit code 0xc0000135
12>)
12> 37 – SofaMiscFem_test (Exit code 0xc0000135
12>)
12> 38 – SofaMisc_test (Exit code 0xc0000135
12>)
12> 39 – SofaMiscMapping_test (Exit code 0xc0000135
12>)
12> 40 – SofaMiscSolver_test (Exit code 0xc0000135
12>)
12> 41 – SofaMiscTopology_test (Exit code 0xc0000135
12>)
12> 42 – SofaMiscForceField_test (Exit code 0xc0000135
12>)
12> 44 – SofaPython_test (Exit code 0xc0000135
12>)
12> 45 – CImgPlugin_test (Exit code 0xc0000135
12>)
12> 46 – runSofa_test (Exit code 0xc0000135
12>)
12>Errors while running CTest
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: The command “setlocal
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: “D:\Program Files\CMake\bin\ctest.exe” –force-new-ctest-process -C Debug
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmEnd
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmErrorLevel
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: exit /b %1
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmDone
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
12>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :VCEnd” exited with code 8.
12>Done building project “RUN_TESTS.vcxproj” — FAILED.
========== Build: 13 succeeded, 1 failed, 127 up-to-date, 0 skipped ==========Thank you,
Elie24 May 2020 at 15:53 #16358HugoKeymasterLooking at this thread on the error MSB3073, the @secretdevil ‘s advice seems very good. Strange that running the compilation as an admin is not solving the issue.
Could you double check?
I also found the following advice: prefer the MsBuild “Copy” task in an AfterBuild target over a post-build event
I hope this can help.
Hugo
24 May 2020 at 17:33 #16359AnonymousInactiveI tried rebuilding from scratch as admin but it still reaches the same error
24 May 2020 at 18:29 #16360HugoKeymasterHi @eliekhairallah
Have you paid attention to the second advice: prefer the MsBuild “Copy” task in an AfterBuild target over a post-build event
Hugo
24 May 2020 at 19:45 #16361AnonymousInactive26 May 2020 at 15:46 #16383GuillaumeKeymasterHi Elie,
Are you building the project RUN_TESTS on purpose?
If you want to compile SOFA without running the tests (some of them do not pass obviously), you should build the project ALL_BUILD instead.
Hope that helps,
Guillaume.26 May 2020 at 17:48 #16385AnonymousInactiveHello @guillaumeparan,
Thank you for your remark. At the beginning I was building the project as you suggested (ALL_BUILD) and it was building without any errors but no binaries were generated. I added the projects INSTALL, PACKAGE and RUN_TESTS that were not being built because I thought that I should build everything to get the binaries. So without those projects I added, I am back to having no compilation errors but no binaries generated.
Best regards,
Elie Khairallah26 May 2020 at 18:42 #16387GuillaumeKeymaster27 May 2020 at 09:44 #16394AnonymousInactiveHello @guillaumeparan, I have pasted the required outputs in the pads
Best regards
27 May 2020 at 15:35 #16403GuillaumeKeymasterI can see from your tree that you did a Debug build. Thus, the resulting executable is bin/Debug/runSofa_d.exe
You say there is no binary generated, but there is (in bin/Debug). Did you expect something else?
To generate Release binaries, make sure to compile the ALL_BUILD project in Release mode. To switch mode with Visual Studio, changing the CMAKE_BUILD_TYPE CMake variable is not enough. You also must change the build configuration in Visual Studio IDE.
Hope that helps,
Guillaume. -
AuthorPosts
- You must be logged in to reply to this topic.