Your message dated Sat, 05 Aug 2017 20:53:45 +0000
with message-id <e1de64v-0004zj...@fasolo.debian.org>
and subject line Bug#801881: fixed in wrk 4.0.2-2
has caused the Debian Bug report #801881,
regarding Package wrk FTBFS on mips and mipsel
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 ow...@bugs.debian.org
immediately.)


-- 
801881: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801881
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: wrk
Version: 4.0.1-2
Severity: normal
Tags: sid
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

Package wrk_4.0.1-2 FTBFS on mips and mipsel with following message:
/«PKGBUILDDIR»/src/stats.c:24: undefined reference to `__sync_fetch_and_add_8'
/«PKGBUILDDIR»/src/stats.c:28: undefined reference to 
`__sync_val_compare_and_swap_8'

mips:
https://buildd.debian.org/status/fetch.php?pkg=wrk&arch=mips&ver=4.0.1-2&stamp=1438099809

mipsel:
https://buildd.debian.org/status/fetch.php?pkg=wrk&arch=mipsel&ver=4.0.1-2&stamp=1438028452

I have attached a patch that resolves this issue on mips and mipsel.
Could you please include this patch?

I suspect that this solution can be used for powerpc also, if powepc arch is 
included in patch, but I do not have powerpc machine to test this.

Thank you!

