Forum Replies Created
-
AuthorPosts
-
15 June 2021 at 23:04 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19706Julien D.Blocked
Hello, I have compiled SOFA v20.12 from the sources. I have tried to install the binaries directly beforehand, but it was not working either.
My CMake version is 3.18.4.Thank you for your help π
I’ll try to join on wednesday (tomorrow)
15 June 2021 at 15:59 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19703Julien D.BlockedHello everyone π
@Hugo Talbot tried to help me fixing my issues, by adding other file paths to my CMake prefix path, and it is not working…When I install Sofa, no TargetsXXX.cmake files are created. I think my issue comes from the lack of these files. Does anyone have these files created properly, and if so, in which folder ?
Thank you in advance a lot for your help.
Have a good week everyone π
18 May 2021 at 12:18 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19470Julien D.BlockedSo I tried the example plugin in “sofa\src\applications\plugins\PluginExample” and even in that case I had to modify the CMakeLists.txt to make it work.
And I’m having errors with glew again.I have added the 4 lines below to my CMakeLists to find glew required files, but
set(GLEW_INCLUDE_DIR "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/include") set(GLEW_SHARED_LIBRARY_RELEASE "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/lib/win64/glew32.lib") set(GLEW_STATIC_LIBRARY_RELASE "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/include/GL/glew.h") set(GLEW_LIBRARIES GLEW::GLEW)
and I’m having the error
CMake Error at D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/extlibs/eigen-3.3.8/cmake/FindGLEW.cmake:96 (MESSAGE): Could not find Glew Call Stack (most recent call first): D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:88 (find_package) D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaBaseConfig.cmake:32 (find_package) CMakeLists.txt:17 (find_package)
I really don’t know what is not found by the script FindGLEW.cmake launched in GLEW_LIBRARY.
EDIT: I added set(GLEW_GLEW_LIBRARY “D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/lib/win64/”) and the glew detection step worked again!
However, I still have the multiples errors likeCMake Error at D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/GTestConfig.cmake:33 (include): include could not find load file: D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/GTestTargets.cmake Call Stack (most recent call first): D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:91 (find_package) D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaBaseConfig.cmake:32 (find_package) CMakeLists.txt:17 (find_package)
and
CMake Error at D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:99 (include): include could not find load file: D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkTargets.cmake Call Stack (most recent call first): D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaBaseConfig.cmake:32 (find_package) CMakeLists.txt:17 (find_package)
So I’m having the same error while I’m trying to compile the plugin example of SOFA inside Sofa source directory than when I compile my own plugin outside of sofa directories.
CMake is looking for files “GTestTargets.cmake” and “SofaXXXTargets.cmake” which do not even exist on my system folders. I have followed all the instructions steps several times to install SOFA and I don’t know what I missed.Sorry for all those posts in this thread, but I really don’t understand why plugin compilation is not working on my Sofa installation on Windows. Thank you again for your help.
18 May 2021 at 11:11 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19468Julien D.BlockedHello everyone,
so apparently the best way of compiling a plugin is to place it inside the root tree of SOFA, according to the documentation in https://www.sofa-framework.org/community/doc/programming-with-sofa/create-your-plugin/
When I first compiled my plugin on SOFA v19.06 on Ubuntu it was perfectly fine to compile it outside of SOFA root directories, I don’t know what’s avoiding me to do the same on SOFA v20.12.
So, I am going to try a compilation of my plugin inside SOFA root.However, if you have another idea, feel free to keep me in touch π
Thank you π
17 May 2021 at 20:48 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19467Julien D.BlockedHi @akTheTimes,
My GTestConfig.cmake file is located in:
D:\Utilisateurs\jducrocq\Documents\Librairies\sofa\build\cmake
which I already put in my cMakeLists.txt.
However, from my errors, it seems that the file GTestConfig.cmake is read by Cmake during the compilation, but then, CMake cannot find GtestTargets.cmake, which is required by GTestConfig.cmake.
CMake Error at D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/GTestConfig.cmake:33 (include): include could not find load file: D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/GTestTargets.cmake Call Stack (most recent call first): D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:91 (find_package) CMakeLists.txt:16 (find_package)
By the way, “D:\Utilisateurs\jducrocq\Documents\Librairies\sofa\build\extlibs\gtest\CMakeFiles\Export\lib\cmake\GTest” contains GTestConfig.cmake
I added this path to CMakePrefixPath but it’s not working, alas.
Thank you again.
16 May 2021 at 20:44 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19460Julien D.BlockedIf this can be of any help to find a way to solve my issue, I am copying my CMake file below:
cmake_minimum_required(VERSION 3.1) project(MyPrettyMirror VERSION 1.0) # Find Sofa-config.cmake and Visp-config.cmake set(CMAKE_PREFIX_PATH "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake" "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src") set(CMAKE_CXX_FLAGS "-std=c++11") set(CMAKE_MODULE_PATH "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/cmake/Modules") # GLEW set(GLEW_INCLUDE_DIR "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/include") set(GLEW_SHARED_LIBRARY_RELEASE "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/lib/win64/glew32.lib") # SOFA packages containing our dependencies find_package(SofaFramework REQUIRED) # Needed to use SofaCore, SofaHelper and SofaDefaultType find_package(SofaGeneral REQUIRED) # Needed to use SofaBaseTopology # Use external libraries (Visp for instance) find_package(VISP REQUIRED) if(VISP_FOUND) include(${VISP_USE_FILE}) endif(VISP_FOUND) # Config files (tell SOFA this is a plugin) set(CONFIG_FILES share/config.h src/initMyPrettyMirror.cpp ) # New components = piston forces (independant or global area), forces applied to borders) set(HEADER_FILES share/BorderForces.h share/BorderForces.inl share/PistonForce.h share/PistonForce.inl share/PistonFewPoints.h share/PistonFewPoints.inl share/PressurePiston.h share/PressurePiston.inl ) set(SOURCE_FILES src/BorderForces.cpp src/PistonForce.cpp src/PistonFewPoints.cpp src/PressurePiston.cpp ) # SOFA plugin are basically libraries add_library(${PROJECT_NAME} SHARED ${CONFIG_FILES} ${HEADER_FILES} ${SOURCE_FILES}) # Dependencies target_link_libraries(${PROJECT_NAME} PUBLIC SofaCore SofaHelper SofaDefaultType SofaBaseTopology SofaBoundaryCondition ) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-DSOFA_BUILD_MYPRETTYMIRROR") # Needed to build on Windows (dllimport/dllexport mechanism) ## target_compile_definitions(${PROJECT_NAME} PRIVATE "-DSOFA_BUILD_MYPRETTYMIRROR") # Set include directories to be able to resolve "#include <MyPrettyMirror/XXX.h>" target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>") target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>") # Create package Config, Version & Target files. # Deploy the headers, resources, scenes & examples. sofa_generate_package( NAME ${PROJECT_NAME} TARGETS ${PROJECT_NAME} VERSION ${PROJECT_VERSION} INCLUDE_SOURCE_DIR src INCLUDE_INSTALL_DIR MyPrettyMirror )
Have a good evening/day, dear members of the SOFA community π
16 May 2021 at 19:40 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19459Julien D.BlockedDear @akTheTimes ,
So I tried your solution and things progressed a little bit for me.
First, I had Eigen not found, but by filling my CmakeModulePath
set(CMAKE_MODULE_PATH "D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/src/cmake/Modules")
, as indicated here https://www.sofa-framework.org/community/forum/topic/cmake-error-in-building-sofa/ , I stopped having glew and eigen3 errors.However, I currently have the same errors that I’ve described in the very beginning of this post:
CMake Error at D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/GTestConfig.cmake:33 (include): include could not find load file: D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/GTestTargets.cmake Call Stack (most recent call first): D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:91 (find_package) CMakeLists.txt:16 (find_package)
and multiple errors like
`CMake Error at D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:104 (include):
include could not find load file:D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkTargets.cmake
Call Stack (most recent call first):
CMakeLists.txt:16 (find_package)`I don’t have this file XXXTargets.cmake at all in my Sofa folders.
βD:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/lib/cmakeβ” hasn’t been created on my computer.
If anyone knows the cause of this error, feel free to help.
Thank you again, @akTheTimes, for your advices.
15 May 2021 at 11:18 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19454Julien D.BlockedHi @akTheTimes,
I’ll try this solution tomorrow as I can’t use the computer where SOFA is installed today. I’ll keep you in touch then. Thank you again for your help.
I think I’ve already tried something similar and it didn’t work, I set GLEW_INCLUDE_DIR to “…sofa/src/include” but GLEW_LIBRARIES_DIRS to “…sofa/src/lib/win/64”. However, it’s not exactly the same paths and cmake variables, so perhaps your approach will work better. Anyways, if any member of the SOFA community have another idea before I could check that, feel free to share π
Thank you a lot,
Best wishes,
Julien
14 May 2021 at 15:59 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19450Julien D.BlockedHello @akTheTimes, thank you very much for your help π
Unfortunately, after I have built SOFA from the source code, this folder is not created (I have sofa/build/lib, yes, but not sofa/build/lib/cmake).
I think my error is connected to glew dependencies.
If I don’t install glew by myself, I mean going to the website and donwloading the latest version instead of just unzipping the SOFA_WIN_DEPENDENCIES_PACK into my sofa/src folder, I got the error:CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message): Could NOT find GLEW (missing: GLEW_INCLUDE_DIRS GLEW_LIBRARIES) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.18/Modules/FindGLEW.cmake:207 (find_package_handle_standard_args) D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:88 (find_package) CMakeLists.txt:9 (find_package)
If I install glew by myself, I have then other cmake errors:
CMake Error at D:/Utilisateurs/jducrocq/Documents/Librairies/glew-2.1.0/build/cmake/glew-config.cmake:16 (include): include could not find load file: D:/Utilisateurs/jducrocq/Documents/Librairies/glew-2.1.0/build/cmake/glew-targets.cmake Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.18/Modules/FindGLEW.cmake:62 (find_package) D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:88 (find_package) CMakeLists.txt:9 (find_package)
Can you help me with glew installation? Or is there a way to bypass glew research on the cmakelists.txt of my own plugin? I didn’t have this issue on ubuntu, I only have it on windows…
Thank you again for your help π
11 May 2021 at 15:26 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19430Julien D.BlockedAlso, I don’t know if it’s related, but during SOFA installation (most precisely the library configuration step), I have tons of warnings of that type:
CMake Warning at D:/Cmake/share/cmake-3.20/Modules/FindBoost.cmake:1354 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): D:/Cmake/share/cmake-3.20/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES) D:/Cmake/share/cmake-3.20/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES) D:/Ducrocq/librairies/sofa/build/cmake/SofaFrameworkConfig.cmake:82 (find_package) SofaGui/CMakeLists.txt:7 (find_package)
Perhaps that might help to find a solution.
Julien D.BlockedYes I received it and I started to attend the symposium around 10 AM.
Thank you again
Julien D.BlockedThank you very much Zahra.
I have checked my spams and everything, I have nothing. I think it is my mistake, I probably deleted the right email accidentally…
Can you send me the link by email at julien.ducrocq07@gmail.com ?
Thank you again for your help!
Julien D.BlockedHello everyone,
I have successfully registered to the event (my name is on the list of participants) but I can’t find any link to attend to the online conference.
I am asking to any member of the staff, or any member of the forum, to send me the link to the online symposium.
I am sorry for the inconvenience.
_
Julien DucrocqJulien D.BlockedHello everyone.
I retried SOFA Installation on Windows instead of Ubuntu, and I have exactly the same error when configuring it with CMake
CMake Error at SofaKernel/SofaFramework/SofaMacros.cmake:489 (message):
Missing parameter VALUE.
Call Stack (most recent call first):
SofaKernel/SofaFramework/CMakeLists.txt:26 (sofa_set_01)Is this error blocking the installation or not ?
Sincerely,
Julien
Julien D.BlockedPersonally I am trying to build it on linux ubuntu, I never did it on windows. But I think both our errors might come from the same issue.
Have a good day
Julien
Julien D.BlockedHello all,
Actually I am facing now a similar issue.
So a few months ago I installed successfully SOFA on two different computers, on two different versions (v19 and v20) and it worked fine.
For some reasons, I must install now SOFA on a new computer (with OS Ubuntu 20.06) but I am dealing with installation issues, that I didn’t have on my 2 previous set-ups…
I precise that I followed every step of the installation process.
When I configure the SOFA project with cmake, I have the same error with “SofaMacros.cmake” as reported in this topic :CMake Error at SofaKernel/SofaFramework/SofaMacros.cmake:489 (message):
Missing parameter VALUE.
Call Stack (most recent call first):
SofaKernel/SofaFramework/CMakeLists.txt:26 (sofa_set_01)So I went a little bit further, my Eigen3_DIR was not filled properly so I set it manually with CMake.
When I configure the SOFA project a second time, even if I don’t fill the path to Eigen3, I have no errors but only warnings. So I could try to perform the complete installation of SOFA. I made that and the application “runSofa” was working fine.
However, I have previously made a plugin and I wanted to continue to work on it. So, I tried to compile it and had errors while configuring it with cmake. I investigated this error, and I think it is connected to my configuration of SOFA error with “SofaMacros.cmake”. In my previous installation, all the .cmake files where located at “sofa/build/install”, but on this set-up they are always placed at “sofa/build/cmake”, either root on this directory or distributed in several subdirectories. If I manually move them I have other errors as I try to compile my plugin, and I definitely think it is not the best solution.
If anyone have any hint to help me solve this issue, which could also help the person who opened the topic which have similar ones, I’ll be very glad.
Have a good day everyone.
Julien Ducrocq
-
AuthorPosts