4

I'm trying to build an application that uses an erlang library. (https://github.com/leo-project/erocksdb). This library itself is a wrapper over a C++ static library (rocksdb, compiled as librocksdb.a). rocksdb is made a git submodule of erocksdb, and sits in the c_src directory. I'm modifying code in both the places (rocksdb and erocksdb).

The problem is that if I make a change in one of the .cc files of rocksdb, the make command fired on erocksdb only compiles the librocksdb.a file (output of the rocksdb code), but does not update the erocksdb.so file.

This happens because the rebar.config does not specify that librocksdb.a as a source file. The normal way of adding sources, which is port_specs in rebar.config cannot be used since it seems to expect the source to be a C/C++ file, and tries to create a .o for each of the source files.

How can I get the dependency reflected correctly?

saketrp
  • 2,323
  • 3
  • 16
  • 18

0 Answers0