You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Dave Cottlehuber <da...@muse.net.nz> on 2012/03/25 01:16:53 UTC

Mac homebrew users

Hi folks,

A while ago Filipe found & documented[1] an issue with Apple's OpenSSL
implementation that causes segfaults and bus errors when running with
Erlang. This was pre-Lion but some of us are still having trouble with
it.

I've been working on improving the Homebrew recipe to accommodate this
as well as the option to install CouchDB development branch directly.

Unfortunately I haven't got it all working but the code is here [2]
and it would be great if somebody has a go at this & lets me know
what's missing.

brew update
brew remove --force erlang nspr openssl couchdb spidermonkey
## apply patch from [2]
brew install -v --64-bit openssl
brew install spidermonkey
brew install erlang
brew install --devel couchdb
A+
Dave

[1]: https://gist.github.com/1199903
[2]: https://gist.github.com/2147079

Re: Mac homebrew users

Posted by Dave Cottlehuber <da...@muse.net.nz>.
On 26 March 2012 01:31, Dave Cottlehuber <da...@muse.net.nz> wrote:
> On 25 March 2012 09:32, Paul Davis <pa...@gmail.com> wrote:
>> I've not looked into this thoroughly but has anyone thought to try
>> patching Erlang to use the newer openssl?
>
> No, and I'm pretty sure I'll come back scarred (but a better
> programmer) if I did tho.
>
> I have this working now on Lion, https://gist.github.com/2147079 with
> updated patch
> & instructions.
>
> Relax (YMMV).
> A+
> Dave

Hi everybody,

TL;DR:
New couch & openssl recipes submitted to homebrew & gist[1],
also on my fork[2].
Assuming these are accepted, you'll need to:

# cleanup
brew update
brew remove --force openssl erlang couchdb icu4c spidermonkey nspr

# install pre-reqs
brew install icu4c openssl

# ensure we build against the new keg-only versions
brew link icu4c openssl
brew install erlang --no-docs
brew install couchdb [--devel]

#optional --devel will track 1.2.x vs 1.1.1 by default

And hopefully use 1.2.0 as default very soon too!

TL:
After more testing using a script[3] from davisp, I can see that the new
recipe is significantly more stable *but* still occasionally crashes -
around 1 time in 1.5 hours of heavy testing, and that it's not related
to the openssl version used as I can use 1.0.1 just as effectively.

Benoît and & have been using the OpenSSL 1.0.0x series for a while
in the windows & refuge build for some time now, so I've sent a pull
request to homebrew to accommodate this instead, with automatic
detection of using 64 bit or 32 bit builds as required by your platform.

This seems stable enough for my dev needs but feel free to dig further.

Should I raise this on erlang-bugs maybe as well?

[1]: https://gist.github.com/2147079
[2]: https://github.com/dch/homebrew/tree/couchdb
[3]: https://gist.github.com/2219748

A+
Dave

Re: Mac homebrew users

Posted by Dave Cottlehuber <da...@muse.net.nz>.
On 25 March 2012 09:32, Paul Davis <pa...@gmail.com> wrote:
> I've not looked into this thoroughly but has anyone thought to try
> patching Erlang to use the newer openssl?

No, and I'm pretty sure I'll come back scarred (but a better
programmer) if I did tho.

I have this working now on Lion, https://gist.github.com/2147079 with
updated patch
& instructions.

Relax (YMMV).
A+
Dave

Re: Mac homebrew users

Posted by Paul Davis <pa...@gmail.com>.
I've not looked into this thoroughly but has anyone thought to try
patching Erlang to use the newer openssl?

On Sat, Mar 24, 2012 at 10:45 PM, Benoit Chesneau <bc...@gmail.com> wrote:
> On Sun, Mar 25, 2012 at 1:16 AM, Dave Cottlehuber <da...@muse.net.nz> wrote:
>> Hi folks,
>>
>> A while ago Filipe found & documented[1] an issue with Apple's OpenSSL
>> implementation that causes segfaults and bus errors when running with
>> Erlang. This was pre-Lion but some of us are still having trouble with
>> it.
>
> It is not pre-lion. Lion introduced this change.
>
>>
>> I've been working on improving the Homebrew recipe to accommodate this
>> as well as the option to install CouchDB development branch directly.
>>
>> Unfortunately I haven't got it all working but the code is here [2]
>> and it would be great if somebody has a go at this & lets me know
>> what's missing.
>>
>> brew update
>> brew remove --force erlang nspr openssl couchdb spidermonkey
>> ## apply patch from [2]
>> brew install -v --64-bit openssl
>> brew install spidermonkey
>> brew install erlang
>> brew install --devel couchdb
>> A+
>> Dave
>>
>> [1]: https://gist.github.com/1199903
>> [2]: https://gist.github.com/2147079
>
> Thanks! Tough it would be better imo if openssl is detecting the
> platform, so erlang could use the same imo :)
>
> - benoît

Re: Mac homebrew users

Posted by Benoit Chesneau <bc...@gmail.com>.
On Sun, Mar 25, 2012 at 1:16 AM, Dave Cottlehuber <da...@muse.net.nz> wrote:
> Hi folks,
>
> A while ago Filipe found & documented[1] an issue with Apple's OpenSSL
> implementation that causes segfaults and bus errors when running with
> Erlang. This was pre-Lion but some of us are still having trouble with
> it.

It is not pre-lion. Lion introduced this change.

>
> I've been working on improving the Homebrew recipe to accommodate this
> as well as the option to install CouchDB development branch directly.
>
> Unfortunately I haven't got it all working but the code is here [2]
> and it would be great if somebody has a go at this & lets me know
> what's missing.
>
> brew update
> brew remove --force erlang nspr openssl couchdb spidermonkey
> ## apply patch from [2]
> brew install -v --64-bit openssl
> brew install spidermonkey
> brew install erlang
> brew install --devel couchdb
> A+
> Dave
>
> [1]: https://gist.github.com/1199903
> [2]: https://gist.github.com/2147079

Thanks! Tough it would be better imo if openssl is detecting the
platform, so erlang could use the same imo :)

- benoît