Velocidex / c-aff4

An AFF4 C++ implementation.
http://docs.aff4.org
Apache License 2.0
188 stars 34 forks source link

Build-time errors are present related to libspdlog-dev #148

Open ajnelson-nist opened 4 years ago

ajnelson-nist commented 4 years ago

Hello,

I tried building c-aff4 from today's master branch head (657dc28b805a55e44696125e6b3627e64dfc653a) and hit a couple problems related to libspdlog-dev.

Build environment: Decently-fresh Ubuntu 20.04 Desktop.

First, it looks like autoconf isn't checking for libspdlog-dev, evidenced by a build-time failure when a header isn't found. Build log snippet:

../aff4/rdf.h:20:10: fatal error: spdlog/fmt/ostr.h: No such file or directory
   20 | #include <spdlog/fmt/ostr.h>

Less easy to resolve is the use of a function that doesn't appear to be there at the version of libspdlog-dev provided by Ubuntu 20.04:

libaff4.cc: In function ‘std::shared_ptr<spdlog::logger> aff4::get_logger()’:
libaff4.cc:638:28: error: ‘stderr_logger_mt’ is not a member of ‘spdlog’
  638 |             return spdlog::stderr_logger_mt(aff4::LOGGER);
      |                            ^~~~~~~~~~~~~~~~
libaff4.cc:640:24: error: ‘stderr_color_mt’ is not a member of ‘spdlog’
  640 |         return spdlog::stderr_color_mt(aff4::LOGGER);
      |                        ^~~~~~~~~~~~~~~

Here's the version of that library I used when I encountered this issue:

$ apt search libspdlog-dev
Sorting... Done
Full Text Search... Done
libspdlog-dev/focal,now 1:1.5.0-1 amd64 [installed]
  Very fast, header only or compiled, C++ logging library
ryandesign commented 4 years ago

Duplicate of #38.

scudette commented 4 years ago

Please build with the provided docker image. The project requires an older version of spdlog which is unfortunately not compatible with the current version.

Migrating dependencies to later versions is probably not going to happen soon. Sadly C++ dependency management and the build ecosystem is too much of a maintenance nightmare and we currently migrating to Golang to solve these issues so this project is unlikely to receive much love.

ajnelson-nist commented 4 years ago

Thank you both for the context. Is the c-aff4 project going to be retired and replaced with a go-aff4 project?

scudette commented 4 years ago

I wouldn't say retired necessarily since some people are integrating it into existing products and we need to maintain it going forward. So we will still accept patches etc. The recommended way to build it is using the docker file because the dependency management is not great, but if you can figure out how to migrate to latest version we will accept patches of course.

I will probably look into a simpler implementation of aff4 in go in future but it's a low priority at the moment so no eta on that.

Jon-Rowe commented 3 years ago

Hello, I'm Jon Rowe CEO at Pinpoint Labs (pinpointlabs.com). We're looking to hire outside assistance compiling and customizing c-aff4 . Please let me know if there are any contributors or other members available. You can email me jon dot rowe at pinpointlabs dot com. Thanks in advance!