rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.8k stars 313 forks source link

bear -- make failed #338

Closed tanushbanerjee closed 3 years ago

tanushbanerjee commented 3 years ago

I ran the command bear -- make It failed and returned this error

/usr/local/bin/intercept: error while loading shared libraries: libgrpc.so.13: cannot open shared object file: No such file or directory citnames: failed with: Missing input file: "compile_commands.commands.json"

Makefile ->

Environment:

rizsotto commented 3 years ago

citnames: failed with: Missing input file: "compile_commands.commands.json" is the result of the previous error: /usr/local/bin/intercept: error while loading shared libraries: libgrpc.so.13: cannot open shared object file: No such file or directory

Is it possible that you've uninstalled the grpc package after installing Bear? (You'll need to re-install grpc.) Or compiled against a different version, and when you've updated your system grpc got upgraded? (In this case you'll need to re-build Bear)

tanushbanerjee commented 3 years ago

OK Thanks .... :)

tanushbanerjee commented 3 years ago

But now when I run make all it returns with this error --> [ 0%] Built target grpc_dependency [ 0%] Built target googletest_dependency [ 0%] Built target nlohmann_json_dependency [ 0%] Built target fmt_dependency [ 0%] Built target spdlog_dependency [ 11%] Performing build step for 'BearSource' -- Looking for protoc ... /usr/bin/protoc -- Looking for grpc_cpp_plugin ... /usr/bin/grpc_cpp_plugin -- Configuring done -- Generating done -- Build files have been written to: /home/tanush/Downloads/Bear-3.0.3/subprojects/Build/BearSource [ 1%] Built target flags_a [ 3%] Built target shell_a [ 14%] Built target sys_a [ 20%] Built target supervise_a [ 24%] Built target reporter_a make[5]: *** No rule to make target '/usr/lib/libabsl_dynamic_annotations.so', needed by 'intercept/er'. Stop. make[4]: *** [CMakeFiles/Makefile2:388: intercept/CMakeFiles/er.dir/all] Error 2 make[3]: *** [Makefile:149: all] Error 2 make[2]: *** [CMakeFiles/BearSource.dir/build.make:133: subprojects/Stamp/BearSource/BearSource-build] Error 2 make[1]: *** [CMakeFiles/Makefile2:201: CMakeFiles/BearSource.dir/all] Error 2 make: *** [Makefile:171: all] Error 2

WHAT SHOULD I DO NOW ???

rizsotto commented 3 years ago

It's either a package problem or it's an upstream problem (of gRPC). Can you downgrade the grpc package?

https://github.com/archlinux/svntogit-community/commits/packages/grpc/trunk I think it's the abseil dependency bump up. Could you bisect which change cause it?

rizsotto commented 3 years ago
$ pacman -Q grpc spdlog fmt nlohmann-json gtest gmock cmake pkg-config python
grpc 1.34.0-3
spdlog 1.8.1-2
fmt 7.1.3-1
nlohmann-json 3.9.1-1
gtest 1.10.0-3
gmock 1.10.0-3
cmake 3.19.1-2
pkgconf 1.7.3-1
python 3.9.0-1

Using arch linux with these packages, I could not reproduce this build error. Nor the runtime error you've got.