Home › Forum › SOFA › Getting Started › [SOLVED] SOFA installation
Tagged: Windows
- This topic has 19 replies, 4 voices, and was last updated 9 years, 4 months ago by Saleem.
-
AuthorPosts
-
17 June 2015 at 03:12 #3371SaleemBlocked
Hi!
I need to use SOFA for simulations and I’m an engineer so I don’t know much about git cloning and all. All of it seems related to software engineers/developers.
Can anyone kindly instruct me through the process of how to set it up?
I have Visual studio 2012
I have installed QT 4.8.5
I have Cmake 3.2.0
I downloaded the latest dependencies and copied them in the folder where .git was cloned.
Then I followed the other steps from site and generated a sofa.sln via cmake which gave warnings for developers but no error. After that I opened that .sln file in VS11 and after that I don’t know what to do because it doesn’t give any option of compile and there is no .exe setup file which I can run and just install SOFA.There was an .exe setup file in sofa 1.0 beta 4 version but I need plugins and other advanced components.
I also tried BlenderSOFA but it doesn’t have even all the components of sofa 1.0 beta 4 version and even when you convert their own given examples from blender to sofa files, a lot of changes occur in the scene which sometimes make it useless.
So, if anyone can guide me in detail that will be very much appreciated.
Thank you in advance.17 June 2015 at 07:44 #3374ForestBlockedHi Saleem,
It is not clear from your message whether or not you have actually launched the compilation (sorry to ask, but you said you were not a software developer 🙂 ).
Also, have you checked the ‘SOFA_APPLICATION_RUNSOFA’ option in the cmake ? This will generate the runSofa.exe application when you compile.
I am sorry that you have problems exporting your sofa scene in Blender SOFA. If you want you can send me your examples and I’ll try to figure out what goes wrong. My mail is Clement.Forest, and the domain is digital-trainers.com.
Best regards,
Clément Forest
Digital-Trainers17 June 2015 at 08:38 #3375SaleemBlockedThese files weren’t found during configuration
*************************************************************
Looking for Q_WS_X11
Looking for Q_WS_X11 – not found
Looking for Q_WS_WIN
Looking for Q_WS_WIN – found
Looking for Q_WS_QWS
Looking for Q_WS_QWS – not found
Looking for Q_WS_MAC
Looking for Q_WS_MAC – not found
*************************************************************
this warning was shown 3 times during configuration
***************************************************************
CMake Warning (dev) at cmake/postProject.cmake:58 (target_link_libraries):
Policy CMP0039 is not set: Utility targets may not have link dependencies.
Run “cmake –help-policy CMP0039” for policy details. Use the cmake_policy
command to set the policy and suppress this warning.Utility target “eigen” should not be used as the target of a
target_link_libraries call.
Call Stack (most recent call first):
extlibs/eigen-3.2.1/CMakeLists.txt:11 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
*******************************************************************After that during generation, there were just this kinda warnings and then it showed generation done.
*****************************************************************
CMake Warning (dev) in applications/tutorials/oneTetrahedron/CMakeLists.txt:
Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties.
Run “cmake –help-policy CMP0043” for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
********************************************************************There was no runSofa.exe generated.
Should I go forward for compilation and what are the steps for it? (No, I couldn’t launch the compilation before, there was no option for it)
I was just testing BlenderSOFA using it’s given examples that it might work better but when I tried to export that “marbles” example in it, the scene was totally different and the objects had different constraints and if i can recall correctly there was just one marble in the exported scene.
17 June 2015 at 13:53 #3376ForestBlockedOK.
It looks like your cMake doesn’t find your Qt headers. Do you have them correctly installed ? Check in your cMake that the variable QT_QTCORE_INCLUDE_DIR is correctly set.
Regards,
Clément Forest
Digital-Trainers19 June 2015 at 02:00 #3377SaleemBlockedSorry but I don’t know how to check that variable.
When I configure sofa using cmake, nothing named QT_QTCORE_INCLUDE_DIR appears.I downloaded QT 4.8.5 from http://mirrorservice.org/sites/download.qt-project.org/archive/qt/4.8/4.8.5/
and used qt-win-opensource-4.8.5-mingw.exe file to install it. Also I downloaded qt4.8.5 (64-bit) binaries from sofa site and extracted them in source directory. Which QT headers do I need to install and where can I get them from?If you want me to start from scratch, just follow your instructions, download and install everything from wherever you say I can do that too(If you think that’ll be better than debugging everything over here)
22 June 2015 at 13:28 #3379ForestBlockedHi Saleem,
Sory for the delay.
Below is what I do here to compile Sofa from scratch on Windows 32 bit. Following https://www.sofa-framework.org/oldwiki/index.php/Getting_Started#Building_on_Windows as a canvas.
1- Clone sofa sources from the Git repository.
2- Get Qt binaries from Sofa website (qt4.8.5_msvc2012_x86.7z). Place the qt4win directory in the tools directory of the sofa sources.
3- Get the dependencies (sofa-win-dependencies-21-11-2013.7z) and place the include lib and licences directories in the root of the sofa sources.
4- Launch CMake (I am using 2.8.11), create a separate directory for compiling, choose VC12 as a compiler.
5- Run configure twice. On the first one, every thing is red, on the second one, only one line is red: QT_QMAKE_EXECUTABLE.
6- Set QT_QMAKE_EXECUTABLE variable so it points to tool/qt4win/bin/qmake.exe
7- Run configure twice (the last one is done without errors), then Generate
8- Open the solution file and compile it.Do this and tell me at which step you have a difference with me.
PD. Sorry for my previous message. I thought Qt was not found but that was incorrect as it says “Q_WS_WIN – found”
Clément Forest
Digital-Trainers23 June 2015 at 04:22 #3381SaleemBlockedNo no, there is nothing to be sorry about.
On step7 there were 3 warnings(that same old This warning is for project developers. Use -Wno-dev to suppress it.)
CMake Warning (dev) at:
1. cmake/postProject.cmake:58
2. extlibs/miniFlowVR/CMakeLists.txt:41
3. extlibs/newmat/CMakeLists.txt:52The whole generation was full of warnings like
*********************************************************************************
CMake Warning (dev) in applications/tutorials/oneTetrahedron/CMakeLists.txt:
Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties.
Run “cmake –help-policy CMP0043” for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
*********************************************************************************then I opened runsofa.sln and it started “parsing the files” then “scanning #inculdes for additional files” then “parsing included files” then “scanning #inculdes for additional files”… after several times of scanning and parsing files the solution is ready but I don’t know how to compile the solution, can you guide me about that too, please?
23 June 2015 at 07:28 #3382HugoKeymasterDear Saleem,
You arrived at the end of the process with the nice help from Clément, only the compilation is left. If you sucessfully opened the sln project in Visual Studio, you can click on Build -> Build solution. This will compile the solution. Let us know if you have any compilation problem.
Best,
Hugo
23 June 2015 at 07:57 #3383ForestBlockedAlso, the warnings you have in the CMake are not important. They are here because the CMakeFiles were written for an older version of CMake (2.8.8). But they should not cause any problem.
As said in your error message, you can remove them by activating “Options” -> “Supress dev Warnings”
Clément Forest
Digital-Trainers24 June 2015 at 03:32 #3384SaleemBlockedThese errors appeared after compilation(running Build Solution), also there is still no runsofa.exe file so I think these errors must be fixed for that. So how do I fix these errors?
*****************************************************************************************
Error 55 error LNK1112: module machine type ‘X86’ conflicts with target machine type ‘x64’ E:\sofaforestbuild\extlibs\qwt-6.0.1\src\QtGuid4.lib(QtGuid4.dll) Qwt(project)Error 3120 error LNK1104: cannot open file ‘..\..\..\..\lib\Qwt_1_0d.lib’ E:\sofaforestbuild\applications\sofa\gui\qt\LINK SofaGuiQt(project)
Error 3121 error MSB6006: “link.exe” exited with code 1104. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 611(line) 5(column) SofaGuiQt(project)
Error 3125 error LNK1104: cannot open file ‘..\..\..\..\lib\SofaGuiQt_1_0d.lib’ E:\sofaforestbuild\applications\sofa\gui\SofaGuiMain\LINK SofaGuiMain(project)
Error 3129 error LNK1104: cannot open file ‘..\..\..\lib\SofaGuiMain_1_0d.lib’ E:\sofaforestbuild\applications\projects\runSofa\LINK runSofa(project)
****************************************************************************************There are 3124 warnings too, most of them are like:
*****************************************************************************************
Warning 1438 warning LNK4099: PDB ‘zlib.pdb’ was not found with ‘zlib.lib(deflate.obj)’ or at ‘E:\sofaforestbuild\bin\zlib.pdb’; linking object as if no debug info E:\sofaforestbuild\modules\SofaMiscTopology\zlib.lib(deflate.obj)Warning 106 warning C4819: The file contains a character that cannot be represented in the current code page (949). Save the file in Unicode format to prevent data loss (C:\Users\User\Documents\GitHub\sofa\framework\sofa\core\MultiMapping.cpp) C:\Users\User\Documents\GitHub\sofa\framework\sofa\core\BaseMapping.h
Warning 931 warning C4267: ‘initializing’ : conversion from ‘size_t’ to ‘unsigned int’, possible loss of data (C:\Users\User\Documents\GitHub\sofa\modules\SofaSphFluid\ParticleSink.cpp) C:\Users\User\Documents\GitHub\sofa\modules\SofaBaseTopology\TopologySubsetDataHandler.inl
Warning 1334 warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning) (C:\Users\User\Documents\GitHub\sofa\modules\SofaBaseCollision\MinProximityIntersection.cpp) C:\Users\User\Documents\GitHub\sofa\framework\sofa\core\collision\Intersection.inl
Warning 2453 warning C4661: ‘void sofa::component::mass::MeshMatrixMass<DataTypes,TMassType>::TetrahedronMassHandler::applyDestructionFunction(const sofa::helper::vector<T> &)’ : no suitable definition provided for explicit template instantiation request C:\Users\User\Documents\GitHub\sofa\modules\SofaMiscForceField\MeshMatrixMass.inl
********************************************************************************************Almost 70% of the warnings are “warning C4267” So kindly also give them a look if any or all of those need to be fixed.
Sorry, I know I’m asking a lot but I tried working with “SOFA 1.0.4”, it is not capable of what I want and it was released in 2010 if I’m not wrong, so it’s not up to date and it did feel like new plugins and components are much more advance. I really appreciate your help.
24 June 2015 at 15:21 #3387ForestBlockedYou do not have runSofa.exe because the compilation still fails.
The first error message tells that you are using a compiler for x64 but your Qt dependency is 32 bit. Which compiler have you selected with CMake? Check that you choose the 32 compiler (or that you use a Qt for 64bit).
The other errors are a consequence of that first one.
Clément Forest
Digital-Trainers25 June 2015 at 05:57 #3388SaleemBlockedOkay so I used QT for 64 bit and everything worked fine while compilation(1 build was skipped though==> ***Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ——
1>Project not selected to build for this solution configuration ***) and a bin folder was created and there was a “runsofad.exe” file there. I tried to execute the .exe file but “Qt3supportd4.dll” was missing, so I tried to download it from here==> http://www.opendll.com/index.php?file-download=qt3supportd4.dll&arch=32bit&version=4.6.2.0&dsc=#
and copied it in “bin” folder and when I tried executing runsofad.exe file again, it gave 0xc000007b error, probably because .dll file is for 32 bit systems, so what should I do?
I tried finding a .dll file for 64 bit system but they were all for 32 bit and some were saying to just copy it in C:/windows/sysWOW64 for 64bit system.
26 June 2015 at 04:42 #3389SaleemBlockedI also tried with 32bit configurations and files, followed all the steps but for that when I execute runsofa.exe it says “libgcc_s_dw2-1.dll” file is missing.
I found the dll file in cloned git (C:\Users\User\Documents\GitHub\sofa\extlibs\SuiteSparse\cholmod\Lib) and added it to bin folder in build directory but now “QtCored4.dll” is missing.
I added that too from the cloned git (C:\Users\User\Documents\GitHub\sofa\tools\qt4win\lib) but it says “The procedure entry point _Z10qvsnprintfPcjPKcS_ can not be found in the DLL QtCored4.dll.” when I try to execute runsofad.exe
So I’m stuck again, I don’t know how to fix it and even google doesn’t have anything on that.
27 June 2015 at 13:12 #3390ForestBlockedFrom your first message:
You are compiling in Debug but you do not have Qt debug binaries for x64. You should compile in release and it should work. You can also look for those debug files.From your second message:
The compiler is asking for libgccxxxx.dll, which is somewhere surprising because you are compiling with Visual. My guess is that the debug files you found were compiled with gcc. I am not sure that you can mix easily Visual and gcc in a same project.If you do want to compile in debug, you should find the Qt debug libraries compiled with Visual, or compile it yourself, or switch back to 32 bit, as the archive in the sofa site includes the debug version.
Clément Forest
Digital-Trainers1 July 2015 at 06:51 #3393SaleemBlockedOkay so I compiled it in release and it still needed .dll files from sofa/tools/qt4win/bin. Anyway, I copied all those .dll files for release(ones without the alphabet ‘d’ at the end) and pasted them in buildfolder/bin and then it worked fine.
Also there was no Modeler.exe so I started over and then I compiled the Sofa.sln, copied the .dll files in bin folder and then runsofa.exe and Modeler.exe worked fine.Thank you so much for you patience and help Mr. Forest and Mr. Talbot.
Okay one last question now, which software(s) is the best to make .obj, .msh(.mesh and .mtl files are also used but they are all for meshes so I think any format should work but if there is more to it then please, do tell), .bvh, and .sph files?(there were some more files too but I haven’t used them yet so I don’t know even if I need them) Which software(s) do you people use for that creating these files?
I did read that other thread about .obj and .msh files, creating .obj from one software and then using sofa for meshing, I’ll try that but if there is some better way to deal with all this I would like to know.Once again, thank you people, you were a huge help.
2 July 2015 at 02:43 #3394SaleemBlockedModeler keeps crashing when I try to change the values(/GitHub/sofa/examples/Tutorials/StepByStep/FullObject/8_FullObject I’m changing gravity in Object node). It happened before too(in another tutorial) but I ignored it that maybe system got overloaded. So I chose “debug the program” and that’s what it shows in the output
“Unhandled exception at 0x000007FEEEEF7AC4 (SofaSimulationCommon_1_0.dll) in Modeler.exe: 0xC0000005: Access violation reading location 0x0000000000000008.”
so what should I do?
2 July 2015 at 07:19 #3395sarramiBlockedHello,
I faced this problem many times. If you change the gravity in the XML code there would be no error! In the Modeler sometimes when we want to change something in the Object Nodes we may face this error. I hope the developers fix this problem.
Sarrami
3 July 2015 at 17:42 #3406HugoKeymasterHi Saleem,
Glad to hear that you succeeded.
I am not sure to know what you are looking for.
To export meshes, many softwares can be used: blender, meshlab , gmsh among others.Meshing a geometry isn’t trivial, but you can use the CGAL library coupled with SOFA:
https://www.sofa-framework.org/documentation/general-documentation/features/cgal-library/Cheers,
Hugo
14 July 2015 at 08:07 #3422SaleemBlockedOkay, thanks for that and sorry I had to go somewhere.
Anyway, can anyone tell me which components do i need to create an object which can stretch and deform but maintain its volume and can interact(collide and can be grabbed) with other objects? Doesn’t really matter what shape it has.BTW really thank you for all the help people 🙂
15 July 2015 at 01:32 #3423SaleemBlockedsorry, I think I should elaborate what I mean by STRETCH, like when it is stretched it will elongate but it can show just a little bit of retraction but it shouldn’t go to it’s original position, it should stay deformed as how ever caused by the gripers or something.
-
AuthorPosts
- You must be logged in to reply to this topic.