happstack-server, Mac OS X, cryptopp

82 views
Skip to first unread message

Antoine Latter

unread,
Jan 25, 2012, 10:33:52 PM1/25/12
to ha...@googlegroups.com
Hi Happstack,

When trying to install the new version of 'happstack-server' I get the error:

cabal: Missing dependency on a foreign library:
* Missing C library: cryptopp

I'm running on Mac OS X 10.6.

Has anyone gotten this sort of thing working in the past?

I don't mind going without - I'm not going to be doing payment
processing on my laptop.

Thanks,
Antoine

carter

unread,
Feb 8, 2012, 11:22:25 AM2/8/12
to ha...@googlegroups.com
I've encountered the same problem. Now, in principal you could eg do "brew install cryptopp", however it only generates the static lib, and it seems that the shared lib is whats needed

dag.od...@gmail.com

unread,
Jan 27, 2012, 7:28:57 AM1/27/12
to ha...@googlegroups.com
On 26 January 2012 04:33, Antoine Latter <asla...@gmail.com> wrote:
> Hi Happstack,
>
> When trying to install the new version of 'happstack-server' I get the error:
>
> cabal: Missing dependency on a foreign library:
> * Missing C library: cryptopp

It is needed for the new HTTPS support.

> I'm running on Mac OS X 10.6.
>
> Has anyone gotten this sort of thing working in the past?
>
> I don't mind going without - I'm not going to be doing payment
> processing on my laptop.

cabal install happstack-server -f-https

Antoine Latter

unread,
Feb 8, 2012, 11:33:32 AM2/8/12
to ha...@googlegroups.com

That works, and is what I do, but frequently I'm installing something
that pulls in happstack-server as a dependency, and then I get
surprised by build failures.

Antoine

Jeremy Shaw

unread,
Feb 8, 2012, 11:46:36 AM2/8/12
to ha...@googlegroups.com
I just submitted a proposal that we move the SSL code into  a separate library, happstack-server-ssl. That would effectively solve this problem.

apps/libraries that don't require SSL would depend on happstack-server. And apps/libraries that need SSL would also depend on happstack-server-ssl. There would be no special cabal flags that you need to enable/disable.

- jeremy

Jeremy Shaw

unread,
Feb 8, 2012, 11:56:01 AM2/8/12
to ha...@googlegroups.com
I just saw this thread on stackoverflow which presents a possible solution for when you really do want SSL on OS X:


I have not tried it myself yet.

- jeremy



--
You received this message because you are subscribed to the Google Groups "HAppS" group.
To post to this group, send email to ha...@googlegroups.com.
To unsubscribe from this group, send email to happs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/happs?hl=en.


Carter Schonwald

unread,
Feb 8, 2012, 11:23:42 PM2/8/12
to ha...@googlegroups.com
the solution that generated the dylib seems to work!
-Carter

Jeremy Shaw

unread,
Mar 5, 2012, 12:03:41 PM3/5/12
to ha...@googlegroups.com
Hello,

I changed the happstack-server-tls.cabal so that it now says:


    if !os(darwin)
        Extra-Libraries: cryptopp

And now things seem to build out of the box on OS X. I did not have to do anything special using dylib, etc.

I uploaded happstack-server-tls-6.0.2 to hackage. Is it working now for everyone else?

I tested on OS X Lion, with the latest xcode, and Haskell Platform 2011.4. I did have to modify HsOpenSSL because it tries to import ForeignPtr.ForeignPtr.Unsafe  which does not exist in HP 2011.4. But happstack-server-tls itself installed fine. I am going to file a bug report against HsOpenSSL.

- jeremy

On Wed, Jan 25, 2012 at 9:33 PM, Antoine Latter <asla...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages