Raspberry pi not ready to self-host yet?

Jordan K. Hubbard jordan.hubbard at gmail.com
Thu Jun 27 06:17:38 UTC 2013


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=/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) == 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 at 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.  
> 
> If you want I can pass you my April source tree as I preserved it.  It
> may bring more joy for you than current.



More information about the freebsd-arm mailing list