From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kyle McMartin Newsgroups: gmane.linux.debian.ports.hppa,gmane.lisp.guile.devel Subject: Re: Guile FTBFS on hppa - problem in detecting stack direction? Date: Wed, 6 Aug 2008 17:13:00 -0400 Message-ID: <20080806211259.GB3281@phobos.i.cabal.ca> References: <49dd78620808061338k3c29bd77o9d38d0706e0c5dca@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218058219 19744 80.91.229.12 (6 Aug 2008 21:30:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2008 21:30:19 +0000 (UTC) Cc: debian-hppa@lists.debian.org, guile-devel@gnu.org To: Neil Jerram Original-X-From: bounce-debian-hppa=debian-hppa=m.gmane.org@lists.debian.org Wed Aug 06 23:31:09 2008 Return-path: Envelope-to: debian-hppa@m.gmane.org Original-Received: from liszt.debian.org ([82.195.75.100]) by lo.gmane.org with esmtp (Exim 4.50) id 1KQqb7-0003mc-0n for debian-hppa@m.gmane.org; Wed, 06 Aug 2008 23:31:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by liszt.debian.org (Postfix) with QMQP id 9B81313A5E86; Wed, 6 Aug 2008 21:30:11 +0000 (UTC) Old-Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on liszt.debian.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=4.0 tests=IMPRONONCABLE_2, MURPHY_DRUGS_REL8,RDNS_DYNAMIC autolearn=no version=3.2.3 Original-Received: from localhost (localhost [127.0.0.1]) by liszt.debian.org (Postfix) with ESMTP id D932713A59A4 for ; Wed, 6 Aug 2008 21:13:12 +0000 (UTC) Original-Received: from liszt.debian.org ([127.0.0.1]) by localhost (lists.debian.org [127.0.0.1]) (amavisd-new, port 2525) with ESMTP id 09659-76 for ; Wed, 6 Aug 2008 21:13:10 +0000 (UTC) X-policyd-weight: DYN_NJABL=ERR NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_FROM_IP=-2 CL_SEEMS_DIALUP=3.75 (check from: .cabal. - helo: .phobos.cabal. - helo-domain: .cabal.) FROM/MX_MATCHES_HELO(DOMAIN)=-2 , rate: -3.25 Original-Received: from phobos.cabal.ca (206-248-169-182.dsl.ncf.ca [206.248.169.182]) by liszt.debian.org (Postfix) with ESMTP id AF62713A59B5 for ; Wed, 6 Aug 2008 21:13:03 +0000 (UTC) Original-Received: by phobos.cabal.ca (Postfix, from userid 500) id 24242178062; Wed, 6 Aug 2008 17:13:00 -0400 (EDT) Content-Disposition: inline In-Reply-To: <49dd78620808061338k3c29bd77o9d38d0706e0c5dca@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: at lists.debian.org with policy bank en-lt X-Amavis-Spam-Status: No, score=1.12 tagged_above=3.6 required=5.3 tests=[IMPRONONCABLE_2=1, MURPHY_DRUGS_REL8=0.02, RDNS_DYNAMIC=0.1] X-Rc-Spam: 2007-10-04_01 X-Rc-Virus: 2007-09-13_01 X-Rc-Spam: 2007-10-04_01 Resent-Message-ID: Resent-From: debian-hppa@lists.debian.org X-Mailing-List: archive/latest/6419 X-Loop: debian-hppa@lists.debian.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: Precedence: list Resent-Sender: debian-hppa-request@lists.debian.org Resent-Date: Wed, 6 Aug 2008 21:30:11 +0000 (UTC) Xref: news.gmane.org gmane.linux.debian.ports.hppa:5419 gmane.lisp.guile.devel:7408 Archived-At: On Wed, Aug 06, 2008 at 09:38:32PM +0100, Neil Jerram wrote: > Hi hppa people! I'm hoping you can help me fix a FTBFS that we're > getting with Guile on hppa. > > The build log is here: > http://buildd.debian.org/fetch.cgi?pkg=guile-1.8;ver=1.8.5%2B1-2;arch=hppa;stamp=1217809852 > > The specific problem is a segmentation fault, at a point in a build > that probably won't mean anything to non-Guile folks - but the key > point is that we were recently seeing exactly the same segmentation > fault (i.e. at the same place) on several other architectures (mips, > mipsel, powerpc), and that was caused by the code in configure.in not > detecting the stack direction properly. > > This patch - http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=9143131b2766d1e29e05d61b5021395b4c93a6bc > - fixed the problem for mips, mipsel and powerpc, but it looks as > though we are still getting the stack direction wrong on hppa. (My > understanding is that on hppa the stack actually grows upwards, > whereas on most platforms it's downwards.) > > I've appended the relevant bit of configure.in below. Can anyone help > with why this might not be working on hppa? > According to the build.log, checking stack direction... (cached) 0 this looks like it's obtaining the wrong result... I'm not entirely sure why... what optimization pass is being used to build this? regards, Kyle > Thanks, > Neil > > #-------------------------------------------------------------------- > # > # Which way does the stack grow? > # > # Following code comes from Autoconf 2.61's internal _AC_LIBOBJ_ALLOCA > # macro (/usr/share/autoconf/autoconf/functions.m4). Gnulib has > # very similar code, so in future we could look at using that. > # > # An important detail is that the code involves find_stack_direction > # calling _itself_ - which means that find_stack_direction (or at > # least the second find_stack_direction() call) cannot be inlined. > # If the code could be inlined, that might cause the test to give > # an incorrect answer. > #-------------------------------------------------------------------- > > SCM_I_GSC_STACK_GROWS_UP=0 > AC_CACHE_CHECK([stack direction], > [SCM_I_GSC_STACK_GROWS_UP], > [AC_RUN_IFELSE([AC_LANG_SOURCE( > [AC_INCLUDES_DEFAULT > int > find_stack_direction () > { > static char *addr = 0; > auto char dummy; > if (addr == 0) > { > addr = &dummy; > return find_stack_direction (); > } > else > return (&dummy > addr) ? 1 : -1; > } > > int > main () > { > return find_stack_direction () < 0; > }])], > [SCM_I_GSC_STACK_GROWS_UP=1], > [], > [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h)])]) > > > -- > To UNSUBSCRIBE, email to debian-hppa-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org >