Description
Hi, I'm having trouble installing HsOpenSSL
. I'm getting the following error:
maximiliantagher@Maximilians-MBP ~/D/M/h/mercury-web-backend> stack install HsOpenSSL
HsOpenSSL-0.11.4.11: configure
-- While building custom Setup.hs for package HsOpenSSL-0.11.4.11 using:
/private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/stack19302/HsOpenSSL-0.11.4.11/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 configure --with-ghc=/Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc --with-ghc-pkg=/Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/pkgdb --libdir=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/lib --bindir=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/bin --datadir=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/share --libexecdir=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/libexec --sysconfdir=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/etc --docdir=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/doc/HsOpenSSL-0.11.4.11 --htmldir=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/doc/HsOpenSSL-0.11.4.11 --haddockdir=/Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.14/8.0.2/doc/HsOpenSSL-0.11.4.11 --dependency=Cabal=Cabal-1.24.2.0 --dependency=base=base-4.9.1.0 --dependency=bytestring=bytestring-0.10.8.1 --dependency=network=network-2.6.3.2-IsLM4TXcLoRI0fmmBYVyQz --dependency=time=time-1.6.0.1 -f-fast-bignum
Process exited with code: ExitFailure 1
Logs have been written to: /Users/maximiliantagher/Documents/Mercury/hs/mercury-web-backend/.stack-work/logs/HsOpenSSL-0.11.4.11.log
[1 of 2] Compiling Main ( /private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/stack19302/HsOpenSSL-0.11.4.11/Setup.hs, /private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/stack19302/HsOpenSSL-0.11.4.11/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/Main.o )
[2 of 2] Compiling StackSetupShim ( /Users/maximiliantagher/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/stack19302/HsOpenSSL-0.11.4.11/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/StackSetupShim.o )
Linking /private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/stack19302/HsOpenSSL-0.11.4.11/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/setup ...
Configuring HsOpenSSL-0.11.4.11...
setup: Can't find OpenSSL library,
install it via 'brew install openssl' or 'port install openssl'
or use --extra-include-dirs= and --extra-lib-dirs=
to specify location of installed OpenSSL library.
However, I have run brew install openssl
, and I can confirm that the /usr/local/opt/openssl/
and /usr/local/opt/openssl/lib
directories are present.
Adding these lines to my stack.yaml
file fixes it:
extra-include-dirs:
- /usr/local/opt/openssl/include
extra-lib-dirs:
- /usr/local/opt/openssl/lib
However, I was under the impression that this shouldn't be necessary, because of this commit: b95cea2
OS Version: macOS High Sierra 10.13.2 (17C205) (Latest as of today)
Stack: Version 1.6.0.20171202, Git revision 50090e67c16980bba31349f386d5b018cbcaec31 (5421 commits) x86_64 hpack-0.20.0
LTS Haskell: 9.14
Compiler: 8.0.2 (Unchanged from LTS)
OpenSSL: 1.0.2n (Latest as today)
I had a coworker try it as well, and he had the same issue (Same project as mine, and also on macOS High Sierra)
Tell me if there's anything I can do to help debug this issue!