hi, 
Thanks for your help.
For the two different patches, your patch still gets the same error; the other 
patch gets better result(nspr compilation passed), but another error appears 
("cl: command not found"), I don't know why the the compilation before this 
error uses gcc to compile, but why here "cl" is used for compilation.

I also tried the "mozilla-build" together with MS VC, and the compilation 
passed.

Best Regards,
Weizhong

/***************************/
package:
https://bug748217.bugzilla.mozilla.org/attachment.cgi?id=617774

I still get the same error:
Result:
........
gcc -mwindows -shared -Wl,--export-all-symbols -Wl,--out-implib 
-Wl,./libnspr4.a  -o libnspr4.dll ./prvrsion.o io/./prfdcach.o io/./prmwait.o 
io/./prmapopt.o io/./priometh.o io/./pripv6.o io/./prlayer.o io/./prlog.o 
io/./prmmap.o io/./prpolevt.o io/./prprf.o io/./prscanf.o io/./prstdio.o 
threads/./prcmon.o threads/./prrwlock.o threads/./prtpd.o linking/./prlink.o 
malloc/./prmalloc.o malloc/./prmem.o md/./prosdep.o memory/./prshm.o 
memory/./prshma.o memory/./prseg.o misc/./pralarm.o misc/./pratom.o 
misc/./prcountr.o misc/./prdtoa.o misc/./prenv.o misc/./prerr.o 
misc/./prerror.o misc/./prerrortable.o misc/./prinit.o misc/./prinrval.o 
misc/./pripc.o misc/./prlog2.o misc/./prlong.o misc/./prnetdb.o misc/./praton.o 
misc/./prolock.o misc/./prrng.o misc/./prsystem.o misc/./prthinfo.o 
misc/./prtpool.o misc/./prtrace.o misc/./prtime.o io/./prdir.o io/./prfile.o 
io/./prio.o io/./prsocket.o misc/./pripcsem.o threads/./prcthr.o 
threads/./prdump.o threads/./prmon.o threads/./prsem.o threa
 ds/combined/./prucpu.o threads/combined/./prucv.o threads/combined/./prulock.o 
threads/combined/./prustack.o threads/combined/./pruthr.o md/windows/./ntmisc.o 
md/windows/./ntsec.o md/windows/./ntsem.o md/windows/./ntinrval.o 
md/windows/./ntgc.o md/windows/./ntio.o md/windows/./ntthread.o 
md/windows/./ntdllmn.o md/windows/./win32_errors.o md/windows/./w32ipcsem.o 
md/windows/./w32poll.o md/windows/./w32rng.o md/windows/./w32shm.o  ./nspr.res  
 -ladvapi32 -lwsock32 -lwinmm
Creating library file: ./libnspr4.athreads/./prtpd.o: In function 
`PR_NewThreadPrivateIndex':

C:\MinGW4nss\msys\1.0\home\arc\nss-3.13.6_617774\mozilla\nsprpub\WINNT6.1_DBG.OBJ\pr\src\threads/../../../../pr/src/threads/prtpd.c:108:
 undefined reference to `_InterlockedIncrement'

misc/./prinit.o: In function `PR_CallOnce':

C:\MinGW4nss\msys\1.0\home\arc\nss-3.13.6_617774\mozilla\nsprpub\WINNT6.1_DBG.OBJ\pr\src\misc/../../../../pr/src/misc/prinit.c:774:
 undefined reference to `_InterlockedExchange'

misc/./prinit.o: In function `PR_CallOnceWithArg':

C:\MinGW4nss\msys\1.0\home\arc\nss-3.13.6_617774\mozilla\nsprpub\WINNT6.1_DBG.OBJ\pr\src\misc/../../../../pr/src/misc/prinit.c:803:
 undefined reference to `_InterlockedExchange'

threads/combined/./pruthr.o: In function `PR_CreateThread':

C:\MinGW4nss\msys\1.0\home\arc\nss-3.13.6_617774\mozilla\nsprpub\WINNT6.1_DBG.OBJ\pr\src\threads\combined/../../../../../pr/src/threads/combined/pruthr.c:1137:
 undefined reference to `_InterlockedIncrement'

