[build2] build2 not Compiling on Raspberry Pi ARMv7 Architecture

Markus Pawellek markus.pawellek at mailbox.org
Sun Jan 24 17:52:44 UTC 2021


Boris Kolpackov <boris at codesynthesis.com> wrote:

> In fact, the reason we have those checks is that we don't actually
> know how bad is the performance hit. If it's not much, we could just
> remove them.
> 
> So in this light it would have actually been useful to try to build
> build2 with both 32-bit Raspbian (with these checks disabled) and
> then with 64-bit and compare how long it takes.

It took me some time to get the hardware,
but I was able to successfully build the build2 toolchain out of the box
on an ARM-based 64-bit (AARCH64) machine with Armbian installed.
Until now, I was not able to measure the speed of the build.

> The way I would do it is get the build2-toolchain package (skipping
> the install script) and then do a timed local build:
> 
> $ cd build2-toolchain
> $ time ./build.sh --local --make make -j 4 --install-dir /tmp/install g++
> 
> For the 32-bit build I would just edit build2/libbuild2/target.hxx and
> add `#define LIBBUILD2_ATOMIC_NON_LOCK_FREE` on top to disable the checks.
> 
> If you do get to run this test, I would be interested to hear the result.

Even after doing the given adjustments,
I was not able to compile for ARMv7 with Raspbian on the Raspberry Pi.
Given GCC version 8.3.0, I have got a lot of warnings concerning
initialization and iterators due to some changes since GCC 7.1.
After 11 min, the compilation aborted due to a linker error when linking 'b-boot' in the directory 'build2'.
The error message basically boils down to undefined references to '__atomic_store_8' and '__atomic_load_8', as can be seen in the following.

/usr/bin/ld: libbuild2/rule.b.o: in function `build2::mtime_target::mtime(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > >) const':
rule.cxx:(.text._ZNK6build212mtime_target5mtimeENSt6chrono10time_pointINS1_3_V212system_clockENS1_8durationIxSt5ratioILx1ELx1000000000EEEEEE[_ZNK6build212mtime_target5mtimeENSt6chrono10time_pointINS1_3_V212system_clockENS1_8durationIxSt5ratioILx1ELx1000000000EEEEEE]+0x74): undefined reference to `__atomic_store_8'
/usr/bin/ld: libbuild2/target.b.o: in function `build2::mtime_target::mtime() const':
target.cxx:(.text+0x23a8): undefined reference to `__atomic_load_8'
/usr/bin/ld: libbuild2/target.b.o: in function `build2::mtime_target::mtime() const':
target.cxx:(.text+0x23a8): undefined reference to `__atomic_load_8'
/usr/bin/ld: libbuild2/cc/link-rule.b.o: in function `build2::mtime_target::load_mtime(butl::basic_path<char, butl::any_path_kind<char> > const&) const':
link-rule.cxx:(.text._ZNK6build212mtime_target10load_mtimeERKN4butl10basic_pathIcNS1_13any_path_kindIcEEEE[_ZNK6build212mtime_target10load_mtimeERKN4butl10basic_pathIcNS1_13any_path_kindIcEEEE]+0xa4): undefined reference to `__atomic_load_8'
/usr/bin/ld: link-rule.cxx:(.text._ZNK6build212mtime_target10load_mtimeERKN4butl10basic_pathIcNS1_13any_path_kindIcEEEE[_ZNK6build212mtime_target10load_mtimeERKN4butl10basic_pathIcNS1_13any_path_kindIcEEEE]+0x174): undefined reference to `__atomic_store_8'



More information about the users mailing list