Regards,
Jurica
diff -upNr wrk-4.0.1-orig/debian/rules wrk-4.0.1/debian/rules
--- wrk-4.0.1-orig/debian/rules	2015-04-17 00:48:57.000000000 +0000
+++ wrk-4.0.1/debian/rules	2015-10-14 13:48:53.000000000 +0000
@@ -1,5 +1,12 @@
 #!/usr/bin/make -f
 
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),mips mipsel))
+	LIBS += -latomic
+	export LIBS
+endif
+
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
diff -upNr wrk-4.0.1-orig/src/stats.c wrk-4.0.1/src/stats.c
--- wrk-4.0.1-orig/src/stats.c	2015-03-24 10:03:52.000000000 +0000
+++ wrk-4.0.1/src/stats.c	2015-10-14 13:54:30.000000000 +0000
@@ -21,12 +21,12 @@ void stats_free(stats *stats) {
 
 int stats_record(stats *stats, uint64_t n) {
     if (n >= stats->limit) return 0;
-    __sync_fetch_and_add(&stats->data[n], 1);
-    __sync_fetch_and_add(&stats->count, 1);
+    __atomic_fetch_add(&stats->data[n], 1, __ATOMIC_SEQ_CST);
+    __atomic_fetch_add(&stats->count, 1, __ATOMIC_SEQ_CST);
     uint64_t min = stats->min;
     uint64_t max = stats->max;
-    while (n < min) min = __sync_val_compare_and_swap(&stats->min, min, n);
-    while (n > max) max = __sync_val_compare_and_swap(&stats->max, max, n);
+    while (n < min) min = __atomic_compare_exchange(&stats->min, &min, &n, false,__ATOMIC_SEQ_CST,__ATOMIC_SEQ_CST);
+    while (n > max) max = __atomic_compare_exchange(&stats->max, &max, &n, false,__ATOMIC_SEQ_CST,__ATOMIC_SEQ_CST);
     return 1;
 }
 

--- End Message ---
--- Begin Message ---
Source: wrk
Source-Version: 4.0.2-2

We believe that the bug you reported is fixed in the latest version of
wrk, 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 801...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Robert Edmonds <edmo...@debian.org> (supplier of updated wrk 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 ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 05 Aug 2017 16:04:19 -0400
Source: wrk
Binary: wrk
Architecture: source amd64
Version: 4.0.2-2
Distribution: unstable
Urgency: medium
Maintainer: Robert Edmonds <edmo...@debian.org>
Changed-By: Robert Edmonds <edmo...@debian.org>
Description:
 wrk        - HTTP benchmarking tool
Closes: 801881 855118
Changes:
 wrk (4.0.2-2) unstable; urgency=medium
 .
   [ Christos Trochalakis ]
   * Modify previous mips FTBFS patch rendering wrk unusable in all
     architectures. Thanks to Rinat Ibragimov (Closes: #855118)
   * Fix build on mips architectures (Closes: #801881)
Checksums-Sha1:
 a1051bd5b6dea03ed3b9c6da95f0359cf567772e 1829 wrk_4.0.2-2.dsc
 09c8e3d8cee8318c73220cc8e1b8360a7457ae41 8018 wrk_4.0.2-2.debian.tar.gz
 c69f23b4a498319bd5bf4ecbbb745d14c0a35f09 67250 wrk-dbgsym_4.0.2-2_amd64.deb
 38fc768e4397558c7e483e8adc47a698f868778d 5652 wrk_4.0.2-2_amd64.buildinfo
 fd9c664ee40a81ba258bc9eefee57893b8b2f141 39084 wrk_4.0.2-2_amd64.deb
Checksums-Sha256:
 a9aba21b285643be2d5e423799832e367be285658630829854a8d9f8c74f1a4d 1829 
wrk_4.0.2-2.dsc
 bb26ca45df5bf09e9cffd9ced07a2487b55db6355e6360f408977c257016c25b 8018 
wrk_4.0.2-2.debian.tar.gz
 3ff77fc6f690ac2e6a74e9488b2a1dbd172a7b3451db0d090c9fbec53df0f07a 67250 
wrk-dbgsym_4.0.2-2_amd64.deb
 91a7d65a755b4a39c21debf2833b02fb1edc8e232c135565829a850a7fbf3dc5 5652 
wrk_4.0.2-2_amd64.buildinfo
 428795e95b6f18634dc244f538410d2d09d4dc87354be15800f2b84ca56f3c49 39084 
wrk_4.0.2-2_amd64.deb
Files:
 916f7b2875f048036879bf9dddaa718b 1829 web optional wrk_4.0.2-2.dsc
 7e9cbfebb5e0d7bf4d315661b2664615 8018 web optional wrk_4.0.2-2.debian.tar.gz
 fd9114a386f5f386de915df295054e98 67250 debug extra wrk-dbgsym_4.0.2-2_amd64.deb
 cf3b67d95e11da0a5bc815c4d5d4dab4 5652 web optional wrk_4.0.2-2_amd64.buildinfo
 9fe0752f63ca16459da3ced78994be99 39084 web optional wrk_4.0.2-2_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE3z2W7rOCeCDzAmZcAYF6sKr2za4FAlmGJnAACgkQAYF6sKr2
za6jBg//U7xaQ3Z/LL807pg7dAfh6wBNFFeKT+MlxceOs8WluDDY8nnvI7c7c4NS
q1hzg3A7U52i73anbmS+JIftIGXdrtix4pTduBol9Utahb+9Pv+azrzx0ezxCqex
xZj/Xir8C9znwbz6ymP3YzIN2Grq6QUXcIPDNNPYUhQofte4QVshQJDitvOtEfTB
CSPK72eK6hyPZF5tQyp4x0U0cPUupH6exa1fm1fTkTra/VpJJ1tKM1LG3rA6PHVL
nhq0iAQBAXl5UYkcfMHaLUhFWt/SvM69GLkiQxj85cpErTVgRh/CAemZimh4T8kV
NO7lQXaCD6b3CQT0P1nKmeJt1g+rpXz1AaYvfntIzcx5XGkg9CRc3oavJ+Cd9XJn
Cz4p7jz6+Z51djZgAcP+SoobzVHrzyNFxFdYysSNQ5NA7D+xjbmSZ6sRaBitSY4V
NqIP+FPKimMo/AG4E3jkHlWbVQDWJHK1/v+uy+VDWFOnsZHIkxi9SoYwp/D3sVyG
o2JsJSbC0BJrjYR3RjP80kLhZSDBeDdRncFIGtZyd5hLeCO7JB3Sa30uzry41OHJ
2sOv41YyX2xhEkDHX8UMvjezdBxq2MGTrhexLrPn0P1I2XETl20V7z53RdQAA0N6
RLjE7YVnaMi3svPDnD+u5cio63x9Mn8aKZZ1M3sNf0eRyWf2EjY=
=0oxo
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to