Subject: Re: pkg/31170: firefox package build dumps core
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: David H. Gutteridge <dhgutteridge@sympatico.ca>
List: pkgsrc-bugs
Date: 09/08/2005 08:10:05
The following reply was made to PR pkg/31170; it has been noted by GNATS.

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: <grant@netbsd.org>, <pkg-manager@netbsd.org>,
	<gnats-admin@netbsd.org>
Cc: <pkgsrc-bugs@netbsd.org>
Subject: Re: pkg/31170: firefox package build dumps core
Date: Wed, 7 Sep 2005 23:45:21 -0400

 Modifying patch-br to check for < 299000000 as below did the trick,
 Firefox now works reliably when doing DNS lookups.  That answers my
 general question I had out about this on current-users and port-i386 too.
 
 > 
 > From: David H. Gutteridge <dhgutteridge@sympatico.ca>
 > Date: 2005/09/07 Wed PM 08:55:23 EST
 > To: <grant@netbsd.org>, <pkg-manager@netbsd.org>, <gnats-admin@netbsd.org>
 > CC: <pkgsrc-bugs@netbsd.org>
 > Subject: Re: pkg/31170: firefox package build dumps core
 > 
 > I found patch-br which specifically references this issue.  When
 > I originally looked at it (after I grepped pkgsrc for the version
 > issue in general last week), my brain was a bit fried and I misread
 > the "<" as a ">" (since ">" was what was typically coded for in
 > those version checks).  So I thought it was turning on behaviour
 > rather than turning it off.  (I remember thinking, "why LOCK_DNS
 > if the functions are re-entrant?" but it didn't occur to me to 
 > think about it for a minute and realize I was looking at it
 > backwards.)
 > 
 > So I've modified the patch to look for < 299000000 and am
 > recompiling it now, will report back when I'm done, I'm sure this
 > is the answer to the problem.
 > 
 > (I could smack myself for not really looking at the code.)
 > 
 > > 
 > > From: grant beattie <grant@NetBSD.org>
 > > Date: 2005/09/07 Wed PM 08:29:52 EST
 > > To: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
 > > CC: tls@netbsd.org,  pkg-manager@netbsd.org,  gnats-admin@netbsd.org, 
 > > 	pkgsrc-bugs@netbsd.org
 > > Subject: Re: pkg/31170: firefox package build dumps core
 > > 
 > > On Wed, Sep 07, 2005 at 02:36:45PM -0400, David H. Gutteridge wrote:
 > > 
 > > > Hello fellow Firefox build sufferer,
 > > > 
 > > > I've successfully built Firefox several times on 2.1RC3/i386, several times
 > > > because if you do get it running, you may find it has what appear to be
 > > > problems relating to netdb functions.  I've put some emails out about the
 > > > issue, but don't know of a solution at this point.  (See for instance
 > > > http://mail-index.netbsd.org/current-users/2005/09/05/0003.html)
 > > > 
 > > > Basically, DNS queries hang, and they can do so even when the browser just
 > > > starts up and calls the home page that's set.  This appears to be related
 > > > to the fact that the pertinent function(s) in netdb.h are not thread-safe,
 > > > but I'm a bit confused as to why the exact same package built with the very
 > > > same options under 2.0.2/i386 works without such problems, I haven't figured
 > > > that out.  (So I may be following a red herring.)
 > > > 
 > > > I have two Firefox builds in package form, the plain vanilla version and one
 > > > with debugging symbols and output enabled.  If you're willing to trust some
 > > > guy you don't know on the internet (ha ha), I can make them available to you.
 > > 
 > > "ugh".
 > > 
 > > I think this is a fallout from the __NetBSD_Version__ change in 2.1,
 > > because firefox/mozilla/thunderbird test __NetBSD_Version__ and use
 > > thread-safe resolver functions if it's recent enough.
 > > 
 > > my guess is that the change in NetBSD 2.1 means this code is turned on
 > > in Firefox, but I think 2.1 lacks the thread-safe resolver functions,
 > > so it breaks.
 > > 
 > > look at patches/* and see if you can tweak the version number to do
 > > the right thing..
 > > 
 > > grant.
 > > 
 >