Closed rlorigro closed 1 year ago
Hi @rlorigro,
Did you do a sudo make install
after doing make
? This command installs all the right files in the right paths. By default, the Bifrost binary looks for the Bifrost library in a path which is in your LIBRARY_PATH
and LD_LIBRARY_PATH
variables. If you did not do a sudo make install
, the library was not copied there so you end up with this library not found error. If you could not do a sudo make install
because you do not have sudo
privileges, you have 2 options:
sudo
privileges but which in in your *PATH variables. You can do this on the cmake
command line by adding the option -DCMAKE_INSTALL_PREFIX=/some/path/
. Make sure that /some/path/
is in your PATH
, LIBRARY_PATH
and LD_LIBRARY_PATH
environment variable otherwise you will need to add it. Once you are done with cmake
and make
, do not forget to use make install
(you do not need the sudo
anymore).build
directory) to your *PATH environment variables. See the Troubleshooting section in the READMEI hope this help but let me know if this doesn't work.
Guillaume
Hi Guillaume,
Thanks for the quick response. I used this command (to install directly into the build directory):
ryan@computron:~/software/bifrost/build/bin$ cmake .. -DCMAKE_INSTALL_PREFIX=./
Setting the environment variables is ok, but I thought it would be convenient to do it in a more unified way. I understand if you have other priorities though.
I think it should be possible to add the correct library path to the executable using CMake, if you are interested in that. Here is one example solution: https://stackoverflow.com/a/43551534
Otherwise, a static executable should also be possible?
Thanks
Your cmake
command is just fine but since the library is now installed in a "non-standard" local path, you need to change your environment variables to add this "non-standard" path to it.
Indicating to cmake where to install/find the shared library is ok but I think it defeats the purpose of using a shared library. As you suggested, a static binary would be better for your use case. I'll add this to my todo list.
Guillaume
Great thanks!
Closing for now but I'll notify you here when the static binary feature is up and running.
Hi,
I installed Bifrost according to your instructions in order to create the
bin
andlib
directories inside my path of choice (thebuild
directory). However, when running the executablebin/Bifrost
it cannot find the necessarylibbifrost.so
, so it is not usable. I used the LD_DEBUG method on Ubuntu 20.04 to show that it only searches root and usr directories:Is it possible to create a static executable so that this can be run/installed locally? Or otherwise somehow pass the install prefix to the executable RPATH in cmake?
Thanks