build with --enable-user-pthreads or --enable-nspr-threads fail
Frederic Bastien <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.nspr |
|---|---|
| Message-ID | <[email protected]> |
Hi, I need to compile NSPR without pthread. This is to make it run under condor who don't support pthread. In fact, I could use NSPR without any thread if that is possible as my own program don't use them. I have tested it with many 4.6.* version and the 4.7 version of nspr. They all fail. With the 4.7 version, if I compile with: $./configure --enable-user-pthreads;make clean;make or $./configure --without-pthreads;make clean;make I get the same error: gcc -m32 -o prlog.o -c -fvisibility=hidden -pipe -Wall -g -fno-inline -fPIC -UNDEBUG -DDEBUG_bastienf -DDEBUG=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 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1 -DFORCE_PR_LOG -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM -D_NSPR_BUILD_ -I../../../dist/include/nspr -I../../../pr/include -I../../../pr/include/private prlog.c prlog.c: In function ‘PR_LogPrint’: prlog.c:488: warning: implicit declaration of function ‘_MD_CURRENT_THREAD’ prlog.c:488: warning: initialization makes pointer from integer without a cast prlog.c:488: warning: implicit declaration of function ‘_MD_GET_INTSOFF’ prlog.c:488: warning: implicit declaration of function ‘_MD_SET_INTSOFF’ prlog.c:503: warning: comparison between pointer and integer prlog.c:503: warning: implicit declaration of function ‘_MD_CURRENT_CPU’ prlog.c:503: error: invalid type argument of ‘->’ prlog.c:503: warning: passing argument 1 of ‘_PR_IntsOn’ makes pointer from integer without a cast prlog.c:511: warning: initialization makes pointer from integer without a cast prlog.c:524: warning: comparison between pointer and integer prlog.c:524: error: invalid type argument of ‘->’ prlog.c:524: warning: passing argument 1 of ‘_PR_IntsOn’ makes pointer from integer without a cast prlog.c: In function ‘PR_LogFlush’: prlog.c:532: warning: initialization makes pointer from integer without a cast prlog.c:537: warning: comparison between pointer and integer prlog.c:537: error: invalid type argument of ‘->’ prlog.c:537: warning: passing argument 1 of ‘_PR_IntsOn’ makes pointer from integer without a cast make[3]: *** [prlog.o] Error 1 make[3]: Leaving directory `/u/bastienf/lisa/nspr-4.7/mozilla/nsprpub/pr/src/io' make[2]: *** [export] Error 2 make[2]: Leaving directory `/u/bastienf/lisa/nspr-4.7/mozilla/nsprpub/pr/src' make[1]: *** [export] Error 2 make[1]: Leaving directory `/u/bastienf/lisa/nspr-4.7/mozilla/nsprpub/pr' make: *** [export] Error 2 If I compile with nspr threads I get: $./configure --enable-nspr-threads;make clean;make uxpoll.c:412: warning: implicit declaration of function ‘__select’ gcc -m32 -o linux.o -c -fvisibility=hidden -pipe -Wall -g -fno-inline -fPIC -UNDEBUG -DDEBUG_bastienf -DDEBUG=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 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1 -D_PR_LOCAL_THREADS_ONLY=1 -DFORCE_PR_LOG -D_NSPR_BUILD_ -I../../../../dist/include/nspr -I../../../../pr/include -I../../../../pr/include/private linux.c linux.c: In function ‘_MD_InitializeThread’: linux.c:82: error: ‘JB_SP’ undeclared (first use in this function) linux.c:82: error: (Each undeclared identifier is reported only once linux.c:82: error: for each function it appears in.) linux.c:83: error: ‘JB_BP’ undeclared (first use in this function) make[4]: *** [linux.o] Error 1 make[4]: Leaving directory `/u/bastienf/lisa/nspr-4.7/mozilla/nsprpub/pr/src/md/unix' make[3]: *** [export] Error 2 make[3]: Leaving directory `/u/bastienf/lisa/nspr-4.7/mozilla/nsprpub/pr/src/md' make[2]: *** [export] Error 2 make[2]: Leaving directory `/u/bastienf/lisa/nspr-4.7/mozilla/nsprpub/pr/src' make[1]: *** [export] Error 2 make[1]: Leaving directory `/u/bastienf/lisa/nspr-4.7/mozilla/nsprpub/pr' make: *** [export] Error 2 if I do grep -r JB_BP, We see that JB_BP is not defined anywhere in the release sources file. I tried to debug them, put their is no easy solution for someone that didn't writed the code. Do you have any hint about the cause? Is their other way to make it compile without pthread? thanks Frederic Bastien