Building Notes

Missing aclocal-1.16.5

Files generated by autotools (with autoconf 2.71) are commited to the git repository. When working on a git clone of the author’s repo, but on a machine with an older automake, you will encounter a missing aclocal-1.16.5 because the older automake (eg, aclocal 1.15) will not update a newer m4 local cache.

Out-of-tree builds

Out-of-tree build configurations are broken because the src/Makefile.am used hard-coded include path -I../lzma/C instead of using the $top_srcdir.

  • Replace -I../lzma/C with -I$(top_srcdir)/lzma/C
  • fixed in 5b67157 (autotools branch)

Missing rule

  • No rule to make libreflex.a and libviiz.a - only building at the top of the tree is reliable because src, lib SUBDIR’s are interdependent.

Cross compilation / Binary portability

The upstream autotools setup detects the AVX2/AVX512/NEON capabilities of the building host, and enables those capabilities into the built binary. This means:

  • building on a host without AVX2 will produce a binary that does not have AVX2 capabilities
  • similarily for AVX512
  • SSE2 support is assumed when building on x86-64 with SSE2 by default. The produced binary requires a runtime environment with SSE2. This binary will crash when run on a CPU without SSE2. This is not a problem for mainstream use because most commercially-available x86-64 CPUs include SSE2, but may be a problem for emulation if the emulator does not support SSE2, like Xeon Phi, used in several supercomputers cca 2014 - Issue #368 was not acknowledged by the author, claiming “binary portability”. It is fixed in 201c508 where SSE2 is detected at runtime. This patch is part of the Mergesium autotools branch.
  • Building on ARMv7 without NEON will produce a binary without NEON capabilities, even if the compiler supports NEON. This is fixed in b4ba7e5 - NEON capability is always built in, detected at runtime. NEON code runs only if the running CPU supports it. This patch is part of the Mergesium autotools branch.

Since the building machine’s CPU is probed (with -march=native), cross-compilation was not possible. This was fixed in 476b94c (autotools branch).

Testing Notes

Test Suite organization

Several integration tests exist, but they do not use automake test infrastructure; instead they use the home-grown script tests/verify.sh which can be run with make test at the top; Neither tests nor results will appear in the Testing UI.

Individual tests are not exposed to automake’s Parallel Harness API, and thus cannot be run individually / live-tested, nor debugged with one click. launch.json can be used to manually configure the debug environment for each test where necessary.

More work is necessary as followup to 753178d to expose individual tests and make them debugger friendly.

Mergesium Autotools Fork

Mergesium will maintain a fork of this project where autotools configuration will be maintained to GNU/autotools coding standards.