From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10451 invoked by alias); 1 Nov 2008 22:18:44 -0000 Received: (qmail 10429 invoked by uid 22791); 1 Nov 2008 22:18:44 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 01 Nov 2008 22:17:52 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 942F52A9675; Sat, 1 Nov 2008 18:17:50 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tbIyj5TtsP-k; Sat, 1 Nov 2008 18:17:50 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5C6952A95CD; Sat, 1 Nov 2008 18:17:50 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4C373E7ACD; Sat, 1 Nov 2008 15:17:48 -0700 (PDT) Date: Sat, 01 Nov 2008 22:18:00 -0000 From: Joel Brobecker To: Klaus Zeitler Cc: gdb-patches@sourceware.org Subject: Re: CVS build for Solaris 5.8 fails: elfcore_write_prpsinfo undefined Message-ID: <20081101221748.GC15606@adacore.com> References: <20081101011851.GA15606@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081101011851.GA15606@adacore.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00002.txt.bz2 > > Undefined first referenced > > symbol in file > > elfcore_write_prpsinfo libgdb.a(procfs.o) > > elfcore_write_prstatus libgdb.a(procfs.o) > > ld: fatal: Symbol referencing errors. No output written to gdb > > I can reproduce. Looks like a problem in the bfd configure script, > as the following check returns "no": > > AC_CHECK_HEADERS(sys/procfs.h) Pedro reminded me that he actually had already seen the problem: http://sourceware.org/ml/gdb-patches/2008-10/msg00283.html. The problem is that _FILE_OFFSET_BITS is being defined to 64 in order to provide the capability of handling "large files". The problem is that procfs on solaris clearly does not work with the large-file environment activated. The error message is pretty clear about that, I think: #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 #error "Cannot use procfs in the large file compilation environment" #endif This problem was introduced when we started using the AC_SYS_LARGEFILES macro (patch checked in Sep 11). The work-around is to configure GDB with --disable-largefile. I'm not sure what the optimal fix should be. Looks like we cannot have the two features at the same time on Solaris (I checked version 8, 9 and 10, both sparc and x86). To me, the simplest is to deactivate AC_SYS_LARGEFILES in bfd for Solaris hosts (unless configured with --enable-largefile perhaps?). An alternative is to conditionalize the code in GDB that uses elfcore_write_prpsinfo and elfcore_write_prstatus. GDB would then build again, but I think that GDB would then generate core files which would be missing some pieces that it used to contain. So I'm not keen on this approach. Any other suggestion? -- Joel