Closed Bug 83943 Opened 23 years ago Closed 23 years ago

NSPR fails to compile on NetBSD

Categories

(NSPR :: NSPR, defect, P1)

4.0.2
x86
NetBSD
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 70834

People

(Reporter: bstark1990, Assigned: wtc)

Details

Using the latest version of NetBSD (NetBSD-current version 1.5W/i386), nspr fails to compile in the directory: nsprpub/pr/src/io. These are the errors that I see: gcc -o prlog.o -c -ansi -Wall -pipe -O -g -fPIC -DPIC -UNDEBUG -DUSE_AUTOCONF=1 -DDEBUG=1 -DDEBUG_bstark=1 -DXP_UNIX=1 -DNETBSD=1 -DHAVE_BSD_FLOCK=1 -DHAVE _LCHOWN=1 -DHAVE_STRERROR=1 -DFORCE_PR_LOG -D_NSPR_BUILD_ -I/usr/local/source/mozilla.org/obj-i386-unknown-netbsdelf1.5W/dist/include/nspr -I/usr/local/source/m ozilla.org/mozilla/nsprpub/pr/include -I/usr/local/source/mozilla.org/mozilla/nsprpub/pr/include/private /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io /prlog.c /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c: In function `PR_LogPrint': /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:405: warning: implicit declaration of function `_MD_CURRENT_THREAD' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:405: warning: initialization makes pointer from integer without a cast /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:405: warning: implicit declaration of function `_MD_GET_INTSOFF' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:405: warning: implicit declaration of function `_MD_SET_INTSOFF' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:423: warning: comparison between pointer and integer /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:423: warning: implicit declaration of function `_MD_CURRENT_CPU' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:423: invalid type argument of `->' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:423: warning: passing arg 1 of `_PR_IntsOn' makes pointer from integer without a cast /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c: In function `PR_LogFlush': /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:430: warning: initialization makes pointer from integer without a cast /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:435: warning: comparison between pointer and integer /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:435: invalid type argument of `->' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:435: warning: passing arg 1 of `_PR_IntsOn' makes pointer from integer without a cast gmake[5]: *** [prlog.o] Error 1 This is happening with the June 3, 2001 mozilla-source.tar.gz
I suspect that this bug is a duplicate of bug #70834. Let me check in the fix for that bug and see if it solves your build problem.
Status: UNCONFIRMED → ASSIGNED
Depends on: 70834
Ever confirmed: true
Priority: -- → P1
Target Milestone: --- → 4.2
Applied changes from Wan-Ten Chang (wtc@netscape.com) for bug 70834 and problem still exists (bug 70834 is believed to be related...): gcc -o prlog.o -c -ansi -Wall -pipe -O -g -fPIC -DPIC -UNDEBUG -DUSE_AUTOCONF=1 -DDEBUG=1 -DDEBUG_bstark=1 -DXP_UNIX=1 -DNETBSD=1 -DHAVE_B SD_FLOCK=1 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1 -DFORCE_PR_LOG -D_NSPR_BUILD_ -I/usr/local/source/mozilla.org/obj-i386-unknown-netbsdelf1.5W/dist/ include/nspr -I/usr/local/source/mozilla.org/mozilla/nsprpub/pr/include -I/usr/local/source/mozilla.org/mozilla/nsprpub/pr/include/private /usr /local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c: In function `PR_LogPrint': /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:405: warning: implicit declaration of function `_MD_CURRENT_THREAD' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:405: warning: initialization makes pointer from integer without a cast /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:405: warning: implicit declaration of function `_MD_GET_INTSOFF' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:405: warning: implicit declaration of function `_MD_SET_INTSOFF' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:423: warning: comparison between pointer and integer /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:423: warning: implicit declaration of function `_MD_CURRENT_CPU' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:423: invalid type argument of `->' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:423: warning: passing arg 1 of `_PR_IntsOn' makes pointer from integer without a cast /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c: In function `PR_LogFlush': /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:430: warning: initialization makes pointer from integer without a cast /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:435: warning: comparison between pointer and integer /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:435: invalid type argument of `->' /usr/local/source/mozilla.org/mozilla/nsprpub/pr/src/io/prlog.c:435: warning: passing arg 1 of `_PR_IntsOn' makes pointer from integer without a cast gmake[5]: *** [prlog.o] Error 1 gmake[5]: Leaving directory `/usr/local/source/mozilla.org/obj-i386-unknown-netbsdelf1.5W/nsprpub/pr/src/io' gmake[4]: *** [export] Error 2 gmake[4]: Leaving directory `/usr/local/source/mozilla.org/obj-i386-unknown-netbsdelf1.5W/nsprpub/pr/src' gmake[3]: *** [export] Error 2 gmake[3]: Leaving directory `/usr/local/source/mozilla.org/obj-i386-unknown-netbsdelf1.5W/nsprpub/pr' gmake[2]: *** [export] Error 2 gmake[2]: Leaving directory `/usr/local/source/mozilla.org/obj-i386-unknown-netbsdelf1.5W/nsprpub' gmake[1]: *** [export] Error 2 gmake[1]: Leaving directory `/usr/local/source/mozilla.org/obj-i386-unknown-netbsdelf1.5W' gmake: *** [build] Error 2
The problem is that you don't have -D_PR_LOCAL_THREADS_ONLY=1 on your compile command line. How did you configure NSPR? Did you specify --with-pthreads? What were your configure options?
Did you run 'autoconf' ?
The solution for bug 70834 does work... I didn't fully understand the auto configuration environment and thought that applying the patch to configure.in was enough. I ran "autoconf" in the nsprpub directory and then started a build by running "gmake -f mozilla/client.mk build". This time NSPR was compiled.
*** This bug has been marked as a duplicate of 70834 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
No longer depends on: 70834
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.