Closed cnasikas closed 6 years ago
I had the same issue, I did manage to get it working with:
LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:"${LD_LIBRARY_PATH}"
CPATH=/usr/local/opt/openssl/include:"${CPATH}"
PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:"${PKG_CONFIG_PATH}"
export LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH
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 -DWITH_SUPERCOP=OFF ..
Thanks a lot. It worked!!
I had the same issue, I did manage to get it working with:
LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:"${LD_LIBRARY_PATH}" CPATH=/usr/local/opt/openssl/include:"${CPATH}" PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:"${PKG_CONFIG_PATH}" export LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH 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 -DWITH_SUPERCOP=OFF ..
In travis-ci macOS Build Environment, for osx_image: xcode11
, the path /usr/local/opt/openssl
is somehow not linked correctly.
We could use brew --prefix openssl
to find the correct path.
Or try this:
CPPFLAGS=-I$(brew --prefix openssl)/include LDFLAGS=-L$(brew --prefix openssl)/lib PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig cmake -DWITH_PROCPS=OFF -DWITH_SUPERCOP=OFF ..
I had the same issue, I did manage to get it working with:
LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:"${LD_LIBRARY_PATH}" CPATH=/usr/local/opt/openssl/include:"${CPATH}" PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:"${PKG_CONFIG_PATH}" export LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH 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 -DWITH_SUPERCOP=OFF ..
In travis-ci macOS Build Environment, for
osx_image: xcode11
, the path/usr/local/opt/openssl
is somehow not linked correctly.We could use
brew --prefix openssl
to find the correct path.Or try this:
CPPFLAGS=-I$(brew --prefix openssl)/include LDFLAGS=-L$(brew --prefix openssl)/lib PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig cmake -DWITH_PROCPS=OFF -DWITH_SUPERCOP=OFF ..
In the recent version of macOS Monterey and a brew version 3.6.3, this command results in the following error:
-- GMP: /opt/homebrew/lib/libgmp.dylib, /opt/homebrew/include
CMake Error at /opt/homebrew/Cellar/cmake/3.24.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.24.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/opt/homebrew/Cellar/cmake/3.24.2/share/cmake/Modules/FindOpenSSL.cmake:599 (find_package_handle_standard_args)
depends/libff/CMakeLists.txt:115 (find_package)
It can be handled by the following commands:
$ brew upgrade openssl
$ brew link --force openssl
$ pkg-config --modversion openssl
I think it will be helpful for the new comings.
I try to build libsnark on macOS High Sierra (Version 10.13) with:
cmake -DWITH_PROCPS=OFF ..
and I get the following error:
It seems that pkg-config can't find openssl. I tried to symlink the library as suggested here #86:
I searched and tried a lot how to make it work without any results. Any advice ?
Openssl info:
$ brew info openssl
Thanks in advanced.
EDIT
I also had to install pkg-config:
brew install pkg-config
It would be nice to be added as instruction under Building on Mac OS X section