From owner-freebsd-arm@FreeBSD.ORG Thu Jun 27 06:17:38 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 4CACDCE9 for ; Thu, 27 Jun 2013 06:17:38 +0000 (UTC) (envelope-from jordan.hubbard@gmail.com) Received: from mail-pb0-x231.google.com (mail-pb0-x231.google.com [IPv6:2607:f8b0:400e:c01::231]) by mx1.freebsd.org (Postfix) with ESMTP id 1EF781BB5 for ; Thu, 27 Jun 2013 06:17:38 +0000 (UTC) Received: by mail-pb0-f49.google.com with SMTP id jt11so464422pbb.22 for ; Wed, 26 Jun 2013 23:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to:x-mailer; bh=/Xznsxbah6PjlWcr1LpkM6GMkO+J55Ze0DIxyMWZYTs=; b=W63i/alH6BVndHL2Mlviw2cbVJXmeAgxAh6/iaoPRz61XiLwTOzrTLO9XzTdwwmyqH 47MYPIeQQ66lbvWgAx5s2zkw6zMNiDeJ5WTJAjKm76kPpQZ+7DTQ4oUrBbpu1MWX5+/w ndEqk+WbvVGA58WVzBK4X2dqaXVkLaeeEOrFa12lee6HyYv3CFfeiyfuNLxzPNR91xyI uFSSbGnsaR1e8hj9s4+y4joq08j0SWClguqYcjMbmke0G0GDMEzamXm5hzy0z2gKjd4t ug8uM2oPOwm2qWOdiT+Op3Iu+fgmnr/BIjIOSmXZ7oH8XP2KIgnmkScLOl9MqA8Hcmuf tGIg== X-Received: by 10.68.219.194 with SMTP id pq2mr4411439pbc.151.1372313857905; Wed, 26 Jun 2013 23:17:37 -0700 (PDT) Received: from [10.20.30.70] (137.sub-70-197-5.myvzw.com. [70.197.5.137]) by mx.google.com with ESMTPSA id ri8sm1701575pbc.3.2013.06.26.23.17.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Jun 2013 23:17:37 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Raspberry pi not ready to self-host yet? From: "Jordan K. Hubbard" In-Reply-To: <20130627013142.5fdb2544@ivory.wynn.com> Date: Wed, 26 Jun 2013 23:17:34 -0700 Message-Id: References: <800732D1-B06A-40AE-AE69-F6170662B2AA@turbofuzz.com> <20130626235542.27844683@ivory.wynn.com> <79CFABCE-156A-44B5-B989-A3607C47B2AF@mail.turbofuzz.com> <20130627013142.5fdb2544@ivory.wynn.com> To: Brett Wynkoop X-Mailer: Apple Mail (2.1508) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-arm@freebsd.org 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: Thu, 27 Jun 2013 06:17:38 -0000 Hmmm, I must have been ambiguous in how I worded that, so let me try = again with some hopefully more easily parseable bullets: 1. Using -current sources as recently as a week ago, I was able to build = a bootable PI image using the scripts at = https://github.com/daveish/freebsd-arm-tools. Since these tools use my = master -current source tree, hosted on an amd64 VM, I know that it's at = least *possible* to compile a world and kernel for ARM or there would = have been nothing for those build scripts to copy to the image! More on = that in a minute. 2. I can also build world/kernel natively for amd64 (e.g. the VM) and = install it so I know my version of -current overall is at least sane = enough for one of the main supported architectures and, as above, it is = also evidently possible to cross-compile from it when in the loving = hands of the freebsd-arm-tools. 3. I cannot, using the very same source tree, build world or kernel or, = indeed, even something as comparatively basic as subversion from ports = on the PI itself without encountering the dreaded: 1. /usr/include/c++/4.2/bits/basic_string.tcc:978:43: = current parser token ';' 2. /usr/include/c++/4.2/bits/basic_string.tcc:48:1 = : parsing = namespace 'std' c++: error: unable to execute command: Segmentation fault (core = dumped) Among other build errors which I posted about the other day. In other = words, both clang and gcc (I've tried both) on the PI with -current = won't build enough of the sources to self-host. So, again, what I was wondering was: 4. Using the amd64 VM as the build host, how do I replicate the same = trick that freebsd-arm-tools is evidently pulling off to build an ARM = kernel for the PI? I've looked at the scripts themselves, obviously, = but I must be missing something because every time I try to set up the = same TARGET_ARCH environment my kernel cross-build falls over right away = with: In file included from ../../../arm/arm/genassym.c:33: In file included from ../../../sys/proc.h:62: ../../../sys/pcpu.h:188:1: error: static_assert failed "compile-time = assertion failed" CTASSERT((PAGE_SIZE / sizeof(struct pcpu)) * sizeof(struct pcpu) =3D=3D = PAGE_SIZE); = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ ../../../sys/systm.h:100:21: note: expanded from macro 'CTASSERT' #define CTASSERT(x) _Static_assert(x, "compile-time assertion = failed") ^ ~ 1 error generated. *** Error code 1 Thanks! - Jordan On Jun 26, 2013, at 10:31 PM, Brett Wynkoop = wrote: > My last cross compile was back in December and I just used Tim's > scripts. It took days because my only x86 FreeBSD box with enough = disk > space was a 500Mhz P3 with 256Mb ram. That box is now dead and I did > my last build world and kernel compile with sources from April on the > Pi. Nothing special just normal FreeBSD kernel and world builds, but > now with current sources no Joy. =20 >=20 > If you want I can pass you my April source tree as I preserved it. It > may bring more joy for you than current.