Home › Forum › SOFA › Building SOFA › [SOLVED] SOFA build on MacOS && Fail to build libSofaGuiQt.dylib
- This topic has 2 replies, 2 voices, and was last updated 4 years, 6 months ago by Star war.
-
AuthorPosts
-
30 April 2020 at 15:12 #15981Star warBlocked
Dear Sofa,
I try to build the source’s code of the latest stable sofa from the command:
git clone -b v19.12 https://github.com/sofa-framework/sofa.git
then I go to the sofa’s directory and
mkdir build && cd build
cmake .. && make
There is an error when linking “../../lib/libSofaGuiQt.dylib” and I think it fails to generate the lib of libSofaGuiQt.dylib. I fail and don’t know how to fix it, although I try to find similar problems on the sofa’s forum and search it in Google. I hope to receive a reply.System: MacOS Catalina 10.15.4
Xcode 11.4.1 Build version 11E503aCMake log:
-- Install prefix: /Users/steven/Code/sofa/sofa/v19.12/build/install Adding collection SofaComponentBase Adding collection SofaComponentCommon Adding collection SofaComponentGeneral Adding collection SofaComponentMisc Adding collection SofaComponentAdvanced Adding collection SofaComponentAll -- -- FFmpeg executable was found /usr/local/bin/ffmpeg -- SofaTest: optional dependency SofaPython NOT found, Python_test won't be built Adding module SofaExporter -- SofaPython disabled, will not compile python bindings. 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 /Users/steven/Code/sofa/sofa/v19.12/build/lib/plugin_list.conf.default CMake Deprecation Warning at CMakeLists.txt:309 (message): Deprecated components are activated (SOFA_WITH_DEPRECATED_COMPONENTS variable is ON) -- Configuring done -- Generating done -- Build files have been written to: /Users/steven/Code/sofa/sofa/v19.12/build
Make log:
[ 1%] Built target gtest [ 3%] Built target newmat [ 4%] Built target tinyxml [ 4%] Built target csparse [ 11%] Built target SofaHelper [ 12%] Built target SofaDefaultType [ 19%] Built target SofaCore [ 24%] Built target SofaSimulationCore [ 25%] Built target SofaSimulationCommon [ 26%] Built target SofaSimulationTree [ 27%] Built target SofaSimulationGraph [ 27%] Built target SofaGTestMain [ 28%] Built target SofaHelper_test [ 28%] Built target TestPlugin [ 28%] Built target SofaDefaultType_test [ 29%] Built target SofaCore_test [ 29%] Built target SofaSimulationCore_test [ 31%] Built target SofaBaseCollision [ 32%] Built target SofaBaseLinearSolver [ 34%] Built target SofaBaseTopology [ 35%] Built target SofaBaseMechanics [ 36%] Built target SofaBaseVisual [ 37%] Built target SofaDeformable [ 37%] Built target SofaEngine [ 37%] Built target SofaExplicitOdeSolver [ 37%] Built target SofaImplicitOdeSolver [ 37%] Built target SofaLoader [ 37%] Built target SofaRigid [ 37%] Built target SofaObjectInteraction [ 39%] Built target SofaMeshCollision [ 40%] Built target SofaSimpleFem [ 41%] Built target SofaEigen2Solver [ 41%] Built target SofaGeneralAnimationLoop [ 42%] Built target SofaGeneralDeformable [ 42%] Built target SofaGeneralExplicitOdeSolver [ 42%] Built target SofaGeneralImplicitOdeSolver [ 43%] Built target SofaGeneralLinearSolver [ 44%] Built target SofaGeneralLoader [ 45%] Built target SofaGeneralMeshCollision [ 45%] Built target SofaGeneralObjectInteraction [ 46%] Built target SofaGeneralRigid [ 46%] Built target SofaGeneralSimpleFem [ 47%] Built target SofaGeneralTopology [ 48%] Built target SofaGeneralVisual [ 51%] Built target SofaBoundaryCondition [ 52%] Built target SofaTopologyMapping [ 53%] Built target SofaGraphComponent [ 55%] Built target SofaUserInteraction [ 57%] Built target SofaConstraint [ 62%] Built target SofaGeneralEngine [ 63%] Built target SofaValidation [ 63%] Built target SceneCreator [ 63%] Built target SofaDenseSolver [ 64%] Built target SofaNonUniformFem [ 65%] Built target SofaMiscTopology [ 65%] Built target SofaMisc [ 66%] Built target SofaMiscEngine [ 66%] Built target SofaMiscFem [ 66%] Built target SofaMiscForceField [ 67%] Built target SofaMiscMapping [ 67%] Built target SofaMiscSolver [ 67%] Built target SofaComponentBase [ 67%] Built target SofaComponentCommon [ 67%] Built target SofaComponentGeneral [ 67%] Built target SofaComponentMisc [ 67%] Built target SofaComponentAdvanced [ 68%] Built target SofaTest [ 68%] Built target SofaValidation_test [ 68%] Built target SofaComponentAll [ 68%] Built target SofaAllCommonComponents [ 69%] Built target SofaGuiCommon [ 72%] Built target QGLViewer [ 72%] Linking CXX shared library ../../lib/libSofaGuiQt.dylib Undefined symbols for architecture x86_64: "QTreeWidgetItem::setExpanded(bool)", referenced from: sofa::gui::qt::SofaWindowProfiler::addTreeItem(sofa::gui::qt::SofaWindowProfiler::AnimationSubStepData*, QTreeWidgetItem*) in SofaWindowProfiler.cpp.o "QAbstractItemView::eventFilter(QObject*, QEvent*)", referenced from: vtable for sofa::gui::qt::DisplayFlagWidget in moc_DisplayFlagsDataWidget.cpp.o vtable for sofa::gui::qt::QDisplayPropertyWidget in moc_QDisplayPropertyWidget.cpp.o vtable for sofa::gui::qt::QTableViewUpdater in moc_QModelViewTableUpdater.cpp.o vtable for sofa::gui::qt::QSofaListView in moc_QSofaListView.cpp.o "QtCharts::QChartView::wheelEvent(QWheelEvent*)", referenced from: vtable for sofa::gui::qt::ProfilerChartView in moc_SofaWindowProfiler.cpp.o "QTreeView::verticalScrollbarValueChanged(int)", referenced from: vtable for sofa::gui::qt::QSofaListView in moc_QSofaListView.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [lib/libSofaGuiQt.19.12.00.dylib] Error 1 make[1]: *** [SofaGui/SofaGuiQt/CMakeFiles/SofaGuiQt.dir/all] Error 2
Thank you.
30 April 2020 at 22:24 #15989HugoKeymasterHi @enxing
Did you properly installed Qt as noticed in the build instructions for MacOS?
Did you specify the path to Qt in the CMAKE_PREFIX_PATH as explained?Best,
Hugo
1 May 2020 at 06:44 #15994Star warBlockedPreviously, I didn’t obey
We recommend to install Qt in your user directory with the unified installer
and installed qt by
brew install qt
. But just now I install the unified installer of QT and select the three components Macos, Charts, and WebEngine of QT with the latest version. After I uninstall old QT bybrew uninstall qt
, I succeed to build SOFA.Thank you.
Enxing. -
AuthorPosts
- You must be logged in to reply to this topic.