Error on Running Project Template

38 views
Skip to first unread message

Andrew Block

unread,
Apr 8, 2024, 10:58:50 PM4/8/24
to ProjectChrono
Hi, I'm running into an issue trying to compile the example from here:  https://api.projectchrono.org/tutorial_install_project.html

When I get to the step where I actually run the program, I get the following error:
./my_demo: error while loading shared libraries: libChronoEngine_postprocess.so: cannot open shared object file: No such file or directory

In order to help you understand exactly what I'm doing, here's a docker file of the exact commands to replicate the issue:

FROM debian:latest
RUN apt update && apt upgrade -y
RUN apt install -y git libirrlicht* libeigen3* cmake-curses-gui g++ libxxf86vm* freeglut3* libx11-dev* libgl1-mesa-dev nano
RUN git clone https://github.com/projectchrono/chrono.git
RUN cd chrono && mkdir build
WORKDIR /chrono/build
RUN cmake -S .. -B . -DENABLE_MODULE_IRRLICHT=ON -DENABLE_MODULE_POSTPROCESS=ON -DCMAKE_BUILD_TYPE=Release
RUN make && make install

#-----------------------THis is the part for after Chrono has been built

WORKDIR cd /root
RUN cp -r /chrono/template_project .
WORKDIR ./template_project
#This line adds the Postprocess module onto the CMakeLists.txt file so that Postprocess is also part of the build.
RUN awk 'NR == 67 { print $0, " Postprocess" } NR != 67' CMakeLists.txt > temp_file && mv temp_file CMakeLists.txt
RUN mkdir build
WORKDIR build
RUN cmake -S .. -B .
RUN make
RUN ./my_demo

As you can see, all I'm doing is running the template project exactly as the instructions say to do. The container is Debian, but I noticed the same issue while running Ubuntu so I have no reason to think is OS specific.  I suspect I'm missing a package but I'm not sure which one.

Thanks,
Andy

Andrew Block

unread,
Apr 8, 2024, 11:58:22 PM4/8/24
to ProjectChrono
I got it working.  Here's the working Script:

FROM debian:latest
RUN apt update && apt upgrade -y
RUN apt install -y git libirrlicht* libeigen3* cmake-curses-gui g++ libxxf86vm* freeglut3* libx11-dev* libgl1-mesa-dev nano
RUN git clone https://github.com/projectchrono/chrono.git
RUN cd chrono && mkdir build
WORKDIR /chrono/build
RUN cmake -S .. -B . -DENABLE_MODULE_IRRLICHT=ON -DENABLE_MODULE_POSTPROCESS=ON -DCMAKE_BUILD_TYPE=Release
RUN make && make install
RUN ldconfig

The ldconfig command updates the shared library cache on the system.  
Reply all
Reply to author
Forward
0 new messages