Bug#730506: librdkafka: FTBFS: Various -Werror

2013-11-25 Thread Roland Stigge
Package: librdkafka
Version: 0.8.0-1
Severity: important
Tags: patch
User: debian-powerpc...@breakpoint.cc
Usertags: powerpcspe

Hi,

librdkafka FTBFS on most architectures like this (powerpc):

cc -MD -MP -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Werror=format-security -O2 -Wall -Werror -Wfloat-equal -Wpointer-arith -fPIC 
-I. -g -Wno-gnu-designator -DSG -c rdkafka_broker.c
rdkafka_broker.c: In function 'rd_kafka_msghdr_rebuild':
rdkafka_broker.c:1095:11: error: format '%zd' expects argument of type 'signed 
size_t', but argument 5 has type 'off_t' [-Werror=format]
rdkafka_broker.c:1095:11: error: format '%zd' expects argument of type 'signed 
size_t', but argument 7 has type 'off_t' [-Werror=format]
rdkafka_broker.c: In function 'rd_kafka_broker_produce_toppar':
rdkafka_broker.c:1607:3: error: format '%zd' expects argument of type 'signed 
size_t', but argument 12 has type 'uint64_t' [-Werror=format]
rdkafka_broker.c: At top level:
cc1: error: unrecognized command line option -Wno-gnu-designator [-Werror]
cc1: all warnings being treated as errors
make[1]: *** [rdkafka_broker.o] Error 1
make[1]: Leaving directory `/«PKGBUILDDIR»'
dh_auto_build: make -j1 returned exit code 2

Attaching a patch that fixes it.

Roland

-- System Information:
Debian Release: 7.0
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: powerpcspe (ppc)

Kernel: Linux 3.9.0-dirty (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
Index: librdkafka-0.8.0/rdkafka_broker.c
===
--- librdkafka-0.8.0.orig/rdkafka_broker.c	2013-11-25 22:10:39.0 +0100
+++ librdkafka-0.8.0/rdkafka_broker.c	2013-11-25 22:15:12.427542641 +0100
@@ -1092,7 +1092,7 @@
 			printf( #%i/%zd and %zd: of %zd, len %zd, 
 			   vof %zd: iov %zd\n,
 			   i, src-msg_iovlen, dst-msg_iovlen,
-			   of, len, vof, src-msg_iov[i].iov_len);
+			   (size_t)of, len, (size_t)vof, src-msg_iov[i].iov_len);
 		if (vof  0)
 			vof = 0;
 
@@ -1611,7 +1611,7 @@
 			   iovcnt,
 			   RD_KAFKAP_STR_PR(rkt-rkt_topic),
 			   rktp-rktp_partition,
-			   rktp-rktp_msgq.rkmq_msg_bytes);
+			   (size_t)rktp-rktp_msgq.rkmq_msg_bytes);
 
 
 	/* Allocate iovecs to hold all headers and messages,
Index: librdkafka-0.8.0/Makefile
===
--- librdkafka-0.8.0.orig/Makefile	2013-10-22 14:08:44.0 +0200
+++ librdkafka-0.8.0/Makefile	2013-11-25 22:20:17.077364749 +0100
@@ -16,9 +16,6 @@
 CFLAGS+=-O2 -Wall -Werror -Wfloat-equal -Wpointer-arith -fPIC -I.
 CFLAGS+=-g
 
-# Clang warnings to ignore
-CFLAGS+=-Wno-gnu-designator
-
 # Enable iovecs in snappy
 CFLAGS+=-DSG
 


Bug#730506: librdkafka: FTBFS: Various -Werror

2013-11-25 Thread Faidon Liambotis

tags 730506 + upstream confirmed pending
thanks

Hi Roland,

On Mon, Nov 25, 2013 at 10:28:33PM +0100, Roland Stigge wrote:

librdkafka FTBFS on most architectures like this (powerpc):


Thanks for the report. I had already seen the build failures and
raised the issue with the upstream author. He has prepared a branch[1] 
with fixes for me to test with.


I'm going to perform a build on porterboxes before we tag/release to 
make sure we don't do another round of build failures.


Thanks,
Faidon

1: https://github.com/edenhill/librdkafka/tree/debcompfix


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org