riak 0.8 fails to build on x86_64 looking for missing stubs-32.h because -m32

Dan Reverri reverri at gmail.com
Mon Feb 8 12:14:02 EST 2010


Hi Jason,

This looks very similar to a compile error Kevin commented on earlier
and I wanted to make sure you saw the proposed solution for that
issue:

"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 Sun, Feb 7, 2010 at 12:35 PM,  <jason at topsy.com> wrote:
> ----- Original Message -----
> From: "Kevin Smith" <ksmith at basho.com>
> To: jason at topsy.com
> Cc: riak-users at lists.basho.com
> Sent: Sunday, February 7, 2010 6:02:00 AM GMT -08:00 US/Canada Pacific
> Subject: Re: riak 0.8 fails to build on x86_64 looking for missing stubs-32.h because -m32
>
> Even though you're compiling on x86-64, nspr still needs some of the development headers from libc. On most distros this is a package named something like libc6-dev-i386 (Ubuntu) or libc6-devel (Red Hat flavors, I think). Installing the missing package should get you past this compile error.
>
> --Kevin
> On Feb 7, 2010, at 1:50 AM, jason at topsy.com wrote:
>
>> Does Riak have some need to be built with -m32?
>>
>> make[2]: Entering directory `/home/jason/src/riak/apps/erlang_js/c_src/deps/nspr_release'
>> cd config; make -j1 export
>> make[3]: Entering directory `/home/jason/src/riak/apps/erlang_js/c_src/deps/nspr_release/config'
>> gcc -m32 -o now.o -c      -Wall -O2 -fPIC  -UDEBUG  -DNDEBUG=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1 -D_GNU_SOURCE=1 -DHAVE_FCNTL_FILE_LOCKING=1 -DLINUX=1 -Di386=1 -D_REENTRANT=1  -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM   ../../mozilla/nsprpub/config/now.c
>> In file included from /usr/include/features.h:354,
>>                 from /usr/include/stdio.h:28,
>>                 from ../../mozilla/nsprpub/config/now.c:38:
>> /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
>>
>> Thanks,
>> - Jason T.
>>
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
> I installed libc6-dev-i386 and encountered more failure because libnpsr4.so is 32-bit and cannot link with 64-bit.
>
> ld -shared  -o Linux_All_OPT.OBJ/libjs.so Linux_All_OPT.OBJ/jsapi.o Linux_All_OPT.OBJ/jsarena.o Linux_All_OPT.OBJ/jsarray.o Linux_All_OPT.OBJ/jsatom.o Linux_All_OPT.OBJ/jsbool.o Linux_All_OPT.OBJ/jscntxt.o Linux_All_OPT.OBJ/jsdate.o Linux_All_OPT.OBJ/jsdbgapi.o Linux_All_OPT.OBJ/jsdhash.o Linux_All_OPT.OBJ/jsdtoa.o Linux_All_OPT.OBJ/jsemit.o Linux_All_OPT.OBJ/jsexn.o Linux_All_OPT.OBJ/jsfun.o Linux_All_OPT.OBJ/jsgc.o Linux_All_OPT.OBJ/jshash.o Linux_All_OPT.OBJ/jsinterp.o Linux_All_OPT.OBJ/jsinvoke.o Linux_All_OPT.OBJ/jsiter.o Linux_All_OPT.OBJ/jslock.o Linux_All_OPT.OBJ/jslog2.o Linux_All_OPT.OBJ/jslong.o Linux_All_OPT.OBJ/jsmath.o Linux_All_OPT.OBJ/jsnum.o Linux_All_OPT.OBJ/jsobj.o Linux_All_OPT.OBJ/jsopcode.o Linux_All_OPT.OBJ/jsparse.o Linux_All_OPT.OBJ/jsprf.o Linux_All_OPT.OBJ/jsregexp.o Linux_All_OPT.OBJ/jsscan.o Linux_All_OPT.OBJ/jsscope.o Linux_All_OPT.OBJ/jsscript.o Linux_All_OPT.OBJ/jsstr.o Linux_All_OPT.OBJ/jsutil.o Linux_All_OPT.OBJ/jsxdrapi.o Linux_All_OPT.OBJ/jsxml.o Linux_All_OPT.OBJ/prmjtime.o   -lm -L../../nspr_release/dist/lib -lnspr4
> ld: skipping incompatible ../../nspr_release/dist/lib/libnspr4.so when searching for -lnspr4
> ld: skipping incompatible ../../nspr_release/dist/lib/libnspr4.a when searching for -lnspr4
> ld: cannot find -lnspr4
> make[3]: *** [Linux_All_OPT.OBJ/libjs.so] Error 1
>
> $ file apps/erlang_js/c_src/deps/nspr_release/dist/lib/libnspr4.so
> apps/erlang_js/c_src/deps/nspr_release/dist/lib/libnspr4.so: symbolic link to `../../pr/src/./libnspr4.so'
> $ file apps/erlang_js/c_src/deps/nspr_release/pr/src/libnspr4.so
> apps/erlang_js/c_src/deps/nspr_release/pr/src/libnspr4.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
>
> Thanks,
> Jason T.
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>



More information about the riak-users mailing list