From owner-freebsd-chat Tue May 1 3:30:58 2001 Delivered-To: freebsd-chat@freebsd.org Received: from idiom.com (idiom.com [216.240.32.1]) by hub.freebsd.org (Postfix) with ESMTP id 86B0537B423 for ; Tue, 1 May 2001 03:30:56 -0700 (PDT) (envelope-from rdm@cfcl.com) Received: from cfcl.com (cpe-24-221-169-54.ca.sprintbbd.net [24.221.169.54]) by idiom.com (8.9.3/8.9.3) with ESMTP id DAA78720 for ; Tue, 1 May 2001 03:30:55 -0700 (PDT) Received: from [192.168.168.205] (cerberus [192.168.168.205]) by cfcl.com (8.11.1/8.11.1) with ESMTP id f41AWAV00460 for ; Tue, 1 May 2001 03:32:10 -0700 (PDT) (envelope-from rdm@cfcl.com) Mime-Version: 1.0 Message-Id: In-Reply-To: <20010430172143.A9910@Odin.AC.HMC.Edu> References: <20010430172143.A9910@Odin.AC.HMC.Edu> Date: Tue, 1 May 2001 03:26:10 -0700 To: chat@FreeBSD.ORG From: Rich Morin Subject: Re: BSD libc for Linux? Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At 5:21 PM -0700 4/30/01, Brooks Davis wrote: >For lack of any where better to ask, I'll try chat. Does any one know >of a working port of a BSD libc for a modern Linux (RedHat 6.x, SuSE 6.y, >etc.) I ask because I've got some scientific code that's more or less >pure ANSI C that works just fine producing the same or nearly the same >results on FreeBSD, Solaris, Irix, and even Alpha Linux, but on i386 >Linux it produces wildly different (though consistant) results. I'm >hoping for an easy to way to figure out it it's the kernel or glibc. I'm not sure that's the best debugging strategy. For one thing, the culprit might be neither one of these. And, even if you find out which library (or other system component) the problem lies in, you will still be far from having a useful bug report. So, I would suggest a different strategy. Using a series of carefully- instrumented runs, find out where the program is going astray. Then, attempt to create a subset of the program which replicates the problem. Rinse, repeat until you get down to a specific system call or function. Here are some possibly useful techniques: Compare the output streams of the running and bogus systems, looking for the first instance of an error. For finer granularity, add trace messages of values that might be relevant to the problem. To test hypotheses (and keep the output stream manageable), insert conditional trace statements that track specific values. -r -- http://www.cfcl.com/rdm - home page, resume, etc. http://www.cfcl.com/Meta/md_fb.html - The FreeBSD Browser email: rdm@cfcl.com; phone: +1 650-873-7841 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message