Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jun 2013 23:17:34 -0700
From:      "Jordan K. Hubbard" <jordan.hubbard@gmail.com>
To:        Brett Wynkoop <freebsd-arm@wynn.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Raspberry pi not ready to self-host yet?
Message-ID:  <DC57FE36-8A1B-4372-A3E8-82CCB9730FDC@turbofuzz.com>
In-Reply-To: <20130627013142.5fdb2544@ivory.wynn.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 =
<Spelling=3D/usr/include/c++/4.2/bits/c++config.h:76:38>: 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 <freebsd-arm@wynn.com> =
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DC57FE36-8A1B-4372-A3E8-82CCB9730FDC>