Skip to content

Instantly share code, notes, and snippets.

@bopbi
Last active September 28, 2022 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bopbi/aded8534762e728ec9d0e7b25ddd583c to your computer and use it in GitHub Desktop.
Save bopbi/aded8534762e728ec9d0e7b25ddd583c to your computer and use it in GitHub Desktop.
Compile Vernemq on Mac M1

clone vernemq

  • brew install erlang
  • brew install openssl
  • brew install leveldb
  • brew install snappy
  • cd /usr/local/lib/
  • ln -s /opt/homebrew/Cellar/snappy/1.1.9/lib/libsnappy.1.dylib
  • ln -s /opt/homebrew/Cellar/snappy/1.1.9/lib/libsnappy.a
  • ln -s /opt/homebrew/Cellar/snappy/1.1.9/lib/libsnappy.dylib

in the middle it will fail with

===> Compiling vmq_bridge
cc   -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include vmq_passwd.c -lcrypto -o ../priv/vmq_passwd
vmq_passwd.c:32:10: fatal error: 'openssl/evp.h' file not found
#include <openssl/evp.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [compile] Error 1

edit your apps/vmq_passwd/c_src/Makefile set the correct OPENSSL_DIR for me it will be OPENSSL_DIR ?= /opt/homebrew/Cellar/openssl@3/3.0.5

re-run the make rel and it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment