-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot build template_project on Ubuntu 21.10 #377
Comments
I've managed to compile the template_project by running
Then after pressing c to configure and then g to generate, I've ran $ make
Scanning dependencies of target myexe
[ 50%] Building CXX object CMakeFiles/myexe.dir/my_example.cpp.o
[100%] Linking CXX executable myexe
[100%] Built target myexe EDIT: Also, you can have the same setup without running CMake GUI by just running oneliner in the build folder root@vm:~/Desktop/template_project/build$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local -DChrono_DIR=/usr/local/lib/cmake ..
-- Finding package Chrono...
-- Requested component Irrlicht (REQUIRED)
-- CHRONO_CXX_FLAGS (Compiler flags): -std=c++14 -fopenmp -march=native -msse4.2 -mfpmath=sse -march=native -mavx2 -march=native -mfma
-- CHRONO_C_FLAGS (Compiler flags): -fopenmp -march=native -msse4.2 -mfpmath=sse -march=native -mavx2 -march=native -mfma
-- CHRONO_LINKER_FLAGS (Linker flags): -L/usr/local/lib
-- CHRONO_INCLUDE_DIRS (Chrono include directories): /usr/local/include;/usr/local/include/chrono;/usr/local/include/chrono/collision/bullet;/usr/local/include/chrono/collision/gimpact;/usr/local/include/chrono_thirdparty/HACD;/usr/local/include/chrono_thirdparty/HACDv2;/usr/include/eigen3;;/usr/include/irrlicht
-- CHRONO_LIB_NAMES (Chrono library names): ChronoEngine;ChronoEngine_irrlicht
-- CHRONO_LIBRARIES (Chrono libraries): /usr/lib/gcc/x86_64-linux-gnu/11/libgomp.so;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libIrrlicht.so;-lXxf86vm;-lglut;-lX11;-lGL;/usr/local/lib/libChronoEngine.so;/usr/local/lib/libChronoEngine_irrlicht.so
-- CHRONO_DLL_NAMES (Chrono DLL names):
-- CHRONO_DLLS (Chrono DLLs):
-- CHRONO_DATA_DIR (Path to Chrono data folder): /usr/local/share/chrono/data/
-- CHRONO_VEHICLE_DATA_DIR (Path to Chrono::Vehicle data folder): /usr/local/share/chrono/data/vehicle/
-- CHRONO_FSI_DATA_DIR (Path to Chrono::FSI data folder): /usr/local/share/chrono/data/fsi/
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ivan/Desktop/template_project/build |
After successfull build I've ran $ ./myexe
./myexe: error while loading shared libraries: libChronoEngine_postprocess.so: cannot open shared object file: No such file or directory How do I solve it? EDIT: I see I have missing lib in the root@vm:/usr/local/lib$ ls -l
total 78716
drwxr-xr-x 2 root root 4096 tra 5 11:01 cmake
-rw-r--r-- 1 root root 2569032 tra 5 10:53 libChronoEngine_irrlicht.so
-rw-r--r-- 1 root root 896528 tra 5 10:48 libChronoEngine_postprocess.so
-rw-r--r-- 1 root root 73982144 tra 5 10:48 libChronoEngine.so
-rw-r--r-- 1 root root 3138248 tra 5 10:54 libChronoModels_robot.so
drwxr-xr-x 3 root root 4096 lis 12 22:39 python3.9 Maybe it is the problem in the empty DLLs path variables as stated in the comment above:
|
There is a cross-module dependency that is not properly reflected in the Chrono project configuration script. Until then, please rebuild and reinstall Chrono with the Postprocess module enabled (i.e., set |
I had Postprocess module already installed because I've followed https://api.projectchrono.org/tutorial_install_chrono_linux.html where it says that the ENABLE_MODULE_POSTPROCESS should be set to ON. |
I've managed to run template project executable |
Running |
I've built and succesfully isntalled Chrono as specified in the Install documentation.
I've copied template_project and cd into it,
made build foder, cd into it,
ran
cmake -DChrono_DIR=<path_to_cloned_chrono_dir>/cmake ..
,I get missing Chrono_DIR error.
Here is the full cmake setup console output:
I've also tried with CMake GUI by running
ccmake ..
in the build foder. I've set the Chrono_DIR variable to <path_to_cloned_chrono_dir>/cmake but still I get missing: Chrono_DIR error.The text was updated successfully, but these errors were encountered: