njoy / NJOY21

NJOY for the 21st Century
https://www.njoy21.io/NJOY21
Other
74 stars 38 forks source link

Installation problem #98

Closed AI-Pranto closed 4 years ago

AI-Pranto commented 5 years ago

When I run

njoy21 --version 

I get following error.

 njoy21: error while loading shared libraries: libnjoy_c_bindings.so: cannot open shared object file: No such file or directory

What should I do now?

whaeck commented 5 years ago

By default, NJOY21 is compiled using dynamic libraries. If you move the executable, you should move the dynamic library that is generated as well.

As an alternative, you may want to try static compilation:

cmake -D static_libraries=True -D static_njoy21=True  -D CMAKE_EXE_LINKER_FLAGS="-static" ../
AI-Pranto commented 3 years ago

@whaeck, With the latest release of 1.2.2, I got

[ 92%] Linking CXX executable njoy21.Version.test
cd /home/pranto/github/NJOY21/bin/src/njoy21/Version/test && /home/pranto/.local/lib/python3.8/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/njoy21.Version.test.dir/link.txt --verbose=1
/usr/bin/clang++ -g -static CMakeFiles/njoy21.Version.test.dir/Version.test.cpp.o -o njoy21.Version.test   -L/usr/lib/gcc/x86_64-linux-gnu/9  ../../../../_deps/njoy_c_bindings-build/libnjoy_c_bindings.a ../../../../_deps/njoy-build/libnjoy.a ../../../../_deps/utility-build/libutility.a -lgfortran -lquadmath 
make[2]: Leaving directory '/home/pranto/github/NJOY21/bin'
[ 92%] Built target njoy21.Version.test
In file included from /home/pranto/github/NJOY21/src/njoy21/io/Manager/test/Manager.test.cpp:6:
/home/pranto/github/NJOY21/src/njoy21.hpp:21:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
                               ^
In file included from /home/pranto/github/NJOY21/src/njoy21/Driver/test/Driver.test.cpp:4:
/home/pranto/github/NJOY21/src/njoy21.hpp:21:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
                               ^
In file included from /home/pranto/github/NJOY21/src/njoy21/legacy/Sequence/test/Sequence.test.cpp:6:
/home/pranto/github/NJOY21/src/njoy21.hpp:21:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
                               ^
In file included from /home/pranto/github/NJOY21/src/njoy21/CommandLine/test/CommandLine.test.cpp:4:
/home/pranto/github/NJOY21/src/njoy21.hpp:21:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
                               ^
Killed
make[2]: *** [src/njoy21/io/Manager/test/CMakeFiles/njoy21.io.Manager.test.dir/build.make:82: src/njoy21/io/Manager/test/CMakeFiles/njoy21.io.Manager.test.dir/Manager.test.cpp.o] Error 137
make[2]: Leaving directory '/home/pranto/github/NJOY21/bin'
make[1]: *** [CMakeFiles/Makefile2:2745: src/njoy21/io/Manager/test/CMakeFiles/njoy21.io.Manager.test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Start  4: njoy21.io.Manager
Could not find executable /home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/njoy21.io.Manager.test
Looked in the following places:
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Release/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Release/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Debug/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Debug/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/MinSizeRel/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/MinSizeRel/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/RelWithDebInfo/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/RelWithDebInfo/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Deployment/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Deployment/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Development/njoy21.io.Manager.test
/home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Development/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Release/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Release/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Debug/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Debug/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/MinSizeRel/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/MinSizeRel/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/RelWithDebInfo/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/RelWithDebInfo/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Deployment/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Deployment/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Development/njoy21.io.Manager.test
home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/Development/njoy21.io.Manager.test
Unable to find executable: /home/pranto/github/NJOY21/bin/src/njoy21/io/Manager/test/njoy21.io.Manager.test
 4/63 Test  #4: njoy21.io.Manager ................***Not Run   0.00 sec

I am using