Closed tr4v3ler closed 2 years ago
Hey @tr4v3ler , have you read the INSTALL.md file? It has the instruction for Ubuntu users. If that not helps, let me know.
@rizsotto bear install at /usr/local/bin , ld.so try to find at /usr/local/$LIB/bear/libexec.so, but the $LIB is empty follow the INSTALL.md not work
Hey @TC500 , thanks to come over here.
First, I would like to point out that $LIB
in the error message does not refer to an environment variable called LIB
. This is a defined symbol for the dynamic linker on your system, which expands in a LD_PRELOAD
usage. (Read man ld.so
for more.)
Depending on your Linux distribution and the architecture of your machine, the $LIB
expands to lib
, lib64
, lib/i386-linux-gnu
, etc... Check out what is the directory name in /usr
that contains your libc.so
.
Fedora running on a x86_64, this is /usr/lib64/libc.so
, therefore the $LIB
expands to lib64
. In this case the libexec.so
should be installed as /usr/local/lib64/bear/libexec.so
.
CMake somehow does not pay attention for this important detail. And it installs the library as /usr/local/lib/bear/libexec.so
. (That's why the INSTALL.md
gives instruction how to change that.)
Here are some tips:
3.14
version. (It does not have the multilib support.)$LIB
expands to on your system (as I've detailed above), and check the libexec.so
file location.@rizsotto thanks, ubuntu 20 $LIB expand to lib/x86_64-linux-gnu, and set -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu solve this problem
After compiling, I tried to execute bear, but the following error occurred:
The default path of libexec.so here should be
/usr/local/lib/bear/libexec.so
, repairing this path can solve the first problem. By the way, I use Ubuntu 20.04.3, and the bear version is 3.0.16.