Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1POtzZ-0008P4-2q for mharc-grub-devel@gnu.org; Sat, 04 Dec 2010 10:25:41 -0500 Received: from [140.186.70.92] (port=33157 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POtzV-0008Ov-QF for grub-devel@gnu.org; Sat, 04 Dec 2010 10:25:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POtzU-0003Ru-M9 for grub-devel@gnu.org; Sat, 04 Dec 2010 10:25:37 -0500 Received: from smarthost01.mail.zen.net.uk ([212.23.3.140]:39005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POtzU-0003Ri-Hm for grub-devel@gnu.org; Sat, 04 Dec 2010 10:25:36 -0500 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost01.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1POtzS-0000Uu-DV for grub-devel@gnu.org; Sat, 04 Dec 2010 15:25:34 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1POtzR-0003aM-00; Sat, 04 Dec 2010 15:25:33 +0000 Date: Sat, 4 Dec 2010 15:25:33 +0000 From: Colin Watson To: The development of GNU GRUB Message-ID: <20101204152533.GZ21862@riva.ucam.org> References: <4CF66EFE.4030400@gmail.com> <4CF7B02F.1020105@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost01-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Need LARGEFILE_SOURCE && _FILE_OFFSET_BITS=64 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Dec 2010 15:25:38 -0000 On Fri, Dec 03, 2010 at 01:20:13PM -0800, Seth Goldberg wrote: > In testing grub-emu after a merge, I was getting weird behavior whereby > a zfs volume could not be properly read. It was failing because, after a > lot of painful debugging, I discovered that the offsets issued to the > underlying host disk device were wrong, because the grub-emu was not > build largefile-aware on platform on which I was testing. grub-emu > should be built with -DLARGEFILE_SOURCE and _FILE_OFFSET_BITS=64 so that > off_t will be defined as a 64-bit type and calls like lseek will work > with large files (and devices). So, I think a configure test for this > for the emu target is essential. We actually have AC_SYS_LARGEFILE in configure.ac already, which is supposed to append appropriate options to (slightly oddly) CC. Now, hostdisk.c is built with TARGET_CC instead; but TARGET_CC should be set to CC when building the emu target, if I'm reading this right, because it doesn't count as cross-compilation. Are you setting CC by hand? Could I see the output of configure? -- Colin Watson [cjwatson@ubuntu.com]