Source: wsclean Version: 3.1-1 Severity: important Tags: ftbfs patch Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: i...@hack3r.moe
Dear maintainer, wsclean failed to build on riscv64: ``` [100%] Built target wsclean-shared /usr/bin/ld: libwsclean.a(msgridderbase.cpp.o): in function `MSGridderBase::getAvailableMemory(double, double)': ./obj-riscv64-linux-gnu/./gridding/msgridderbase.cpp:300: undefined reference to `__atomic_exchange_1' collect2: error: ld returned 1 exit status make[3]: *** [CMakeFiles/wsclean.dir/build.make:154: wsclean] Error 1 make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-riscv64-linux-gnu' make[2]: *** [CMakeFiles/Makefile2:286: CMakeFiles/wsclean.dir/all] Error 2 make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-riscv64-linux-gnu' make[1]: *** [Makefile:139: all] Error 2 make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-riscv64-linux-gnu' dh_auto_build: error: cd obj-riscv64-linux-gnu && make -j4 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2 make: *** [debian/rules:10: binary-arch] Error 25 dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2 ``` Full buildd log: https://buildd.debian.org/status/fetch.php?pkg=wsclean&arch=riscv64&ver=3.1-1&stamp=1653411048&raw=0 Attached is a patch that links libatomic on riscv64 and fixes FTBFS, tested on my QEMU riscv64 machine. Please let me know if I missed something. Cheers, Eric -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 5.18.0-4-amd64 (SMP w/8 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
Description: Link libatomic against wsclean-lib on riscv64 and fix FTBFS Author: Eric Long <i...@hack3r.moe> Last-Update: 2022-08-26 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -381,6 +381,9 @@ add_library(wsclean-lib STATIC ${WSCLEANFILES}) target_link_libraries(wsclean-lib PRIVATE pybind11::embed ${ALL_LIBRARIES}) +if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "riscv64") + target_link_libraries(wsclean-lib PRIVATE -latomic) +endif() set_target_properties(wsclean-lib PROPERTIES OUTPUT_NAME wsclean) set_target_properties(wsclean-lib PROPERTIES SOVERSION ${WSCLEAN_VERSION_SO})