mozilla / mig

Distributed & real time digital forensics at the speed of the cloud

Home Page:http://mig.mozilla.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Client daemon fails to build with Yara module support

arcrose opened this issue · comments

When trying to build the MIG Client Daemon from the mig-client-daemon branch, a compilation error occurs.

Steps to Reproduce

  1. Make sure you have yara installed, e.g. by runner brew install yara on macOS
  2. Clone the mig repository and checkout the mig-client-daemon branch.
  3. Checkout mig-client-daemon and cd client/mig-client-daemon
  4. Rename modules/yara to modules/yara.go so it will be included by the compiler in the next step.
  5. Compile from mig-client-daemon/ with go build -o mig-client-daemon main.go

If you encounter an error stating that libcrypto.pc couldn't be found in PKG_CONFIG_PATH, append the path to libcrypto.pc's pkgconfig directory to PKG_CONFIG_PATH. This will likely be contained by OpenSSL. For example, on macOS with OpenSSL installed via Homebrew, I set

export PKG_CONFIG_PATH="/usr/local/Cellar/openssl/1.0.2o_1/lib/pkgconfig/"

to overcome this issue.

Once the above is resolved, you should see an error stating

go build mig.ninja/mig/vendor/github.com/hillu/go-yara: invalid flag in pkg-config --cflags: -L/usr/local/Cellar/yara/3.7.1/lib