On Thu, Oct 15, 2015 at 03:01:06PM +0000, Jurica Stanojkovic wrote:
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

The patch was applied in 4.0.2-1 but unfortunately due to other changes
in the Makefile the LIBS+=-latomic was dropped.

The attached patch should fix that.
>From a81e6cc12f24f8f980a88fcae9a37c8507abb546 Mon Sep 17 00:00:00 2001
From: Christos Trochalakis <ctrochala...@debian.org>
Date: Fri, 4 Aug 2017 12:19:13 +0300
Subject: [PATCH] Fix build on mips architectures

Make sure that our LIBS=-latomic on mips is not overriden in upstream
Makefile and, while at it, drop appending to CFLAGS twice.

Gbp-Dch: Short
Closes: #801881
---
 Makefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 66401e3..471ec11 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,4 @@
-CFLAGS  += -std=c99 -Wall -O2 -D_REENTRANT
-LIBS    := -lpthread -lm -lssl -lcrypto
-
-CFLAGS   += -std=c99 -Wall -D_REENTRANT -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE
+CFLAGS   += -O2 -std=c99 -Wall -D_REENTRANT -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE
 LIBS     += -lpthread -lm -lcrypto -lssl
 LDFLAGS  += -Wl,-E
 
-- 
2.13.3

Reply via email to