Hi All,
I am trying to build libsnark as a library, in order to link it to my application. I followed the instructions given in the README file, however I am facing the same issue over and over even though I tried several workarounds. I would highly appreciate any insights in resolving this issue.
I was able to compile libsnark source successfully on Mac OS Sierra (10.12.6) with the command: CPPFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig cmake -DWITH_PROCPS=OFF
However, when I try to build it as a library, using the command given in README file: DESTDIR=/install/path make install, I get the following error:
libsnark/depends/libsnark-supercop/src/crypto_core/aes128encrypt/openssl/core.c:1:10: fatal error: 'openssl/aes.h' file not found
#include <openssl/aes.h>
I understand this is because the build system can not find the openssl location on Mac. I supplied the CFLAGS and LDFLAGS to the make command
as I did in the cmake command above. However, it still gives the same error. I also tried setting those flags using export command which does
not work either.
I tried disabling the building of supercop with WITH_SUPERCOP=OFF, as mentioned in the README file. The command I tried for this is: DESTDIR=../../myfirstZKSNARK/ make install WITH_SUPERCOP=OFF. However, it does not seem to disable building libsnark-supercop. There should be something wrong with my command.
Any insights on resolving this issue is highly appreciated.
Thank you.
Hasini.