C:\MinGW4nss\msys\1.0\home\arc\nss-3.13.6_617774\mozilla\nsprpub\WINNT6.1_DBG.OBJ\pr\src\threads\combined/../../../../../pr/src/threads/combined/pruthr.c:1139:
 undefined reference to `_InterlockedIncrement

'

collect2: ld returned 1 exit status

make[4]: *** [libnspr4.dll] Error 1
make[4]: Leaving directory 
`/home/arc/nss-3.13.6_617774/mozilla/nsprpub/WINNT6.1_DBG.OBJ/pr/src'
make[3]: *** [export] Error 2
make[3]: Leaving directory 
`/home/arc/nss-3.13.6_617774/mozilla/nsprpub/WINNT6.1_DBG.OBJ/pr/src'
make[2]: *** [export] Error 2
make[2]: Leaving directory 
`/home/arc/nss-3.13.6_617774/mozilla/nsprpub/WINNT6.1_DBG.OBJ/pr'
make[1]: *** [export] Error 2
make[1]: Leaving directory 
`/home/arc/nss-3.13.6_617774/mozilla/nsprpub/WINNT6.1_DBG.OBJ'
make: *** [build_nspr] Error 2


/*******************************/

package from this links:
https://bugzilla.mozilla.org/show_bug.cgi?id=779649

Better Result, but not :
.........
cd src; make libs
make[2]: Entering directory `/home/arc/nss-3.13.6/mozilla/security/dbm/src'
cl -FoWINNT6.1_DBG.OBJ/db.obj -c -Zi -FdWINNT6.1_DBG.OBJ/ -Od -W3 -nologo 
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -MD -we4002 -we4003 
-we4004 -we4006 -we4009 -we4013 -we4015 -we4028 -we4033 -we4035 -we4045 -we4047 
-we4053 -we4054 -we4063 -we4064 -we4078 -we4087 -we4098 -we4390 -we4551 -we4553 
-we4715 -GT -DXP_PC -DDEBUG -D_DEBUG -UNDEBUG -DDEBUG_arc -DWIN32 -D_X86_ 
-D_WINDOWS -DWINNT -DUSE_UTIL_DIRECTLY -DSTDC_HEADERS -DHAVE_STRERROR 
-DHAVE_SNPRINTF -DMEMMOVE -D__DBINTERFACE_PRIVATE  
-I../../../dist/WINNT6.1_DBG.OBJ/include -I../../../dist/public/dbm 
-I../../../dist/private/dbm -I../../../dbm/include  
"/home/arc/nss-3.13.6/mozilla/security/dbm/src/../../../dbm/src/db.c"
/bin/sh: cl: command not found
make[2]: *** [WINNT6.1_DBG.OBJ/db.obj] Error 127
make[2]: Leaving directory `/home/arc/nss-3.13.6/mozilla/security/dbm/src'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/home/arc/nss-3.13.6/mozilla/security/dbm'
make: *** [build_dbm] Error 2




On Sep 14, 2012, at 6:13 PM, Robert Story wrote:

> On Fri, 14 Sep 2012 13:37:35 +0200 weizhong wrote:
> WQ> hi all,
> WQ> Since I need to call nss API inside the software (a middleware which is
> WQ> supposed to generally run on Win/Linux/MacOS) which I am developing, I
> WQ> have to compile nss under MinGW. But I always get the "undefined
> WQ> reference" error, when I run "make nss_build_all" under
> WQ> mozilla/security/nss. I have tried the different versions of MinGW as
> WQ> well as the versions of nss source, but still all can not get compiled.
> WQ> The following is the log. Thanks a lot for your instruction.
> WQ> [snip]
> WQ> ....................
> WQ> undefined reference to `_InterlockedIncrement ' collect2: ld returned 1
> 
> There are 2 bugs related to this:
> 
>  https://bugzilla.mozilla.org/show_bug.cgi?id=779649
>  https://bugzilla.mozilla.org/show_bug.cgi?id=622989
> 
> I ran into it as well, and have a proposed patch.. can you try it and see
> if it helps your case?
> 
>  https://bugzilla.mozilla.org/show_bug.cgi?id=748217
> 
> 
> Robert
> 
> --
> Senior Software Engineer
> SPARTA, Inc., a Parsons Company

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

Reply via email to