Home › Forum › SOFA › Building SOFA › [SOLVED] Error: Could not find either Qt5 or Qt6
Tagged: AppleClang, MacOS, SOFA_2106
- This topic has 15 replies, 3 voices, and was last updated 2 years, 10 months ago by Hugo.
-
AuthorPosts
-
8 December 2021 at 04:20 #21083AlexBlocked
I follow all the steps to install Sofa on Macos.
I encountered the following error when trying to configure a makefile with CMake. I have installed the newest Qt, and used the troubleshooting “CMAKE_PREFIX_PATH=/home/tongjia/Qt/6.2.2/gcc_64”, but that didn’t work. Can somebody help me out?
——————————————————————
SofaGuiCommon: Sofa.GL dependent features enabled. CMake Error at modules/SofaGuiQt/CMakeLists.txt:26 (message): SofaGuiQt: Could not find either Qt5 or Qt6. CMake Error at modules/SofaGuiQt/libQGLViewer-2.7.1/QGLViewer/CMakeLists.txt:8 (message): QGLViewer: Qt5 is required and was not found. Add Qt5 directory to CMAKE_PREFIX_PATH or disable QGLViewer by setting SOFAGUI_QGLVIEWER to OFF. SofaGuiQt: QtCharts not found, SofaWindowProfiler will not be built. SofaGuiQt: Qt5WebEngine not found, QDocBrowser will not be built.
8 December 2021 at 04:29 #21084jnbrunetModeratorHey @ztjsofa
On macos with Qt5 installed using the Qt installer in $HOME/Qt/5.15.2, I usually build SOFA using:
git clone https://github.com/sofa-framework/sofa.git cmake -S sofa -B sofa/build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DQt5_DIR=$HOME/Qt/5.15.2/clang_64/lib/cmake/Qt5 cmake --build sofa/build cmake --install sofa/build
You will have to change
$HOME/Qt/5.15.2
for your Qt path. I have not tested it with Qt6, but Qt5 works.JN
9 December 2021 at 02:51 #21092AlexBlockedHi @jnbrunet
Appreciate your help. I have successfully installed Sofa with your suggestion. However, I only saw a black background in the animation region, instead of the caduceus animation. I opened several other demo scenes and saw the same (black) thing.
Also, the file “runSofa” I got is an “Alias” type, instead of an executable. I guess that doesn’t matter, since I can still open it in the terminal?
Below are the messages when running Safa.
[WARNING] [SofaEigen2Solver] SofaEigen2Solver is deprecated; Eigen classes are now located in Sofa.LinearAlgebra and SVDLinearSolver in SofaDenseSolver.You can remove SofaEigen2Solver from your scene, and if using SVDLinearSolver, please load SofaDenseSolver instead. [INFO] [runSofa] PluginRepository paths = /Users/tongjia/sofa/build/plugins:/Users/tongjia/sofa/build/lib [INFO] [runSofa] DataRepository paths = /Users/tongjia/sofa/src/share:/Users/tongjia/sofa/src/examples:/Users/tongjia/sofa/build:/Users/tongjia/sofa/build [INFO] [runSofa] GuiDataRepository paths = /Users/tongjia/sofa/src/applications/projects/runSofa/resources:/Users/tongjia/sofa/src/modules/SofaGuiQt/src/sofa/gui/qt/resources:/Users/tongjia/sofa/build [INFO] [runSofa] Loading automatically plugin list in /Users/tongjia/sofa/build/lib/plugin_list.conf.default [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaSimpleFem.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaRigid.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaDeformable.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaObjectInteraction.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMeshCollision.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaEngine.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaExplicitOdeSolver.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaImplicitOdeSolver.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaLoader.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralVisual.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGraphComponent.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralMeshCollision.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaBoundaryCondition.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralAnimationLoop.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralDeformable.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralEngine.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralExplicitOdeSolver.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralImplicitOdeSolver.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralLinearSolver.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralRigid.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralObjectInteraction.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralSimpleFem.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralTopology.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaTopologyMapping.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaUserInteraction.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaConstraint.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaGeneralLoader.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaExporter.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaSparseSolver.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaPreconditioner.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaHaptics.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaValidation.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaDenseSolver.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaNonUniformFem.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaOpenglVisual.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMiscTopology.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMiscExtra.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMiscForceField.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMiscEngine.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMiscSolver.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMiscFem.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMiscMapping.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libSofaMiscCollision.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libCImgPlugin.dylib [INFO] [PluginManager] Loaded plugin: /Users/tongjia/sofa/build/lib/libLMConstraint.dylib Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing. The constructor with a QGLFormat is deprecated, use the regular contructor instead. qt.qpa.openglcontext: Could not create NSOpenGLContext with shared context, falling back to unshared context. [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias, SceneCheckDeprecatedComponents] [INFO] [SceneCheckerVisitor] Finished validating node "root". [WARNING] [Simulation] Default Visual Manager Loop will be used. Add DefaultVisualManagerLoop to the root node of scene file to remove this warning
10 December 2021 at 15:51 #21115HugoKeymasterHey @ztjsofa
are you running SOFA from python?
The black background is due to the fact you need to load the CImgPlugin.
In python:SofaRuntime.importPlugin("CImgPlugin")
Else are simulations running fine?
Best
Hugo
11 December 2021 at 20:20 #21123AlexBlockedHi @hugo
I am running Sofa from the terminal on MacOS. I am not sure whether I am using python or not. (I am not an IT person.) Could you provide more specific steps to load the CImgPlugin, like what command and when to input in the terminal?
Many thanks!
12 December 2021 at 16:43 #2112512 December 2021 at 17:09 #21127AlexBlocked12 December 2021 at 21:18 #21128HugoKeymasterHey @ztjsofa
Could you make a screenshot of the full screen to see what you see?
It will help, thanks.Hugo
13 December 2021 at 03:45 #21132AlexBlocked15 December 2021 at 04:02 #21139jnbrunetModeratorHey Alex,
What version of Qt are you using?
Also, can you try with both viewer to see if they both have a black output?
QtViewer:
runSofa -g qtviewer
QglViewer:
runSofa -g qglviewer
15 December 2021 at 04:28 #21140AlexBlockedHi @jnbrunet
I am using Qt 5.15.2. It still has a black output when I use QglViewer.
When using the QtViewer, I met the following error and Sofa did not run.
[ERROR] [GUIManager] GUI 'qtviewer' creation failed. Available GUIs: {batch qglviewer qt} [WARNING] [SofaSimulationGraph] the library has not been cleaned up (sofa::simulation::graph::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationCommon] the library has not been cleaned up (sofa::simulation::common::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationCore] the library has not been cleaned up (sofa::simulation::core::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaCore] the library has not been cleaned up (sofa::core::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaDefaultType] the library has not been cleaned up (sofa::defaulttype::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaHelper] the library has not been cleaned up (sofa::helper::cleanup() has never been called, see sofa/helper/init.h)
Alex
10 January 2022 at 16:29 #21342HugoKeymasterHey @ztjsofa
Have you tried as given in the log comment (
Available GUIs: {batch qglviewer qt}
) to run instead:runSofa -g qglviewer
orrunSofa -g qt
Best
Hugo
11 January 2022 at 17:38 #21365AlexBlockedHey @hugo,
Yes, I did, but it didn’t work either.
I really don’t know what is wrong. Is this “black output” a known issue?
Best,
Alex11 January 2022 at 18:21 #21366HugoKeymasterHey @ztjsofa
It may be related that you are on MacOS (12). MacOS 11.6 works well though,or are you maybe running SOFA in a virtual machine?
Best,
Hugo
11 January 2022 at 19:49 #21367AlexBlocked11 January 2022 at 22:08 #21369 -
AuthorPosts
- You must be logged in to reply to this topic.