Your message dated Tue, 21 Feb 2023 15:19:32 +0000
with message-id <[email protected]>
and subject line Bug#1030295: fixed in tomopy 1.10.4+ds1-8
has caused the Debian Bug report #1030295,
regarding tomopy: please fix build on atomic architectures
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1030295: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030295
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: tomopy
Version: 1.10.4+ds1-7
tags: patch
Hello, looks like tomopy is FTBFS on architectures where libatomic is needed
I created a patch from CheckAtomic.cmake (cmake-extras-modules package), and I
plan to submit upstream
diff -Nru tomopy-1.10.4+ds1/debian/patches/fix-build.patch
tomopy-1.10.4+ds1/debian/patches/fix-build.patch
--- tomopy-1.10.4+ds1/debian/patches/fix-build.patch 1970-01-01
00:00:00.000000000 +0000
+++ tomopy-1.10.4+ds1/debian/patches/fix-build.patch 2023-02-01
10:07:39.000000000 +0000
@@ -0,0 +1,146 @@
+Description: Link with latomic where needed
+Author: Gianfranco Costamagna <[email protected]>
+Bug-Debian: https://bugs.debian.org/
+Forwarded:
+Last-Update: 2023-02-01
+
+Index: tomopy-1.10.4+ds1/CMakeLists.txt
+===================================================================
+--- tomopy-1.10.4+ds1.orig/CMakeLists.txt
++++ tomopy-1.10.4+ds1/CMakeLists.txt
+@@ -40,6 +40,7 @@
+ include(BuildSettings)
+ include(Packages)
+ include(ClangFormat)
++include(CheckAtomic)
+
+
################################################################################
+ # tomopy source
+Index: tomopy-1.10.4+ds1/PTL/cmake/Modules/Packages.cmake
+===================================================================
+--- tomopy-1.10.4+ds1.orig/PTL/cmake/Modules/Packages.cmake
++++ tomopy-1.10.4+ds1/PTL/cmake/Modules/Packages.cmake
+@@ -165,6 +165,9 @@
+
+ endif()
+
++if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
++ list(APPEND EXTERNAL_LIBRARIES "atomic")
++endif()
+
+
################################################################################
+ #
+Index: tomopy-1.10.4+ds1/cmake/Modules/CheckAtomic.cmake
+===================================================================
+--- /dev/null
++++ tomopy-1.10.4+ds1/cmake/Modules/CheckAtomic.cmake
+@@ -0,0 +1,95 @@
++# SPDX-FileCopyrightText: 2003-2018 University of Illinois at
Urbana-Champaign.
++#
++# SPDX-License-Identifier: BSD-3-Clause
++
++#[=======================================================================[.rst:
++CheckAtomic
++-----------
++
++Check if the compiler supports std:atomic out of the box or if libatomic is
++needed for atomic support. If it is needed libatomicis added to
++``CMAKE_REQUIRED_LIBRARIES``. So after running CheckAtomic you can use
++std:atomic.
++
++Since 5.75.0.
++#]=======================================================================]
++
++include(CheckCXXSourceCompiles)
++include(CheckLibraryExists)
++
++# Sometimes linking against libatomic is required for atomic ops, if
++# the platform doesn't support lock-free atomics.
++
++function(check_working_cxx_atomics varname)
++ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
++ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11")
++ check_cxx_source_compiles("
++ #include <atomic>
++ std::atomic<int> x;
++ std::atomic<short> y;
++ std::atomic<char> z;
++ int main() {
++ ++z;
++ ++y;
++ return ++x;
++ }
++ " ${varname})
++ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
++endfunction()
++
++function(check_working_cxx_atomics64 varname)
++ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
++ set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}")
++ check_cxx_source_compiles("
++ #include <atomic>
++ #include <cstdint>
++ std::atomic<uint64_t> x (0);
++ int main() {
++ uint64_t i = x.load(std::memory_order_relaxed);
++ return 0;
++ }
++ " ${varname})
++ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
++endfunction()
++
++# Check for (non-64-bit) atomic operations.
++if(MSVC)
++ set(HAVE_CXX_ATOMICS_WITHOUT_LIB True)
++elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE)
++ # First check if atomics work without the library.
++ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
++ # If not, check if the library exists, and atomics work with it.
++ if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
++ check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
++ if(HAVE_LIBATOMIC)
++ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
++ if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
++ message(FATAL_ERROR "Host compiler must support std::atomic!")
++ endif()
++ else()
++ message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot
find it.")
++ endif()
++ endif()
++endif()
++
++# Check for 64 bit atomic operations.
++if(MSVC)
++ set(HAVE_CXX_ATOMICS64_WITHOUT_LIB True)
++elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE)
++ # First check if atomics work without the library.
++ check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
++ # If not, check if the library exists, and atomics work with it.
++ if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
++ check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
++ if(HAVE_CXX_LIBATOMICS64)
++ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++ check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
++ if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
++ message(FATAL_ERROR "Host compiler must support 64-bit std::atomic!")
++ endif()
++ else()
++ message(FATAL_ERROR "Host compiler appears to require libatomic for 64-bit
operations, but cannot find it.")
++ endif()
++ endif()
++endif()
+Index: tomopy-1.10.4+ds1/cmake/Modules/Packages.cmake
+===================================================================
+--- tomopy-1.10.4+ds1.orig/cmake/Modules/Packages.cmake
++++ tomopy-1.10.4+ds1/cmake/Modules/Packages.cmake
+@@ -280,6 +280,9 @@
+
+ endif()
+
++if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
++ list(APPEND TOMOPY_EXTERNAL_LIBRARIES "atomic")
++endif()
+
+
################################################################################
+ #
diff -Nru tomopy-1.10.4+ds1/debian/patches/series
tomopy-1.10.4+ds1/debian/patches/series
--- tomopy-1.10.4+ds1/debian/patches/series 2023-01-31 10:21:12.000000000
+0000
+++ tomopy-1.10.4+ds1/debian/patches/series 2023-02-01 10:07:39.000000000
+0000
@@ -2,3 +2,4 @@
0002-Don-t-try-to-git-clone-the-PTL-submodule.patch
cmake-args.patch
0004-Check-for-appropriate-version-of-libufo.patch
+fix-build.patch
thanks for considering it,
Gianfranco
OpenPGP_signature
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Source: tomopy
Source-Version: 1.10.4+ds1-8
Done: Roland Mas <[email protected]>
We believe that the bug you reported is fixed in the latest version of
tomopy, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Roland Mas <[email protected]> (supplier of updated tomopy package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Tue, 21 Feb 2023 15:40:46 +0100
Source: tomopy
Binary: python3-tomopy python3-tomopy-dbgsym
Architecture: source amd64
Version: 1.10.4+ds1-8
Distribution: unstable
Urgency: medium
Maintainer: Debian PaN Maintainers
<[email protected]>
Changed-By: Roland Mas <[email protected]>
Description:
python3-tomopy - Python package for tomographic data processing and image
reconstr
Closes: 1030295
Changes:
tomopy (1.10.4+ds1-8) unstable; urgency=medium
.
* Bug fix: "please fix build on atomic architectures", thanks to
Gianfranco Costamagna (Closes: #1030295).
Checksums-Sha1:
95952e90221b3b9df9b6dc2b3ec7aaecb5ae0031 2507 tomopy_1.10.4+ds1-8.dsc
709307b8989bec9295cd8e1ca16699168c1f0ad9 6880 tomopy_1.10.4+ds1-8.debian.tar.xz
71cee891cd91c7ffc2c88a443d54edcbd87951f8 1746404
python3-tomopy-dbgsym_1.10.4+ds1-8_amd64.deb
7023f9d67ee0b737f1c1708ce4f2e5721b221d02 3674440
python3-tomopy_1.10.4+ds1-8_amd64.deb
75e9c64a7d06cd6f0961969300801bada073f922 23488
tomopy_1.10.4+ds1-8_amd64.buildinfo
Checksums-Sha256:
ca84bbca0208bbb5e3a749072ac43a64a42e7f3c09fb09af42d0ea632ef56a30 2507
tomopy_1.10.4+ds1-8.dsc
bbbc61723a53ece3dad0ca31207962911e559254566fdd0f93fc97f6e1481f34 6880
tomopy_1.10.4+ds1-8.debian.tar.xz
a0c98c8de7573edf54a5341fcf4167088c3428a20035d1d43bc262637e40a76a 1746404
python3-tomopy-dbgsym_1.10.4+ds1-8_amd64.deb
7e0109eeb04de385da6761a0e0026868b414f3bcc06628fddc89ae4103a7a8ec 3674440
python3-tomopy_1.10.4+ds1-8_amd64.deb
613442fbf0580c8ce329d7c1ea9fbc02b931690037c04ef3f967773bf94271cb 23488
tomopy_1.10.4+ds1-8_amd64.buildinfo
Files:
d2e8f90fa388dce455f58c5a3e7cae03 2507 contrib/python optional
tomopy_1.10.4+ds1-8.dsc
ebdb1f7be1dcb88d08fa1fbc6b111aac 6880 contrib/python optional
tomopy_1.10.4+ds1-8.debian.tar.xz
8c1f7595b1c2cbee580f5f7818b960fc 1746404 contrib/debug optional
python3-tomopy-dbgsym_1.10.4+ds1-8_amd64.deb
0f42cec7ff878462dab9160e1b363862 3674440 contrib/python optional
python3-tomopy_1.10.4+ds1-8_amd64.deb
2798add4ee94ec39e29e36bd3b990245 23488 contrib/python optional
tomopy_1.10.4+ds1-8_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEtBU2D1kett1zr/uD0w3s0lmTIvwFAmP029YACgkQ0w3s0lmT
IvzTphAAoQ9FmSakWDjHQuFbXnnnx6NjCBmE2NaMnfRibItPan/4v/vWY2DSd3uw
l2Xi8das6/KfAOjEtbGSkVYX9j0Cf4SmJGOHkcEZbOSpO0hBpSHP6EBeuIJ/ZjH8
9QO+4GyPaArNvopXW42xtZ5KP57BAOT0uYcqeAnZnbhY+tuKS8O+4SBLICwJXTc2
/ON2Dq/5eUpDSYLjiyEHqFydf7n58xEUyb2IgB9CsIkp1uTSlVKLYSM35PaPD7w1
Au7WN/nXpCLPtF0v69Q1OLlvrUfxHNg7Vy9CBlMpZkMKB4UZ+6scuZRjO6qsQ65J
f0+1SpYI4pHGe+K6BVMF3t76wqAM9fwnQzgJ4UtjguylecLgKFsJAe6DVWK7S1oa
Fh/qCbOFkF3ajbSR+Znz7J3r+HUkrqKg7iF9MjiaGdXDt8523sI38BG2SVwSKQcm
YBWWy3vpnfuy4/kiJ8K06yJIjZw+2IVdFkJG/qqz8hXGjAfB5B4q7kFVnWGHDkLA
mxPAHLvUfV19+pyxxbmXiiIJsnmfggTlotvIMtx3cOTSpg+7aAcdNm7Fm21OPZYQ
/RNAf/bsynEt0Xcyyr0NBY0UAPAlCTkX49RUASt7HCQW7agYkJKXduQfAIaJg5r7
QcSdsNeCzicQK80zCY4fNURQZZphF7RzQQIZ+uEoaAxBLOUnszA=
=u7bX
-----END PGP SIGNATURE-----
--- End Message ---