Source: socket-wrapper
Version: 1.1.7-1
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)
Preparing a backport of libsocket-wrapper to stable, I noticed that it
won't build with the stated build-dependency of libcmocka-dev
0.4.1. The last lines of the build attempt follow:
/usr/bin/cmake -E cmake_progress_report
.../socket-wrapper-1.1.7/obj/CMakeFiles 3
[ 22%] Building C object
tests/CMakeFiles/test_echo_tcp_bind.dir/test_echo_tcp_bind.c.o
cd .../socket-wrapper-1.1.7/obj/tests && /usr/bin/cc -g -O2
-fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2
-std=gnu99 -Wall -Wextra -Wshadow -Wmissing-prototypes
-Wdeclaration-after-statement -Wunused -Wfloat-equal -Wpointer-arith
-Wwrite-strings -Wformat-security -Wmissing-format-attribute -Wcast-align
-Wcast-qual -Wno-missing-field-initializers -Werror=pointer-arith
-Werror=declaration-after-statement -Werror=implicit-function-declaration
-Werror=write-strings -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
-fstrict-aliasing -Wstrict-aliasing=2 -fstrict-overflow -Wstrict-overflow=5
-Werror=strict-overflow -D_GNU_SOURCE -fPIC -fstack-protector
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I.../socket-wrapper-1.1.7/obj/tests
-I.../socket-wrapper-1.1.7/tests -I.../socket-wrapper-1.1.7/obj
-I.../socket-wrapper-1.1.7/src -o
CMakeFiles/test_echo_tcp_bind.dir/test_echo_tcp_bind.c.o -c
.../socket-wrapper-1.1.7/tests/test_echo_tcp_bind.c
.../socket-wrapper-1.1.7/tests/test_echo_tcp_bind.c: In function ‘main’:
.../socket-wrapper-1.1.7/tests/test_echo_tcp_bind.c:501:26: error: array type
has incomplete element type
const struct CMUnitTest tcp_bind_tests[] = {
^
.../socket-wrapper-1.1.7/tests/test_echo_tcp_bind.c:502:3: error: implicit
declaration of function ‘cmocka_unit_test_setup_teardown’
[-Werror=implicit-function-declaration]
cmocka_unit_test_setup_teardown(test_bind_ipv4,
^
.../socket-wrapper-1.1.7/tests/test_echo_tcp_bind.c:533:2: error: implicit
declaration of function ‘cmocka_run_group_tests’
[-Werror=implicit-function-declaration]
rc = cmocka_run_group_tests(tcp_bind_tests, NULL, NULL);
^
.../socket-wrapper-1.1.7/tests/test_echo_tcp_bind.c:501:26: warning: unused
variable ‘tcp_bind_tests’ [-Wunused-variable]
const struct CMUnitTest tcp_bind_tests[] = {
^
cc1: some warnings being treated as errors
tests/CMakeFiles/test_echo_tcp_bind.dir/build.make:57: recipe for target
'tests/CMakeFiles/test_echo_tcp_bind.dir/test_echo_tcp_bind.c.o' failed
make[3]: *** [tests/CMakeFiles/test_echo_tcp_bind.dir/test_echo_tcp_bind.c.o]
Error 1
Installing libcmocka-dev 1.0.1-2~bpo8+1 fixed the issue so I propose the
attached patch.
--- socket-wrapper-1.1.7/debian/control~ 2016-05-24 22:27:10.000000000 +0200
+++ socket-wrapper-1.1.7/debian/control 2017-03-28 10:12:35.314128801 +0200
@@ -7,7 +7,7 @@
debhelper (>= 9),
dh-buildinfo,
cmake (>= 2.8.8-3~),
- libcmocka-dev (>= 0.4.1),
+ libcmocka-dev (>= 1.0.1),
asciidoc, libxml2-utils, xsltproc, docbook-xml, docbook-xsl
XS-Testsuite: autopkgtest
Standards-Version: 3.9.8