[build2] build2 not Compiling on Raspberry Pi ARMv7 Architecture

Boris Kolpackov boris at codesynthesis.com
Thu Jul 16 19:30:11 UTC 2020


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.


> and I wanted to use build2 as the build system for my code.
> But the compilation of build2 fails with the following error messages.
> 
> In file included from libbuild2/utility.cxx:12:
> ./libbuild2/target.hxx:1502:4: error: #error timestamp is not lock-free on this architecture
>  #  error timestamp is not lock-free on this architecture

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.

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



More information about the users mailing list