[build2] build2 not Compiling on Raspberry Pi ARMv7 Architecture

Markus Pawellek markus.pawellek at mailbox.org
Thu Jul 16 20:53:59 UTC 2020

Boris Kolpackov <boris at codesynthesis.com> wrote:

> Markus Pawellek <markus.pawellek at mailbox.org> writes:
> > I am using a Raspberry Pi Model 3B with Raspbian
> > and GCC version 8.3.0 for some home projects
> I am also pretty sure you are using 32-bit Raspbian.

You are completely right.

> The problem here is that on 32-bit ARM atomic 64-bit integer operations
> are not lock-free. There are three ways to fix this:
> 1. Run in the 64-bit mode. I've heard there is now 64-bit Raspbian.
> 2. Force use of non-lock-free atomics by defining the
>    LIBBUILD2_ATOMIC_NON_LOCK_FREE macro (you will need to perform
>    a custom bootstrap to pass the relevant -D option in all the places).
>    This will also most likely result in pretty poor performance.

Thank you.
I will take a look as soon as possible into those alternatives.
I do not know very much about the actual implementation of build2
but with respect to the second alternative,
even if it would suffer from a poor performance, 
it may not be a dramatic problem, 
because in my opinion on a Raspberry Pi 
one is typically dealing with small code projects.

> 3. We could implement a 32-bit based spin-lock for this case but I am
>    wondering if it's worth the complexity.

No, it is definitely not worth the complexity, I think.
I only wanted to get some information concerning 
the error message and maybe a workaround.
So for now, I have everything I need ;)

More information about the users mailing list