From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.os.cygwin,gmane.emacs.devel Subject: Building Emacs-trunk with gcc >= 4.5.1 and libelf installed Date: Tue, 24 Aug 2010 01:31:23 +0200 Message-ID: <4C7304CB.2020001@alice.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282606305 30042 80.91.229.12 (23 Aug 2010 23:31:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 Aug 2010 23:31:45 +0000 (UTC) Cc: Emacs To: Cygwin Original-X-From: cygwin-return-165300-goc-cygwin=m.gmane.org@cygwin.com Tue Aug 24 01:31:44 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 1OngUR-00042R-LG for goc-cygwin@lo.gmane.org; Tue, 24 Aug 2010 01:31:44 +0200 Original-Received: (qmail 1314 invoked by alias); 23 Aug 2010 23:31:38 -0000 Original-Received: (qmail 1303 invoked by uid 22791); 23 Aug 2010 23:31:37 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Original-Received: from smtp207.alice.it (HELO smtp207.alice.it) (82.57.200.103) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Aug 2010 23:31:30 +0000 Original-Received: from [82.55.237.230] (82.55.237.230) by smtp207.alice.it (8.5.124.08) id 4C1A26CF03E09702; Tue, 24 Aug 2010 01:31:26 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 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:121364 gmane.emacs.devel:129101 Archived-At: Trying to build Emacs-trunk on Cygwin with GCC >= 4.5.1, I have found a problem if also the package 'libelf0' is installed. The build fails in this way: ===================================== ./configure [...] checking for elf_begin in -lelf... yes [...] make [...] gcc-4.6... In file included from /usr/include/X11/Xos.h:146:0, from /tmp/emacs/src/xfaces.c:277: /usr/include/X11/Xarch.h:43:30: fatal error: sys/byteorder.h: No such file or directory compilation terminated. make[2]: *** [xfaces.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/tmp/emacs/Work/src' make[1]: *** [src] Error 2 make[1]: Leaving directory '/tmp/emacs/Work' make: *** [bootstrap] Error 2 ===================================== The issue is fixed, simply, if I uninstall 'libelf0'. Indeed... If 'libelf0' is installed, we have from 'configure', -------- checking for elf_begin in -lelf... yes -------- and the following test in 'configure' script is true: -------- if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then ac_have_func=yes $as_echo "#define SVR4 1" >>confdefs.h fi -------- 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: -------- [...] # if defined(SVR4) || defined(__SVR4) # include # elif [...] -------- 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. What does the Cygwin 'libelf0' maintainer think about these facts? Thanks, Angelo. --- [1] Here Cygwin isn't different frome GNU/Linux Kubuntu 10.04. :-)