Hi,

On Tue, Mar 15, 2016 at 10:13 PM,  <ramyasivanesa...@gmail.com> wrote:
> Hi,
>  I have been trying to cross compile NSS 3.21 for MIPS-Linux platform, but am 
> facing a lot of build issues. First I built nspr with mipsel toolchain and it 
> compiled without any errors.
>  While compiling NSS , I am getting the following error :
>
> {standard input}: Assembler messages:
> {standard input}:79: Error: unrecognized opcode `bswap $2'
> make[3]: *** 
> [mipsel-linux3.13_x86_glibc_PTH_DBG.OBJ/mipsel-linux_SINGLE_SHLIB/sha_fast.o] 
> Error 1
>
>  Hence, I would like to know whether cross-compilation of NSS is supported 
> for MIPS. If so, kindly give the links of the documentation.

Yes, cross-compilation of NSS is supported for Linux MIPS. The
procedure is tedious, requiring setting several makefile variables to
appropriate values, and is not documented on the NSS website.

The best source of information is the build scripts for the NSS
packages in Linux distributions such as Debian, Fedora, and Gentoo,
and a makefile in Firefox.

Here is the Firefox makefile that compiles NSS. Search for
"CROSS_COMPILE" in that makefile, and you will see which NSS makefile
variables need to be set:

http://mxr.mozilla.org/mozilla-central/source/config/external/nss/Makefile.in#187

It may be worthwhile to cross-compile Firefox for MIPS and inspect the
build log file for the command line. I think that would be easier than
trying to parse that makefile.

>  Also, after some modifications, I was able to build NSS, but while running I 
> am getting errors related to database. Error log is as follows :
>
>  Error initializing NSS without a persistent database: NSS error code: -5925
>
>  So, how shall I proceed to rectify this error?

Error code -5925 is PR_CALL_ONCE_ERROR:

http://mxr.mozilla.org/nspr/source/pr/include/prerr.h

That narrows down the failure to a small number of locations:
http://mxr.mozilla.org/nss/search?string=PR_CallOnce

Look at the PR_CallOnce calls in lib/freebl, especially
lib/freebl/loader.c. I suspect the dlopen() call of libfreebl3.so
failed because it could not find libfreebl3.so. I suggest you
investigate in that direction.

By the way, are you using a MIPS development board such as Creator
Ci20 that I can easily buy to reproduce your problem?

Wan-Teh Chang
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to