From owner-freebsd-arm@FreeBSD.ORG Fri May 17 11:24:57 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6E04472A; Fri, 17 May 2013 11:24:57 +0000 (UTC) (envelope-from kwhite@site.uottawa.ca) Received: from courriel.site.uottawa.ca (eecsmail.engineering.uottawa.ca [137.122.24.224]) by mx1.freebsd.org (Postfix) with ESMTP id 3BED561D; Fri, 17 May 2013 11:24:56 +0000 (UTC) Received: from [10.0.2.15] (dsl-74-51-49-9.vianet.ca [74.51.49.9]) (authenticated bits=0) by courriel.site.uottawa.ca (8.14.5/8.14.4) with ESMTP id r4HBOlI1093005 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 17 May 2013 07:24:49 -0400 (EDT) (envelope-from kwhite@site.uottawa.ca) Date: Fri, 17 May 2013 07:25:07 -0400 (EDT) From: Keith White X-X-Sender: kwhite@localhost.my.domain To: Werner Thie Subject: Re: Git crash on EABI system. In-Reply-To: <5195F2CA.2090103@thieprojects.ch> Message-ID: References: <51949698.80205@thieprojects.ch> <2290084B-D302-4489-BB01-817497901E2B@freebsd.org> <5195F2CA.2090103@thieprojects.ch> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 May 2013 11:24:57 -0000 On Fri, 17 May 2013, Werner Thie wrote: > On 5/16/13 11:04 AM, Tim Kientzle wrote: >> >> On May 16, 2013, at 4:19 AM, Werner Thie wrote: >> >>>> Has anyone else seen this from git on a clang/EABI system? >>>> >>>> Assertion failed: (attr_stack->origin), function prepare_attr_stack, file >>>> attr.c, line 630. >>>> >>>> Program received signal SIGABRT, Aborted. >>>> [Switching to Thread 20c03300 (LWP 100076/git)] >>>> 0x204b842c in thr_kill () from /lib/libc.so.7 >>>> (gdb) bt >>>> #0 0x204b842c in thr_kill () from /lib/libc.so.7 >>>> #1 0x2044157c in raise () from /lib/libthr.so.3 >>>> #2 0x20598130 in abort () from /lib/libc.so.7 >>>> #3 0x20574630 in __assert () from /lib/libc.so.7 >>>> #4 0x00076b28 in ?? () >>>> >>>> I'm planning to do a debug build and see if I can track down any >>>> more details. >>> >>> Hi Tim >>> >>> just built git out of curiosity after your post on the BBone >>> >>> FreeBSD beaglebone 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r250144M: Sat May >>> 4 14:18:20 CEST 2013 >>> root@xtools:/usr/home/wthie/proj/crochet-freebsd/work/obj/arm.armv6/usr/local/src/sys/BEAGLEBONE-NOWITNESS >>> arm >>> >>> git crashes exactly as advertised when cloning a project in >>> >>> Assertion failed: (attr_stack->origin), function prepare_attr_stack, file >>> attr.c, line 630. >> >> Thanks for verifying that. > > Tim > > Maybe you or somebody else can shed some light onto how compiler-rt is used > for the ARM platform, specifically why am I getting a > > missing symbol __clear_cache > > when building ctypes for Python. > > I tried several ways to preset WITH_ARM_EABI on make.conf but the def never > shows up when compiling Python nor one of the other extension modules. I > assume the def is generally set and the missing symbol is courtesy of some > other error/omission. > > Thxs, Werner > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" To successfully build ctypes for python on arm I have found that the following "works for me": =================================================================== --- contrib/compiler-rt/lib/clear_cache.c (revision 250739) +++ contrib/compiler-rt/lib/clear_cache.c (working copy) @@ -21,6 +21,23 @@ * specified range. */ +/* python ffi routines call it too */ + +#if defined(__arm__) && defined(__clang__) +#pragma redefine_extname __clear_cache_c __clear_cache +void __clear_cache_c(void* start, void* end) +{ + extern int sysarch(int number, void *args); + struct + { + unsigned int addr; + int len; + } s; + s.addr = (unsigned int)(start) & ~0x1f; + s.len = (int)((((unsigned int)end + 0x1f) & ~0x1f) - ((unsigned int)start & ~0x1f)); + (void) sysarch (0, &s); +} +#else void __clear_cache(void* start, void* end) { #if __i386__ || __x86_64__ @@ -37,4 +54,5 @@ #endif #endif } +#endif ...keith