title: undefined reference compiling taskwarrior on arm chromebook
body: <p>I tried to build task-2.5.1 on my armv81 chromebook inside a termux session. It didn't work due build dependencies so I installed them then uncompressed and started in a fresh new directory. When I ran <code>make VERBOSE=1</code> I got an <code>undefined reference to __atomic_fetch_add_4</code> when linking...</p>
  
  <pre class="lang-none prettyprint-override"><code>[ 98%] Linking CXX executable lex
  cd /data/data/com.termux/files/home/src/task-2.5.1/src &amp;&amp; /data/data/com.termux/files/usr/bin/cmake -E cmake_link_script CMakeFiles/lex_executable.dir/link.txt --verbose=1
  /data/data/com.termux/files/usr/bin/c++  -Wall -Wsign-compare -Wreturn-type -std=c++11 -stdlib=libc++  -O3 -DNDEBUG  -rdynamic CMakeFiles/lex_executable.dir/lex.cpp.o  -o lex libtask.a commands/libcommands.a columns/libcolumns.a libtask.a -lgnutls -luuid
  /data/data/com.termux/files/usr/bin/arm-linux-androideabi-ld: libtask.a(Nibbler.cpp.o): in function `Nibbler::Nibbler(Nibbler const&amp;)':
  Nibbler.cpp:(.text+0x8c): undefined reference to `__atomic_fetch_add_4'
  /data/data/com.termux/files/usr/bin/arm-linux-androideabi-ld: libtask.a(Nibbler.cpp.o): in function `Nibbler::operator=(Nibbler const&amp;)':
  Nibbler.cpp:(.text+0xe0): undefined reference to `__atomic_fetch_add_4'
  /data/data/com.termux/files/usr/bin/arm-linux-androideabi-ld: Nibbler.cpp:(.text+0x104): undefined reference to `__atomic_fetch_add_4'
  /data/data/com.termux/files/usr/bin/arm-linux-androideabi-ld: libtask.a(Nibbler.cpp.o): in function `Nibbler::~Nibbler()':
  Nibbler.cpp:(.text+0x174): undefined reference to `__atomic_fetch_add_4'
  clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
  make[2]: *** [src/CMakeFiles/lex_executable.dir/build.make:90: src/lex] Error 1
  make[2]: Leaving directory '/data/data/com.termux/files/home/src/task-2.5.1'
  make[1]: *** [CMakeFiles/Makefile2:175: src/CMakeFiles/lex_executable.dir/all] Error 2
  make[1]: Leaving directory '/data/data/com.termux/files/home/src/task-2.5.1'
  make: *** [Makefile:152: all] Error 2
  </code></pre>
  
  <p>I found <a href="https://github.com/riscv/riscv-gnu-toolchain/issues/183" rel="nofollow noreferrer">this discussion</a> about undefined references in arm builds. I tried adding a -latomic to CMakeFiles/task_executable.dir/link.txt but it didn't change the output.</p>
  
  <p>Any ideas how to fix this?</p>