Home › Forum › SOFA › Building SOFA › [SOLVED] compiling_AdvancedTimer
Tagged: 32_bits, GCC, Linux_ubuntu, SOFA_other
- This topic has 7 replies, 2 voices, and was last updated 7 years, 8 months ago by ewpostek.
-
AuthorPosts
-
24 February 2017 at 17:53 #8705ewpostekBlocked
Hello,
I cloned the master-sofa today.
I do compilation (ubuntu 12.04, gcc 3.6, boost 1.48).I got a problem
[ 4%] Building CXX object SofaKernel/SofaFramework/SofaHelper/CMakeFiles/SofaHelper.dir/AdvancedTimer.cpp.o In file included from /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/helper/../../sofa/helper/logging/MessageDispatcher.h:30:0, from /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/helper/../../sofa/helper/logging/Messaging.h:75, from /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/helper/../../sofa/helper/set.h:31, from /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/helper/../../sofa/defaulttype/DataTypeInfo.h:28, from /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/helper/../../sofa/helper/vector.h:36, from /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/helper/AdvancedTimer.cpp:28: /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/helper/../../sofa/helper/logging/Message.h:56:17: error: function definition does not declare parameters
Would you mind to give an advice?
thank you, Elek
25 February 2017 at 16:35 #8707maxBlockedHello Elek,
You need a c++11 compiler for compiling SOFA, e.g. gcc >= 4.6.
Best regards,
Maxime
27 February 2017 at 16:09 #8716ewpostekBlockedHello,
Thank you, yes, it is. I am using 4.8 now.
However, one problem arises.
I build without opengl for batch mode.
However, it appears an error with GLEW,
as follows.[ 91%] Building CXX object SofaKernel/SofaFramework/framework_test/CMakeFiles/SofaFramework_test.dir/helper/gl/GLSLShader_test.cpp.o In file included from /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/framework_test/helper/gl/GLSLShader_test.cpp:4:0: /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/core/../../sofa/helper/gl/GLSLShader.h:38:2: error: #error GL Shader support requires GLEW. Please define SOFA_HAVE_GLEW to use shaders. #error GL Shader support requires GLEW. Please define SOFA_HAVE_GLEW to use shaders. ^ /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/framework_test/helper/gl/GLSLShader_test.cpp: In member function ‘virtual void GLSLShader_test_GLSLShader_SetFiles_Test::TestBody()’:
I think this problem was removed with the stable versions. I use v16.08.
I works without ogl well. The same with 16.12.Would you mind to help with it ?
Bes regards, Elek
27 February 2017 at 17:14 #8717maxBlockedHello again,
Most likely you don’t have GLEW installed. On Debian/Ubuntu, try
sudo apt-get install libglew-dev
.Hope this helps,
Maxime
28 February 2017 at 06:59 #8724ewpostekBlockedHi Maxime,
I repeated the installation of GLEW as you shown, on ubuntu.
Morover, I do compilation on a cluster where the glew is installed
108731:372 usr/lib64/libGLEW.so.1.5.5
108968:0 usr/lib64/libGLEW.so.1.5
However, I still arrive at the same error.[ 91%] Building CXX object SofaKernel/SofaFramework/framework_test/CMakeFiles/SofaFramework_test.dir/helper/gl/GLSLShader_test.cpp.o
In file included from /home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/framework_test/helper/gl/GLSLShader_test.cpp:4:0:
/home/eligiusz/tmp_feb_sofa/sofa-master/SofaKernel/framework/sofa/core/../../sofa/helper/gl/GLSLShader.h:38:2: error: #error GL Shader support requires GLEW. Please define SOFA_HAVE_GLEW to use shaders.
#error GL Shader support requires GLEW. Please define SOFA_HAVE_GLEW to use shaders.I think I should rather not get the error with the cmake switches like this:
cd build
/home/eligiusz/cmake_tmp/cmake-3.2.2-Linux-i386/bin/cmake -DSOFA_NO_OPENGL:BOOL=ON -DSOFA_BUILD_SCENECREATOR:BOOL=OFF -DSOFA_OPENMP:BOOL=OFF -DAPPLICATION_MODELER:BOOL=OFF -DCMAKE_CXX_FLAGS:STRING=’-fpermissive’ -DCMAKE_CXX_FLAGS_DEBUG:STRING=’-fpermissive’ ../sofa-masterI use gcc 4.8 and 4.9.
best regards,
Elek28 February 2017 at 08:25 #8725maxBlockedHello again,
Most likely CMake did not take the changes into account. Try reconfiguring the project using
cmake-gui
or start a clean build:cd sofa; mkdir -p build; cd build; cmake ..
BTW if anyone has a way to force cmake reconfiguration from the command-line, please let me know 🙂
Also, maybe we should mark GLEW as required in the CMakeLists.txt so that users don’t make it to the compilation phase unless GLEW is installed.
Best regards,
28 February 2017 at 09:42 #8729ewpostekBlockedHi, thank you, just one remark,
there is no problem with the stable versions,
best, Elek28 February 2017 at 10:51 #8730ewpostekBlockedHi,
I think the switches should be for example:-DGLEW_INCLUDE_DIR:PATH=/usr/include -DGLEW_LIBRARY:FILEPATH=/usr/lib64/libGLEW.so
However, while building without OGL the glew should not be
linked (I believe)I think there is a kind of conflict.
best, Elek
-
AuthorPosts
- You must be logged in to reply to this topic.