0

Building rocksdb on my Ubuntu 20.04 box. I get the following error:

In file included from db/malloc_stats.cc:16:
./port/jemalloc_helper.h:63:29: error: 'je_malloc' attribute directive ignored [-Werror=attributes]
   63 |    __attribute__((__weak__));
      |                            ^

I'm compiling using a simple make -j and I have all the listed dependencies installed, including libjemalloc-dev, but I've tried uninstalling it to no avail. gcc version is 9.3.0. Reinstalling it as well. These attribute directives are an area of C++ I'm not at all familiar with and I have no idea how to diagnose this problem. If I pass DISABLE_WARNING_AS_ERROR, I end up with linker errors, so clearly this error is meaningful. Notably, I was able to build this quite recently on this machine, and I don't recall changing anything that would have affected this. I did system updates, but nothing else that would possibly cause this that I know of. I've checked previous commits of rocksdb and I get the same error so the problem is definitely on my end somehow, but I've checked with coworkers and none of them have this problem. Any ideas or advice on how to diagnose this issue would be appreciated.

EDIT: I've just tried running make alone, and while it took forever, the build succeeded. This is not practical and I'm still at a complete loss as to how to diagnose this issue.

EDIT 2: The successful build with make is not consistent, though I am confident that it succeeded at least once. When it doesn't succeed I get the same error as above.

scatter
  • 903
  • 7
  • 24

0 Answers0