build fails - NSPR

Kevin Smith ksmith at
Sun Feb 7 15:11:01 EST 2010

I'm guessing, based on your errors, that NSPR isn't getting built with the proper arch. You can force this by editing line 13 in riak/apps/erlang_js/c_src/Makefile from this:

	@cd deps/nspr_release;../mozilla/nsprpub/configure --disable-debug --enable-optimize;make

to this:
	@cd deps/nspr_release;../mozilla/nsprpub/configure --disable-debug --enable-optimize --enable-64bit;make

This will force a 64bit compile of nspr. You can test out the build by issuing 'make realclean;make test' from within the erlang_js directory. This will save you from running the entire Riak build to verify the fix. If it fails, please send me the output of the build.

On Feb 7, 2010, at 11:07 AM, W-Mark Kubacki wrote:

> Hi Kevin.
> My system is 64bit, amd64 architecture with 64bit Erlang. It is Gentoo, btw.
> By the means of my package manager I could get NSPR and Spidermonkey
> installed (including headers), so we can resort to this if you think
> this would make the process easier.
> -- 
> Mark
> 2010/2/7 Kevin Smith <ksmith at>:
>> Mark -
>> The failing component in your build is a subsystem of Riak named erlang_js. Since we support Riak on multiple platforms, some of which do not have package management, we made the decision to automate the checkout and build Spidermonkey and nspr to simplify using Riak.
>> However, simplifying does not mean that it works at all times for all people (if only that were the case!) Most of the problems we're seeing relate to disagreement between Spidermonkey, nspr, and Erlang on the 32/64 bit nature of the build computer. Your build errors seem to indicate this is what's happening to you, too.
>> Can you answer the following questions so I can help you get Riak built and running?
>> 1) What CPU architecture are you compiling on? Normally this is x86-64 or i386.
>> 2) Are you running a 64-bit operating system?
>> 3) Do you have a 32 or 64 bit Erlang install? You can find this out by starting an Erlang shell and looking at the info line it prints out. For example, mine looks like this:
>> Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
>> --Kevin

More information about the riak-users mailing list