Closed AimerYi closed 3 years ago
Hey @AimerYi , can you give me more context?
bear --verbose -- make
would do it)Hey @rizsotto this is freebsd version: problem:
and this is the verbose log after run the command bear --verbose -- make
Thanks @AimerYi for this.
void *handle = ::dlopen(LIBC_SO, RTLD_LAZY);
if (handle == nullptr) {
return rust::Err(std::runtime_error(
fmt::format("System call \"dlopen\" failed: {}", sys::error_string(errno))));
}
This is the fragment which cause the error... I presume the LIBC_SO
definition is not available on FreeBSD. Can you confirm this? Or suggest a similar symbol to it? (For reference this is what the linux defines this.)
As a workaround I can suggest to use the compiler wrappers (instead of the preload). bear --force-wrapper -- make
is the way to use it.
@rizsotto sorry i just use freebsd to get it's kernel's compile_commands.json.I don't know how to confirm it. and if i use bear --force-wrapper -- make to finish the make ,the file: "compile_commands.json" have nothing....
@AimerYi could you test this for me?
ls -l /lib/libc.so*
I assume it's going to be libc.so.7
source/libsys/source/Process.cc
line 44 edit the define line to #define LIBC_SO "libc.so.7"
(I assume you have 3.0.12 Bear source code)Yay, that's a good news... Is this a virtual machine that you can increase the size of the memory? Or can you increase the size of the swap space? Or check if you are running the build parallel and reduce the parallelism to lower the number of processes running at the same time?
Otherwise we need to go into the details... Check the allocation of Bear processes? (it's intercept
, citnames
and bear
) Check how much memory you have? How much parallelism do you use? In order to fix this, I need to know these to reproduce the problem.
But thank you to try out those changes. I think we are close to get a compilation database for you! :smile:
@rizsotto after increse the memory to 2GB ,the bear can work without any error ,thank u very much ,have a nice day!
I build bear in freebsd from github but when use bear -- make in freebsd it have an error: wrapper: failed with : system call "dlopen " failed : Resource temporarily unavailable. how can i fix this and use bear in freebsd