rizsotto / Bear

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

Error while compiling bear package on termux #475

Closed mahmood601 closed 1 year ago

mahmood601 commented 2 years ago

After I had install dependences and clone the project, I compiled the project and I saw this massage: [ 44%] Building CXX object intercept/CMakeFiles/exec_a.dir/source/report/libexec/Resolver.cc.o /data/data/com.termux/files/home/git/Bear/source/intercept/source/report/libexec/Resolver.cc:86:55: error: use of undeclared identifier '_CS_PATH' const size_t search_path_length = confstr(_CS_PATH... ^ /data/data/com.termux/files/home/git/Bear/source/intercept/source/report/libexec/Resolver.cc:89:23: error: no member named 'confstr' in the global namespace if (::confstr(_CS_PATH, search_path, search_pa... ~~^ /data/data/com.termux/files/home/git/Bear/source/intercept/source/report/libexec/Resolver.cc:89:31: error: use of undeclared identifier '_CS_PATH' if (::confstr(_CS_PATH, search_path, search_pa... ^ 3 errors generated. make[5]: [intercept/CMakeFiles/exec_a.dir/build.make:160: intercept/CMakeFiles/exec_a.dir/source/report/libexec/Resolver.cc.o] Error 1 make[4]: [CMakeFiles/Makefile2:542: intercept/CMakeFiles/exec_a.dir/all] Error 2 make[3]: [Makefile:136: all] Error 2 make[2]: [CMakeFiles/BearSource.dir/build.make:87: subprojects/Stamp/BearSource/BearSource-build] Error 2 make[1]: [CMakeFiles/Makefile2:174: CMakeFiles/BearSource.dir/all] Error 2 make: [Makefile:156: all] Error 2

rizsotto commented 2 years ago

Hey @mahmood601, please give some context, otherwise I can't help. (Look at the issue template what sort of information would be helpful. Also consider to share the tool names/version for compilation error.)

mahmood601 commented 2 years ago

Environment:

rizsotto commented 2 years ago

Thanks @mahmood601 to come back with the details... It looks like the Resolver.cc does not check the HAVE_CS_PATH.