Your message dated Sat, 12 Aug 2017 16:17:12 +0000
with message-id <e1dgz68-0008kg...@fasolo.debian.org>
and subject line Bug#801881: fixed in wrk 4.0.2-2~deb9u1
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~deb9u1

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.
Christos Trochalakis <ctrochala...@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: Tue, 08 Aug 2017 10:31:41 +0300
Source: wrk
Binary: wrk
Architecture: source
Version: 4.0.2-2~deb9u1
Distribution: stretch
Urgency: medium
Maintainer: Robert Edmonds <edmo...@debian.org>
Changed-By: Christos Trochalakis <ctrochala...@debian.org>
Description:
 wrk        - HTTP benchmarking tool
Closes: 801881 855118
Changes:
 wrk (4.0.2-2~deb9u1) stretch; urgency=medium
 .
   * Rebuild for stretch.
 .
 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:
 7f888303a40951666defca0fab362c9f0fde0380 1857 wrk_4.0.2-2~deb9u1.dsc
 c3808060b2e2c1fb28077f2ad0cd8d5f3bcaf059 8109 wrk_4.0.2-2~deb9u1.debian.tar.gz
 a0b339e67f570f175695a504d64caef9d0148120 5957 
wrk_4.0.2-2~deb9u1_amd64.buildinfo
Checksums-Sha256:
 041c76cc5a95646717bc269a0513ad755f3e479286e6688b62894e136b9f7630 1857 
wrk_4.0.2-2~deb9u1.dsc
 b0d7ccca3c7efef1d9c4c611a801a08c9daadb3924a791abd4707bd73253a0c3 8109 
wrk_4.0.2-2~deb9u1.debian.tar.gz
 08bca00a79b14afdb2f76a5b544165b5b3a43f34ab3ebc718c4c1f9abb3c1a8d 5957 
wrk_4.0.2-2~deb9u1_amd64.buildinfo
Files:
 58e234e691eaf462231cd430a50d194c 1857 web optional wrk_4.0.2-2~deb9u1.dsc
 d1e1fe531214d77af120c023ac78ec65 8109 web optional 
wrk_4.0.2-2~deb9u1.debian.tar.gz
 0df2ac45be642ccb0cf66d0ee5994f08 5957 web optional 
wrk_4.0.2-2~deb9u1_amd64.buildinfo

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

iQIzBAEBCAAdFiEEf2SPbCEjyY+zKcgrETYmAKdH7NkFAlmKpScACgkQETYmAKdH
7Nl9JA//ZXKrYsrNhwlyVYT3IaEzK8rB45IafvtxI8B0zhLoVolOfJfdbUMRpJSz
PjQDsRjk5H3CSHG/1ZdZUP9PyVJl9/AlTTtCFlh/5+MVnSspaeZQCXl0M/pbvN/J
nYIdKWewUw/3Y41BpalhiOolcMqOgDSZDkPPzxzUgA3iYiPJnU+komrnh49xFvjh
1jMokK00NUPe/brtXp1+qrk7GFAW8H7ta9zW48Q6/bIRoa7gFAKNZmJM6beG6QhN
gkX70HwZpI16mWXq4YsHGGXOdFn6dWVEbA5aHs51BJojG1NxjRDVivmVjZRAmJmS
Bmx01Erdlc2lsKPaeqHfklc1rPrDfmI6UtL2/qVnbrzQ1gmksMXV7Gg22K5A+Mte
Q17ooe/CeJA/STBVi/DRImf+eclaz7O5lFneni69Xy9u1Hyqdh/e2W7mISaEIxCz
ZA1qteuausXrkvL3dLRjYrSoI0Riy5NvNLFzvda5s6jS+vM8IZaaHJJTpqWYw99m
XfJITVRxmU1NXei1XNsf1pw51R4Fyw+puR6UYxCdxVhW3qwhpsLhdEHALD5+b/+u
nELrLZxIAacNexX0VWFTRcDQYTusRXEm+ETLUNPAVhGmH3tU/ZolbJeLAalGsud8
eZHf4bp4S/hC8oOJD7mZiYvMqVbizQuqRXFmMyNZs6TExt5nW68=
=gvwQ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to