eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.44k stars 1.38k forks source link

[Question] error while loading shared libraries: libjupedsim.so: cannot open shared object file: No such file or directory #14539

Closed usamael2000 closed 4 months ago

usamael2000 commented 4 months ago

I followed the instructions to build Jupedsim then sumo for Linux, as follows:

Jupedsim

git clone https://github.com/PedestrianDynamics/jupedsim.git cd jupedsim git checkout v1.1.0 cd .. cmake -B jupedsim-build -DCMAKE_INSTALL_PREFIX=jupedsim-install jupedsim cmake --build jupedsim-build -j$(nproc) cmake --install jupedsim-build sudo apt-get install libgeos-dev

then I installed sumo

sudo apt-get install git cmake python3 g++ libxerces-c-dev libfox-1.6-dev libgdal-dev libproj-dev libgl2ps-dev python3-dev swig default-jdk maven libeigen3-dev git clone --recursive https://github.com/eclipse-sumo/sumo cd sumo export SUMO_HOME="$PWD" cmake -B build . cmake --build build -j$(nproc) sudo cmake --install build

everything went OK, but when I tried to start either sumo or sumo-gui, I get this error:

$ sumo sumo: error while loading shared libraries: libjupedsim.so: cannot open shared object file: No such file or directory

$ sumo-gui sumo-gui: error while loading shared libraries: libjupedsim.so: cannot open shared object file: No such file or directory

Please note that Netedit, netgenerate, etc. are working fine.

Here you are the output of the netgenerate command: $ netgenerate Eclipse SUMO netgenerate Version v1_19_0+1384-d9d645c5078 Build features: Linux-6.6.15-amd64 x86_64 GNU 13.2.0 Release FMI Proj GUI Intl SWIG GDAL FFmpeg OSG GL2PS Eigen JuPedSim Copyright (C) 2001-2024 German Aerospace Center (DLR) and others; https://sumo.dlr.de License EPL-2.0: Eclipse Public License Version 2 https://eclipse.org/legal/epl-v20.html Use --help to get the list of options.

I am not sure what I missed.

SUMO-version: built from source code: Version v1_19_0+1384-d9d645c5078

operating system: OS: Debian GNU/Linux trixie trixie/sid x86_64

behrisch commented 4 months ago

Could you please try whether it works if you do not install sumo but use it from the bin dir in the source tree? And/or alternatively do not provide an install prefix for jupedsim?

usamael2000 commented 4 months ago

This to confirm that running sumo from the bin folder is working fine, as follows:

$ /home/usamael2000/00_ubuntu_home_files_July2022/Documents/sumo_source_code/sumo/bin/sumo Eclipse SUMO sumo Version v1_19_0+1384-d9d645c5078 Build features: Linux-6.6.15-amd64 x86_64 GNU 13.2.0 Release FMI Proj GUI Intl SWIG GDAL FFmpeg OSG GL2PS Eigen JuPedSim Copyright (C) 2001-2024 German Aerospace Center (DLR) and others; https://sumo.dlr.de License EPL-2.0: Eclipse Public License Version 2 https://eclipse.org/legal/epl-v20.html Use --help to get the list of options.

I also just tried to copy the "libjupedsim.so" from the "jupedsim-install/lib" folder to "/usr/lib/" folder, and I was able to run both of sumo and sumo-gui without errors, as follows:

$ cd /home/usamael2000/00_ubuntu_home_files_July2022/Documents/sumo_source_code/jupedsim-install/lib $ sudo cp libjupedsim.so /usr/lib/

$ sumo Eclipse SUMO sumo Version v1_19_0+1384-d9d645c5078 Build features: Linux-6.6.15-amd64 x86_64 GNU 13.2.0 Release FMI Proj GUI Intl SWIG GDAL FFmpeg OSG GL2PS Eigen JuPedSim Copyright (C) 2001-2024 German Aerospace Center (DLR) and others; https://sumo.dlr.de License EPL-2.0: Eclipse Public License Version 2 https://eclipse.org/legal/epl-v20.html Use --help to get the list of options.

behrisch commented 4 months ago

Thanks, I will update the docs accordingly