Closed Bug 232120 Opened 21 years ago Closed 20 years ago

Now NetBSD have pthread support, but mozilla can't properly configure

Categories

(SeaMonkey :: Build Config, defect)

x86
NetBSD
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.7beta

People

(Reporter: taya, Unassigned)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.6) Gecko/20040117
Build Identifier: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.6) Gecko/20040117

(1) mozilla/configure blindly disables pthreads on NetBSD
(2) mozilla/nsprpub/configure does not define macro and does not supply ld
argument '-pthread'
(3) _PRSockOptVal_t is not defined for NetBSD in
mozilla/nsprpub/pr/src/pthreads/ptio.c


Reproducible: Always

Steps to Reproduce:
make mozilla on NetBSD-current

Actual Results:  
not configured to use native pthread


Expected Results:  
configured to use pthread
this patch is used for NetBSD pkgsrc system.
so known to be worked.
please merge this patch.
Attachment #139837 - Flags: superreview?(darin)
Attachment #139837 - Flags: review?(wchang0222)
Comment on attachment 139837 [details] [diff] [review]
patch to fix this bug

r=wtc.	Taya, are you sure that on NetBSD we
need to define both -D_REENTRANT and -D_THREAD_SAFE?

On FreeBSD, we were told that -pthread cannot be used
for compiling and should only be used for linking.
Is it the same way on NetBSD?
Attachment #139837 - Flags: review?(wchang0222) → review+
For nsprpub/configure.in part, I simply copied From FreeBSD & modified about
_PTHREAD_LDFLAGS.
These patches are not needed for NetBSD sources(I mean /usr/include/*.h or
/usr/include/*/*.h).
If these defines are not needed for mozilla sources, I will remove them and
regen patches.


About -pthread issue, there is no restriction like FreeBSD.

nsprpub does not need _REENTRANT or _THREAD_SAFE.
Usually the pthreads man page documents which
macros need to be defined if you use pthreads.
If the compiler supports a -pthread or -pthreads
flag, that flag will take care of any necessary
macro defines.
I could build & run mozilla without explicitly define _REENTRANT or _THREAD_SAFE.
-pthread option is enough.
I'll post new patch later.
Comment on attachment 140307 [details] [diff] [review]
new patch for nsprpub/configure.in

r=wtc.

Taya, do we still need to change mozilla/configure.in and
mozilla/nsprpub/pr/src/pthreads/ptio.c?  These two files
are modified in your old patch.
Attachment #140307 - Flags: review+
Yes, both are needed.
Comment on attachment 139837 [details] [diff] [review]
patch to fix this bug

I checked in the NSPR patches on the NSPR trunk (NSPR 4.5.1)
and NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.7a).

Darin, could you superreview the mozilla/configure.in change
in this patch?
Comment on attachment 139837 [details] [diff] [review]
patch to fix this bug

sr=darin
Attachment #139837 - Flags: superreview?(darin) → superreview+
Last patch checked into the Mozilla trunk.

Checking in configure.in;
/cvsroot/mozilla/configure.in,v  <--  configure.in
new revision: 1.1320; previous revision: 1.1319
done

All the changes will be in Mozilla 1.7 beta.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.7beta
I could build & run mozilla with latest source check out from CVS.
Thank you!
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: