UCI-CARL / CARLsim6

CARLsim is an efficient, easy-to-use, GPU-accelerated software framework for simulating large-scale spiking neural network (SNN) models with a high degree of biological detail.
MIT License
41 stars 16 forks source link

Error loading libcarlsim-stopwatch.so when running the samples #3

Closed Runkli closed 2 years ago

Runkli commented 2 years ago

After following the build steps, trying to run both benchmark and hello_world gives the following error:

./benchmark: error while loading shared libraries: libcarlsim-stopwatch.so: cannot open shared object file: No such file or directory

Noting that the build seemed to finish successfully without any errors. Any help would be appreciated

Runkli commented 2 years ago

I can find libcarlsim-stopwatch.so in carlsim6/lib directory though.

Runkli commented 2 years ago

Adding export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/carlsim6/lib/ fixed it. Maybe the libraries aren't appended to PATH automatically upon build?

bainro commented 1 year ago

The parent CMakeLists.txt can have these two lines added near the top for the same effect:

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") 
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

Here's where I got the solution from: Link.