Hi Prakhar, Yes, the chrono-tutorial project, as well as the template project in the Chrono repository are supposed to work (assuming you have pulled the latest code in both repos).
Having said that, Dario and I worked in this part of the code recently, with some significant changes and so it's possible we introduced a bug. I don't see any issues on my windows box. Could you please send us your cmake cache file and the output from cmake when configuring chrono-tutorial? --Radu ________________________________ From: [email protected] <[email protected]> on behalf of Prakhar Gupta <[email protected]> Sent: Wednesday, October 11, 2023 8:54:44 PM To: ProjectChrono <[email protected]> Subject: Re: [chrono] CMake version problem for chrono tutorials Radu, Going back to building projects that use chrono - Are the tutorials from the main branch (https://github.com/projectchrono/chrono-tutorial/tree/main) supposed to build in the current commit? I cannot build the template projects or the tutorial projects for the main branch. This is after I can successfully run the demos. I am attaching the log from the make process. On Wednesday, 11 October 2023 at 13:29:25 UTC-4 Radu Serban wrote: Hi Prakhar, Thanks for the heads up. You are correct, this isa bug (most likely a copy and paste). I’ll push the fix soon. --Radu From: [email protected] <[email protected]> On Behalf Of Prakhar Gupta Sent: Wednesday, October 11, 2023 7:22 PM To: ProjectChrono <[email protected]> Subject: Re: [chrono] CMake version problem for chrono tutorials Radu, I am building the main branch now - with the MATLAB module. There seems to be a bug in https://github.com/projectchrono/chrono/blob/2e6cae2d6578531d73f56d28893740ea009544ab/src/chrono_matlab/ChMatlabEngine.h#L85C1-L85C75 This leads to following error during make: ---------------------------------------------------------------- In file included from /home/cralab/chrono/chrono/src/chrono_matlab/ChMatlabEngine.cpp:15:0: /home/cralab/chrono/chrono/src/chrono_matlab/ChMatlabEngine.h:85:10: error: extra qualification ‘chrono::ChMatlabEngine::’ on member ‘GetString’ [-fpermissive] bool ChMatlabEngine::GetString(std::string& str, std::string varname); ^~~~~~~~~~~~~~ src/chrono_matlab/CMakeFiles/ChronoEngine_matlab.dir/build.make:75: recipe for target 'src/chrono_matlab/CMakeFiles/ChronoEngine_matlab.dir/ChMatlabEngine.cpp.o' failed --------------------------------------------------------------- I removed the extra class declaration and it works. If you agree with this fix, I can create an issue on github and create a pull request. Prakhar On Wednesday, 11 October 2023 at 05:50:43 UTC-4 Prakhar Gupta wrote: Radu, Thanks for the suggestion - I will switch over to the main branch. Prakhar On Wednesday, 11 October 2023 at 01:22:19 UTC-4 Radu Serban wrote: Hi Prakhar, Thanks for pointing this out. We missed it in the 8.0 release but will make sure to update the template project in the latest development code so that it requires a proper CMake version, compatible with Chrono itself. On a different note, like Dario also suggested, I encourage you to start using the latest code in the ‘main’ branch of the Chrono git repository. There have been many enhancements, new features, and bug fixes since the 8.0 release. --Radu From: [email protected] <[email protected]> On Behalf Of Prakhar Gupta Sent: Tuesday, October 10, 2023 11:33 PM To: ProjectChrono <[email protected]> Subject: Re: [chrono] CMake version problem for chrono tutorials Yes, that fixed the error with cmake 3.27.7. I was just thrown off, because the cmake minimum version in the cmake files for all chrono was 3.10, and it does the job too. I did not expect tutorials to be requiring a different version. Thanks for the help! Cheers, Prakhar On Tuesday, 10 October 2023 at 16:59:36 UTC-4 [email protected] wrote: Hi Prakhar, we just changed the template project and the relative chrono-config file so we surely need some feedback. Could you update CMake to latest version? Dario -------- Messaggio originale -------- Da: Prakhar Gupta <[email protected]> Data: 10/10/23 22:51 (GMT+01:00) A: ProjectChrono <[email protected]> Oggetto: [chrono] CMake version problem for chrono tutorials Hi, I have installed and built chrono-8.0.0 on Ubuntu 18.04. I can run all the demos OK. I am trying to create a new project, using tutorials ( https://github.com/projectchrono/chrono-tutorial/tree/8.0.0 ), and the template_project folder that comes with chrono (https://api.projectchrono.org/tutorial_install_project.html). When I try to configure the cmake, for these projects, I get errors for "PREPEND" subcommand not recognized. I am aware that these commands were added to cmake in only the later versions, and not in 3.10. I wonder if I am doing something wrong, or am supposed to run another template project/ tutorial versions? Config: gcc 7.5.0 cmake 3.10.2 irrlicht 1.8.4 CMAKE configuration Output for the tutorials case (I get same PREPEND unrecognized error for the template_project too that came with the /chrono directory) ------------------------------------------------------------------------- ==== Chrono programs ==== Finding package Chrono... CMake Error at /home/cralab/chrono/chrono_build/cmake/ChronoConfig.cmake:83 (list): list does not recognize sub-command PREPEND Call Stack (most recent call first): slider_crank/CMakeLists.txt:16 (find_package) CMake Error at /home/cralab/chrono/chrono_build/cmake/ChronoConfig.cmake:86 (list): list does not recognize sub-command PREPEND Call Stack (most recent call first): slider_crank/CMakeLists.txt:16 (find_package) Requested component Irrlicht (REQUIRED) CMake Error at /home/cralab/chrono/chrono_build/cmake/ChronoConfig.cmake:258 (list): list does not recognize sub-command PREPEND Call Stack (most recent call first): slider_crank/CMakeLists.txt:16 (find_package) CMake Error at /home/cralab/chrono/chrono_build/cmake/ChronoConfig.cmake:264 (list): list does not recognize sub-command PREPEND Call Stack (most recent call first): slider_crank/CMakeLists.txt:16 (find_package) CHRONO_CXX_FLAGS (Compiler flags): ;-pthread;-fopenmp;-march=native CHRONO_C_FLAGS (Compiler flags): ;-pthread;-fopenmp;-march=native CHRONO_LINKER_FLAGS (Linker flags): -L/home/cralab/chrono/chrono_build/lib CHRONO_INCLUDE_DIRS (Chrono include directories): /home/cralab/chrono/chrono/src;/home/cralab/chrono/chrono/src/chrono;/home/cralab/chrono/chrono/src/chrono/collision/bullet;/home/cralab/chrono/chrono/src/chrono/collision/gimpact;/home/cralab/chrono/chrono/src/chrono_thirdparty/HACD;/home/cralab/chrono/chrono/src/chrono_thirdparty/HACDv2;/home/cralab/chrono/chrono_build;/usr/local/include/eigen3;;/usr/include/irrlicht CHRONO_LIB_NAMES (Chrono library names): CHRONO_LIBRARIES (Chrono libraries): /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so;/usr/lib/x86_64-linux-gnu/libpthread.so;;/usr/lib/x86_64-linux-gnu/libIrrlicht.so;-lXxf86vm;-lglut;-lX11;-lGL CHRONO_DLL_NAMES (Chrono DLL names): CHRONO_DLLS (Chrono DLLs): CHRONO_DATA_DIR (Path to Chrono data folder): /home/cralab/chrono/chrono/data/ CHRONO_VEHICLE_DATA_DIR (Path to Chrono::Vehicle data folder): /home/cralab/chrono/chrono/data/vehicle/ CHRONO_FSI_DATA_DIR (Path to Chrono::FSI data folder): /home/cralab/chrono/chrono/data/fsi/ ...add slider_crank_0 CMake Error at slider_crank/CMakeLists.txt:55 (target_link_options): Unknown CMake command "target_link_options". Configuring incomplete, errors occurred! See also "/home/cralab/chrono/chrono-tutorial-8.0.0_build/CMakeFiles/CMakeOutput.log". --------------------------------------------------------------------- Any help is appreciated! Thanks! Prakhar Gupta -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/78bcf2be-ad2f-4da8-9c60-c69f9cad3b36n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/78bcf2be-ad2f-4da8-9c60-c69f9cad3b36n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/bba06e8c-16b7-4791-b224-fdc349d63a75n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/bba06e8c-16b7-4791-b224-fdc349d63a75n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/391fff37-1c21-4a8e-8451-5a1b28b965fcn%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/391fff37-1c21-4a8e-8451-5a1b28b965fcn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/25ff6e85-17e7-488e-ac01-4c5c051145f7n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/25ff6e85-17e7-488e-ac01-4c5c051145f7n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/PH0PR06MB823720D14538C90A60D86026A7CCA%40PH0PR06MB8237.namprd06.prod.outlook.com.
