Comments (17)
In a minor variation, putting these lines in my stack.yaml file worked for me:
extra-include-dirs:
- /usr/local/opt/openssl/include
extra-lib-dirs:
- /usr/local/opt/openssl/lib
from hsopenssl.
I had to do
cabal install
--extra-include-dirs=/usr/local/opt/openssl/include
--extra-lib-dirs=/usr/local/opt/openssl/lib
--reinstall HsOpenSSL
Without extra-lib-dirs
I got linker errors.
from hsopenssl.
I can now install with Tim's suggestion above, i.e.
cabal install hsopenssl --extra-include-dirs=/usr/local/opt/openssl/include
not sure if it will work at runtime
Tim mentions
extra-lib-dirs: /usr/local/opt/openssl/lib in my cabal file. I guess I should add that line to ~/.ghc_/pkg.conf.s/HsOpen_ to make sure it will work at runtime?
from hsopenssl.
I also needed to add --extra-include-dirs=/usr/local/opt/openssl/include
to my cabal install line when building on El Capitan. It would be nice if there was something we could do to HsOpenSSL so this isn't needed.
from hsopenssl.
I installed openssl through homebrew, passed the --extra-include-dirs=/usr/local/opt/openssl/include
argument to cabal install and specifyed extra-lib-dirs: /usr/local/opt/openssl/lib
in my cabal file.
Did anyone find a better way to solve this problem?
from hsopenssl.
Even after specifying the lib/include dirs for openssl (same as @timbodeit above), I'm getting errors I didn't get before. Specifically this code used to be fine:
generateKeys = withOpenSSL $ do
rsa <- generateRSAKey 4096 17 Nothing
prvPem <- writePKCS8PrivateKey rsa Nothing
pubPem <- writePublicKey rsa
x <- newX509
setPublicKey x rsa
cert <- writeX509 x
writeFile "test.x509" cert
c <- readFile "test.x509"
xcert <- readX509 c
return $ PrvPubKey prvPem pubPem
But it now fails with this error (when reading the x509 cert):
(error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding)
A new version of openssl which is no longer compatible with HsOpenSSL... or something I'm doing wrong...?
from hsopenssl.
OS 10.11 is out now. Is there a plan to release something that will address this?
from hsopenssl.
as far as I see, OS X 10.11 includes openssl...
from hsopenssl.
Can you do an install of HsOpenSSL on 10.11? When I try I get
cabal install -j5 hsopenssl
Resolving dependencies...
Configuring HsOpenSSL-0.11.1.1...
Building HsOpenSSL-0.11.1.1...
Failed to install HsOpenSSL-0.11.1.1
Build log ( /Users/gcolpitts/.cabal/logs/HsOpenSSL-0.11.1.1.log ):
Configuring HsOpenSSL-0.11.1.1...
Building HsOpenSSL-0.11.1.1...
Preprocessing library HsOpenSSL-0.11.1.1...
In file included from BN.hsc:45:
cbits/HsOpenSSL.h:3:10: fatal error: 'openssl/asn1.h' file not found
#include <openssl/asn1.h>
^
1 error generated.
compiling dist/build/OpenSSL/BN_hsc_make.c failed (exit code 1)
command was: /usr/bin/gcc -c dist/build/OpenSSL/BN_hsc_make.c -o dist/build/OpenSSL/BN_hsc_make.o -m64 -fno-stack-protector -D__GLASGOW_HASKELL__=710 -Ddarwin_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Ddarwin_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Icbits -D PTHREAD -DCALLCONV=ccall -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/Users/gcolpitts/Library/Haskell/ghc-7.10.2.20151105-x86_64/lib/network-2.6.2.1/include -I/usr/local/lib/ghc-7.10.2.20151105/unix_KZL8h98IqDM57kQSPo1mKx/include -I/usr/local/lib/ghc-7.10.2.20151105/time_FTheb6LSxyX1UABIbBXRfn/include -I/usr/local/lib/ghc-7.10.2.20151105/bytes_6VWy06pWzJq9evDvK2d4w6/include -I/usr/local/lib/ghc-7.10.2.20151105/base_HQfYBxpPvuw8OunzQu6JGM/include -I/usr/local/lib/ghc-7.10.2.20151105/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include -I/usr/local/lib/ghc-7.10.2.20151105/include -I/usr/local/lib/ghc-7.10.2.20151105/include/
cabal: Error: some packages failed to install:
HsOpenSSL-0.11.1.1 failed during the building phase. The exception was:
ExitFailure 1
from hsopenssl.
^ That worked for me as well, after homebrew install openssl
.
from hsopenssl.
You can also put what @pmer suggests in ~/.stack/config.yaml
which means it will be applied to all projects. Disadvantages are that you will need to recompile all extra-deps and local packages in all your projects and that it will clutter up log messages.
I sent an e-mail to the stack mailing list regarding this: https://groups.google.com/forum/#!topic/haskell-stack/nhEuBh2pWVQ
from hsopenssl.
Hi, new HsOpenSSL
maintainer is here! I've added a fix (haskell-cryptography@06f1fb8) and released a new HsOpenSSL version on Hackage. Could you check whether it works for you?
from hsopenssl.
Hi
I see no change, I still have to add the extra args that idontgetoutmuch
mentioned:
bash-3.2$ cabal install hsopenssl
cabal install hsopenssl
Resolving dependencies...
Configuring HsOpenSSL-0.11.1.1...
Failed to install HsOpenSSL-0.11.1.1
Build log ( /Users/gcolpitts/.cabal/logs/HsOpenSSL-0.11.1.1.log ):
cabal: Entering directory
'/var/folders/9b/rh4y2gy92hgdb6ktv4df1jv00000gn/T/cabal-tmp-78340/HsOpenSSL-0.11.1.1'
Configuring HsOpenSSL-0.11.1.1...
cabal: Missing dependencies on foreign libraries:
- Missing C libraries: crypto, ssl
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal: Leaving directory
'/var/folders/9b/rh4y2gy92hgdb6ktv4df1jv00000gn/T/cabal-tmp-78340/HsOpenSSL-0.11.1.1'
cabal: Error: some packages failed to install:
HsOpenSSL-0.11.1.1 failed during the configure step. The exception was:
ExitFailure 1
bash-3.2$ cabal install hsopenssl
--extra-include-dirs=/usr/local/opt/openssl/include
cabal install hsopenssl --extra-include-dirs=/usr/local/opt/openssl/include
Resolving dependencies...
Configuring HsOpenSSL-0.11.1.1...
Failed to install HsOpenSSL-0.11.1.1
Build log ( /Users/gcolpitts/.cabal/logs/HsOpenSSL-0.11.1.1.log ):
cabal: Entering directory
'/var/folders/9b/rh4y2gy92hgdb6ktv4df1jv00000gn/T/cabal-tmp-78737/HsOpenSSL-0.11.1.1'
Configuring HsOpenSSL-0.11.1.1...
cabal: Missing dependencies on foreign libraries: - Missing C libraries: crypto, ssl
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal: Leaving directory
'/var/folders/9b/rh4y2gy92hgdb6ktv4df1jv00000gn/T/cabal-tmp-78737/HsOpenSSL-0.11.1.1'
cabal: Error: some packages failed to install:
HsOpenSSL-0.11.1.1 failed during the configure step. The exception was:
ExitFailure 1
bash-3.2$ cabal install --extra-include-dirs=/usr/local/opt/openssl/include
--extra-lib-dirs=/usr/local/opt/openssl/lib --reinstall HsOpenSSL
cabal install --extra-include-dirs=/usr/local/opt/openssl/include
--extra-lib-dirs=/usr/local/opt/openssl/lib --reinstall HsOpenSSL
Resolving dependencies...
Configuring HsOpenSSL-0.11.1.1...
Building HsOpenSSL-0.11.1.1...
Installed HsOpenSSL-0.11.1.1
Updating documentation index
/Users/gcolpitts/Library/Haskell/share/doc/x86_64-osx-ghc-8.0.1/index.html
bash-3.2$
On Tue, Oct 4, 2016 at 7:30 PM Vladimir Shabanov [email protected]
wrote:
Hi, new HsOpenSSL maintainer is here! I've added a fix (vshabanov@06f1fb8
haskell-cryptography@06f1fb8)
and released a new HsOpenSSL version on Hackage. Could you check whether it
works for you?—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#41 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGCE-_3uCqu2nVZ-AEOC1TYRv4U73pO9ks5qwtOVgaJpZM4FJPtR
.
from hsopenssl.
Please run cabal update
first. You're building old version of HsOpenSSL.
from hsopenssl.
I've added more complex fix haskell-cryptography@b95cea2 which automatically detects Homebrew or MacPorts versions of OpenSSL.
Previous approach caused ld: warning 'directory not found'
, wasn't informative when OpenSSL is not installed and could potentially prevent linking with OpenSSL from another source.
from hsopenssl.
It builds fine for me! Any particular tests you'd like us to run?
from hsopenssl.
Great work! Sorry I forgot to run cabal update the first time.
All the latest versions I've tried work:
$ cabal install hsopenssl
Resolving dependencies...
Downloading HsOpenSSL-0.11.2.2...
Configuring HsOpenSSL-0.11.2.2...
Building HsOpenSSL-0.11.2.2...
Installed HsOpenSSL-0.11.2.2
Updating documentation index
/Users/gcolpitts/Library/Haskell/share/doc/x86_64-osx-ghc-8.0.1/index.html
bash-3.2$ cabal update
Downloading the latest package list from hackage.haskell.org
bash-3.2$ cabal install hsopenssl
Resolving dependencies...
Downloading HsOpenSSL-0.11.2.4...
Configuring HsOpenSSL-0.11.2.4...
Building HsOpenSSL-0.11.2.4...
Installed HsOpenSSL-0.11.2.4
Updating documentation index
/Users/gcolpitts/Library/Haskell/share/doc/x86_64-osx-ghc-8.0.1/index.html
On Wed, Oct 5, 2016 at 10:29 PM Vladimir Shabanov [email protected]
wrote:
I've added more complex fix vshabanov@b95cea2
haskell-cryptography@b95cea2
which automatically detects Homebrew or MacPorts versions of OpenSSL.Previous approach caused ld: warning 'directory not found', wasn't
informative when OpenSSL is not installed and could potentially prevent
linking with OpenSSL from another source.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#41 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGCE-183TmAJ4p25xTwBJXiZeftG3ngDks5qxE8FgaJpZM4FJPtR
.
from hsopenssl.
Related Issues (20)
- Support typechecking initialization HOT 8
- cipher result different from M2Crypto and command line? HOT 3
- Server: thread blocked indefinitely in an MVar operation HOT 1
- Add SSL_CTX_set_options function HOT 1
- Add support for new `time-1.5` release HOT 1
- Add support for `integer-gmp-1.0.0` HOT 2
- HsOpenSSL 0.11.1 build fails on Travis CI HOT 2
- Not in scope: data constructor ‘J#’ HOT 3
- Relax upper bound to allow `time-1.6` HOT 1
- Linker error: multiple definition in OpenSSL.Objects HOT 2
- RSA decryption HOT 1
- A way to manually enable/disable padding for block ciphers HOT 1
- No digest functions found
- Setting CA certificate with `contextSetCAFile` HOT 1
- HUnit 1.3 support HOT 3
- Doesn't build on OSX (10.11.5) HOT 1
- Add support for hostname validation HOT 2
- Detect and handle partial writes HOT 1
- Expose internal OpenSSL pointers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hsopenssl.