From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Yaakov (Cygwin/X)" Newsgroups: gmane.os.cygwin,gmane.emacs.devel Subject: Re: Building Emacs-trunk with gcc >= 4.5.1 and libelf installed Date: Mon, 23 Aug 2010 23:37:11 -0500 Message-ID: <1282624631.5256.40.camel@YAAKOV04> References: <4C7304CB.2020001@alice.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282624646 13940 80.91.229.12 (24 Aug 2010 04:37:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Aug 2010 04:37:26 +0000 (UTC) To: cygwin , emacs-devel@gnu.org Original-X-From: cygwin-return-165306-goc-cygwin=m.gmane.org@cygwin.com Tue Aug 24 06:37:25 2010 Return-path: Envelope-to: goc-cygwin@lo.gmane.org Original-Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1OnlGH-0001v9-1A for goc-cygwin@lo.gmane.org; Tue, 24 Aug 2010 06:37:25 +0200 Original-Received: (qmail 29766 invoked by alias); 24 Aug 2010 04:37:19 -0000 Original-Received: (qmail 29756 invoked by uid 22791); 24 Aug 2010 04:37:18 -0000 X-SWARE-Spam-Status: No, hits=-50.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_BK X-Spam-Check-By: sourceware.org Original-Received: from mail-vw0-f43.google.com (HELO mail-vw0-f43.google.com) (209.85.212.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Aug 2010 04:37:11 +0000 Original-Received: by vws8 with SMTP id 8so139972vws.2 for ; Mon, 23 Aug 2010 21:37:09 -0700 (PDT) Original-Received: by 10.220.59.202 with SMTP id m10mr3932582vch.193.1282624629312; Mon, 23 Aug 2010 21:37:09 -0700 (PDT) Original-Received: from [127.0.0.1] (S0106000cf16f58b1.wp.shawcable.net [24.76.240.202]) by mx.google.com with ESMTPS id v11sm4028901vbb.14.2010.08.23.21.37.07 (version=SSLv3 cipher=RC4-MD5); Mon, 23 Aug 2010 21:37:08 -0700 (PDT) In-Reply-To: <4C7304CB.2020001@alice.it> Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Xref: news.gmane.org gmane.os.cygwin:121370 gmane.emacs.devel:129110 Archived-At: On Tue, 2010-08-24 at 01:31 +0200, Angelo Graziosi wrote: > Trying to build Emacs-trunk on Cygwin with GCC >= 4.5.1, I have found a > problem if also the package 'libelf0' is installed. [snip] > and the following test in 'configure' script is true: [snip] > i.e. SVR4 is _defined_. But... 'src/xfaces.c' includes indirectly via > '/usr/include/X11/Xos.h' the header '/usr/include/X11/Xarch.h', which has: [snip] > i.e. finding SVR4 defined, it searches for 'byteorder.h' in > '/usr/include/sys' and not in '/usr/include/asm', where it lives (*as on > GNU/Linux*[1]), and this leads to the above failure. This is coming from autoconf's AC_FUNC_GETLOADAVG, which tries to find several different getloadavg(3) implementations (which Cygwin doesn't provide), otherwise it points to an AC_LIBOBJ from gnulib. On Solaris, the gnulib getloadavg uses kvm_open(3) and friends, and libkvm requires libelf, hence the check for the latter. AFAICS the proper solution is, in _AC_LIBOBJ_GETLOADAVG: if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then ac_have_func=yes AC_DEFINE(SVR4, 1, [Define to 1 on System V Release 4.]) fi to add << && test "$ac_cv_lib_kvm_kvm_open" = yes >> to the conditional. In the meantime, since libelf isn't needed elsewhere in emacs, an easy workaround is to add "ac_cv_lib_elf_elf_begin=no" to CYGCONF_ARGS. HTH, Yaakov