From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Neil Jerram" Newsgroups: gmane.linux.debian.ports.hppa,gmane.lisp.guile.devel Subject: Guile FTBFS on hppa - problem in detecting stack direction? Date: Wed, 6 Aug 2008 21:38:32 +0100 Message-ID: <49dd78620808061338k3c29bd77o9d38d0706e0c5dca@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218055148 8972 80.91.229.12 (6 Aug 2008 20:39:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2008 20:39:08 +0000 (UTC) Cc: guile-devel@gnu.org To: debian-hppa@lists.debian.org Original-X-From: bounce-debian-hppa=debian-hppa=m.gmane.org@lists.debian.org Wed Aug 06 22:39:58 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 1KQpnZ-0001FL-SK for debian-hppa@m.gmane.org; Wed, 06 Aug 2008 22:39:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by liszt.debian.org (Postfix) with QMQP id 7D51213A5E88; Wed, 6 Aug 2008 20:39:00 +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=-9.3 required=4.0 tests=IMPRONONCABLE_2,LDOSUBSCRIBER, LDO_WHITELIST,MURPHY_DRUGS_REL8,SARE_MSGID_LONG40 autolearn=failed version=3.2.3 Original-Received: from localhost (localhost [127.0.0.1]) by liszt.debian.org (Postfix) with ESMTP id 568AE13A5E71 for ; Wed, 6 Aug 2008 20:38:54 +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-59 for ; Wed, 6 Aug 2008 20:38:51 +0000 (UTC) X-policyd-weight: DYN_NJABL=ERR NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .googlemail. - helo: .yw-out-1718.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2 , rate: -7 Original-Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.155]) by liszt.debian.org (Postfix) with ESMTP id D56EB13A5E59 for ; Wed, 6 Aug 2008 20:38:35 +0000 (UTC) Original-Received: by yw-out-1718.google.com with SMTP id 5so71676ywr.30 for ; Wed, 06 Aug 2008 13:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:mime-version:content-type:content-transfer-encoding :content-disposition; bh=893jj+K86dNWIpNKEmyTSgBqMU0cI7GBCwgLf9sXdas=; b=E7BMvIESguoq+jGSAAK6wKgwRcu2orju1KNu1Nb/zOXFyCWMffInVAOdf0jblloUig YDD1vkSqxpFJE7vVxOq9CphkHGHgjXS6qJG/WfmA2jiAD7yd+6bxEuujraX7dBlzFHDF d/E84TC8GntXU2rZ/b1+yOswZ2dabNqs4r3jM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type :content-transfer-encoding:content-disposition; b=fRypUAsT5T13qFkq5qw1TMJqpyqVJ93qaYJac9mew2GyAY++09fHXfkK9OGSsTAZa7 GVqBnjsS4gHd+J29TzKJcUTujmyUEbuoKijfWdQVievFZHZZyEpncEXEvwHD8su2n5tl 23Id32oVC1qsPMgzIRftxm7UOK/oRjTkx1c1U= Original-Received: by 10.114.56.1 with SMTP id e1mr909761waa.204.1218055112085; Wed, 06 Aug 2008 13:38:32 -0700 (PDT) Original-Received: by 10.114.197.8 with HTTP; Wed, 6 Aug 2008 13:38:32 -0700 (PDT) Content-Disposition: inline X-Virus-Scanned: at lists.debian.org with policy bank en-lt X-Amavis-Spam-Status: No, score=-3.343 tagged_above=3.6 required=5.3 tests=[IMPRONONCABLE_2=1, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, SARE_MSGID_LONG40=0.637] 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/6418 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 20:39:00 +0000 (UTC) Xref: news.gmane.org gmane.linux.debian.ports.hppa:5418 gmane.lisp.guile.devel:7407 Archived-At: 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? 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)])])