未定义的参考编译 taskwarrior on arm chromebook

undefined reference compiling taskwarrior on arm chromebook

我试图在 termux 会话中在我的 armv81 chromebook 上构建 task-2.5.1。由于构建依赖性,它没有工作,所以我安装它们然后解压缩并在一个新的新目录中启动。当我 运行 make VERBOSE=1 我在链接时得到一个 undefined reference to __atomic_fetch_add_4...

[ 98%] Linking CXX executable lex
cd /data/data/com.termux/files/home/src/task-2.5.1/src && /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&)':
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&)':
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

我发现 this discussion 关于 arm 构建中的未定义引用。我尝试将 -latomic 添加到 CMakeFiles/task_executable.dir/link.txt 但它没有更改输出。

有什么解决办法吗?

非常感谢 wbsch in this issue (posted just after this one) for the link to the known fix 在我的机器上成功删除了 CMakeLists.txt 中的三行。