Your message dated Tue, 21 Dec 2021 08:48:54 +0000
with message-id <[email protected]>
and subject line Bug#1002052: fixed in process-cpp 3.0.1-9
has caused the Debian Bug report #1002052,
regarding process-cpp: FTBFS on riscv64, linked with -lpthread instead of
-pthread
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.)
--
1002052: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002052
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: process-cpp
Version: 3.0.1-8
Severity: normal
Tags: ftbfs patch upstream
User: [email protected]
Usertags: riscv64
Hi,
process-cpp fails to build on riscv64 with the following failure:
| Linking CXX shared library libprocess-cpp.so
| cd /<<PKGBUILDDIR>>/obj-riscv64-linux-gnu/src && /usr/bin/cmake -E
cmake_link_script CMakeFiles/process-cpp.dir/link.txt --verbose=1
| /usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -std=c++11 -Wall -fno-strict-aliasing -fvisibility=hidden
-fvisibility-inlines-hidden -pedantic -Wextra -Werror -Wno-error=format
-Wl,--version-script,/<<PKGBUILDDIR>>/symbols.map -Wl,-z,relro
-Wl,--no-undefined -shared -Wl,-soname,libprocess-cpp.so.3 -o
libprocess-cpp.so.3.0.0 CMakeFiles/process-cpp.dir/core/posix/backtrace.cpp.o
CMakeFiles/process-cpp.dir/core/posix/child_process.cpp.o
CMakeFiles/process-cpp.dir/core/posix/exec.cpp.o
CMakeFiles/process-cpp.dir/core/posix/fork.cpp.o
CMakeFiles/process-cpp.dir/core/posix/process.cpp.o
CMakeFiles/process-cpp.dir/core/posix/process_group.cpp.o
CMakeFiles/process-cpp.dir/core/posix/signal.cpp.o
CMakeFiles/process-cpp.dir/core/posix/signalable.cpp.o
CMakeFiles/process-cpp.dir/core/posix/standard_stream.cpp.o
CMakeFiles/process-cpp.dir/core/posix/wait.cpp.o
CMakeFiles/process-cpp.dir/core/posix/this_process.cpp.o
CMakeFiles/process-cpp.dir/core/posix/linux/proc/process/oom_adj.cpp.o
CMakeFiles/process-cpp.dir/core/posix/linux/proc/process/oom_score.cpp.o
CMakeFiles/process-cpp.dir/core/posix/linux/proc/process/oom_score_adj.cpp.o
CMakeFiles/process-cpp.dir/core/posix/linux/proc/process/stat.cpp.o
CMakeFiles/process-cpp.dir/core/testing/cross_process_sync.cpp.o
CMakeFiles/process-cpp.dir/core/testing/fork_and_run.cpp.o
/usr/lib/riscv64-linux-gnu/libboost_iostreams.so.1.74.0
/usr/lib/riscv64-linux-gnu/libboost_system.so.1.74.0 -lpthread
| /usr/bin/ld: CMakeFiles/process-cpp.dir/core/posix/child_process.cpp.o: in
function `.L0 ':
| /usr/include/riscv64-linux-gnu/c++/11/bits/gthr-default.h:778: undefined
reference to `__atomic_exchange_1'
| collect2: error: ld returned 1 exit status
The full build log is available there:
https://buildd.debian.org/status/fetch.php?pkg=process-cpp&arch=riscv64&ver=3.0.1-8&stamp=1639996742&raw=0
The problem is that the linking is not done correctly, it uses -lpthread
meaning linking with the pthread library, instead of -pthread which
means enable thread support, and which brings libatomic.so on riscv64.
This can be fixed by using the THREADS_PREFER_PTHREAD_FLAG option, which
is "highly recommended" according to the documentation, but
unfortunately not the default.
This is what the attached patch does, could you please include it in the
next upload?
Thanks,
Aurelien
--- process-cpp-3.0.1/debian/patches/0003-link-pthread.patch
+++ process-cpp-3.0.1/debian/patches/0003-link-pthread.patch
@@ -0,0 +1,19 @@
+Description: Link with -pthread instead of -lpthread
+ The canonical way to link with the thread library is to use -pthread, which
+ brings in additional libraries like libatomic.so on riscv64. However cmake
+ defaults to link with -lpthread which only bring the libpthread.so library.
+ Fortunately it has the option THREADS_PREFER_PTHREAD_FLAG for that, which is
+ "highly recommended" but not the default.
+Author: Aurelien Jarno <[email protected]>
+Last-Update: 2021-12-20
+
+--- process-cpp-3.0.1.orig/CMakeLists.txt
++++ process-cpp-3.0.1/CMakeLists.txt
+@@ -20,6 +20,7 @@ project(process-cpp)
+
+ find_package(Boost COMPONENTS iostreams system REQUIRED)
+ find_package(PkgConfig REQUIRED)
++set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads REQUIRED)
+
+ pkg_check_modules(PROPERTIES_CPP properties-cpp)
--- process-cpp-3.0.1/debian/patches/series
+++ process-cpp-3.0.1/debian/patches/series
@@ -1,2 +1,3 @@
0001-Don-t-run-tests.patch
0002-Reproducible-documentation.patch
+0003-link-pthread.patch
--- End Message ---
--- Begin Message ---
Source: process-cpp
Source-Version: 3.0.1-9
Done: Mike Gabriel <[email protected]>
We believe that the bug you reported is fixed in the latest version of
process-cpp, 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.
Mike Gabriel <[email protected]> (supplier of updated process-cpp 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: SHA256
Format: 1.8
Date: Tue, 21 Dec 2021 08:35:29 +0100
Source: process-cpp
Architecture: source
Version: 3.0.1-9
Distribution: unstable
Urgency: medium
Maintainer: Debian UBports Team <[email protected]>
Changed-By: Mike Gabriel <[email protected]>
Closes: 1002052
Changes:
process-cpp (3.0.1-9) unstable; urgency=medium
.
[ Mike Gabriel ]
* debian/changelog:
+ post-upload give credits to Chris Lamb for the patch regarding #961202.
* debian/control:
+ Add Rules-Requires-Root: field and set it to 'no'.
+ Bump Standards-Version: to 4.6.0. No changes needed.
+ Add B-Ds: rdfind, symbols.
* debian/*.lintian-overrides:
+ Drop files. Not required anymore.
* debian/{rules,libprocess-cpp-doc.install}:
+ Move doc files into doc:pkg's doc folder.
* debian/rules:
+ Enable all hardening build flags.
+ Clean-up duplicate files in API docs and use symlinks instead.
* debian/patches:
+ Add 1004-spelling-fixes.patch. Fix spelling of the word 'occurred'.
Thanks, lintian.
+ Rename patch files to match our patch naming scheme.
.
[ Aurelien Jarno ]
* debian/patches:
+ Add 0003-link-pthread.patch. Fix FTBFS on riscv64, link with -lpthread
instead of -pthread. (Closes: 1002052).
Checksums-Sha1:
db44aa2ede1f6b9df4dfaf218c519bee8353015e 2283 process-cpp_3.0.1-9.dsc
f92a5bbff0ba6a5a4d844741f92e8c4295d0d1af 8412 process-cpp_3.0.1-9.debian.tar.xz
efedd3d3d7620c61fa03403ab332546faca21042 8772
process-cpp_3.0.1-9_source.buildinfo
Checksums-Sha256:
c08ba02c2a28b6d5cd72c68407dfcf4fcc977f4beb3cd81dea28b6f5c5d4b3d9 2283
process-cpp_3.0.1-9.dsc
5357427f51704c2cb3768cd81bf1fb254ada7ff355ef656d14c253b322cf37fe 8412
process-cpp_3.0.1-9.debian.tar.xz
64e8f14b1f343e730c29c2f8ae65df05506f1dd75eba389ee603013a7d9bb29f 8772
process-cpp_3.0.1-9_source.buildinfo
Files:
7e0d6345bec240c03d43ec6347916dd0 2283 libs optional process-cpp_3.0.1-9.dsc
be37ec09412e703b674c6f59cfd97cda 8412 libs optional
process-cpp_3.0.1-9.debian.tar.xz
7c9b4c6a235ef4185cb8b2e973185cba 8772 libs optional
process-cpp_3.0.1-9_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJJBAEBCAAzFiEEm/uu6GwKpf+/IgeCmvRrMCV3GzEFAmHBj6wVHHN1bndlYXZl
ckBkZWJpYW4ub3JnAAoJEJr0azAldxsxc8wQAJ1P+VEKAx52PyBU3HoeIcbjnlHh
0dxGV49Y4GKvHh3HdgSwjbRDfazst3qd32bauFN5JVD57BmusNZrpETL+yFw/Isb
zowAtiocyNwvhNo50d6VdhagKKxEuu87Jqst84X7ETLYgoZXaBb9sKdGCFNkX9mu
LFOwFH7TXhVWKfouQfay/Oho69ZX6XenztRgmqM1ZIxJzLXQTp/MGOp1CJ/7MvLM
kmr7Wzroc5wIH9Lh+zej3LbwrFwxwhj7T1ET5JXD6P/jKdY/9pKg1OnRjy1Vi9bR
4TL9Ob4B8DvjeDt9fiRAkUQGCaSWiCspo8mfogZ2k1T2g7aacIR3NYv3jRSrLPCv
nicIBRybWARPbDHRvxHnKr+btoOYBJM9cwfZkZeMKFnayuCcEJ2QKu8Fl8NvIu9n
jozoW4zYg++icix7KX+7YD9Zuo59NoPCXuT64RSAn2ZTF78VD0Bjch0y3sdrbjqi
hplEzC3HRpwb6RsouwFDnaqjA5C52Kiluck1Wn2P1HWJVwH8QJe9/CVhJgk4xlNv
FSocAcBo0DNfjPp00ArbmjlZkYnhchd/B6UlFxYfy2jkWjBeSPeIC2Fl38n8F7vo
xSEVyXoHZ3dFuUCAkHQEOEgrfT4K8LkbW8rP8H2jGeclusG9/nciZV1a08oK562p
jw2In1ZNyD0AT7RN
=Ai4M
-----END PGP SIGNATURE-----
--- End Message ---