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.  

On Monday, April 8, 2024 at 9:58:50 PM UTC-5 Andrew Block wrote:

> 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
>

-- 
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/f0576ce6-533d-45fd-b650-baa92d5cf54bn%40googlegroups.com.

Reply via email to