Source: capnproto
Version: 0.7.0-4
Severity: serious

Hello, your new test seems to be causing a link failure due to asneeded gcc 
default flag, because of wrong order in the link command line.

The attached patch fixes the issue, by moving the pkg-config libs call after 
the cc file.



Theoretically, you can just move the line a little bit above, instead of 
splitting in two different pkg-config calls,
but I find this approach a little bit more clear


+capnproto (0.7.0-4.1) unstable; urgency=medium
+
+  * Fix test failure with asneeded gcc-9 default flag,
+    by moving order of link line (Closes: #-1)
+
+ -- Gianfranco Costamagna <locutusofb...@debian.org>  Mon, 09 Sep 2019 
11:02:04 +0200
+
 capnproto (0.7.0-4) unstable; urgency=medium
 
   [ Tom Lee ]
diff -Nru capnproto-0.7.0/debian/tests/build-tests 
capnproto-0.7.0/debian/tests/build-tests
--- capnproto-0.7.0/debian/tests/build-tests    2019-09-04 22:12:33.000000000 
+0200
+++ capnproto-0.7.0/debian/tests/build-tests    2019-09-09 11:02:04.000000000 
+0200
@@ -40,9 +40,10 @@
   echo "$EXAMPLE_PROGRAM_1" >"$WORKDIR/pkgconfig-test.cc"
 
   g++ -Wall -Werror \
+      $(pkg-config --cflags kj) \
       -o "$WORKDIR/pkgconfig-test" \
-      $(pkg-config --cflags --libs kj) \
-      "$WORKDIR/pkgconfig-test.cc"
+      "$WORKDIR/pkgconfig-test.cc" \
+      $(pkg-config --libs kj)
 
   if [[ "$?" != 0 ]]; then
     fail "compile failed"
@@ -83,8 +84,8 @@
   echo "$EXAMPLE_PROGRAM_2" >"$WORKDIR/version-test.cc"
 
   g++ -Wall -Werror \
-      -o "$WORKDIR/version-test" \
       $(pkg-config --cflags kj) \
+      -o "$WORKDIR/version-test" \
       "$WORKDIR/version-test.cc"
 
   if [[ "$?" != 0 ]]; then
diff -Nru capnproto-0.7.0/debian/changelog capnproto-0.7.0/debian/changelog
--- capnproto-0.7.0/debian/changelog    2019-09-04 22:12:33.000000000 +0200
+++ capnproto-0.7.0/debian/changelog    2019-09-09 11:02:04.000000000 +0200
@@ -1,3 +1,10 @@
+capnproto (0.7.0-4ubuntu2) eoan; urgency=medium
+
+  * Fix test failure with asneeded gcc-9 default flag,
+    by moving order of link line 
+
+ -- Gianfranco Costamagna <locutusofb...@debian.org>  Mon, 09 Sep 2019 
11:02:04 +0200
+
 capnproto (0.7.0-4) unstable; urgency=medium
 
   [ Tom Lee ]
diff -Nru capnproto-0.7.0/debian/tests/build-tests 
capnproto-0.7.0/debian/tests/build-tests
--- capnproto-0.7.0/debian/tests/build-tests    2019-09-04 22:12:33.000000000 
+0200
+++ capnproto-0.7.0/debian/tests/build-tests    2019-09-09 11:02:04.000000000 
+0200
@@ -40,9 +40,10 @@
   echo "$EXAMPLE_PROGRAM_1" >"$WORKDIR/pkgconfig-test.cc"
 
   g++ -Wall -Werror \
+      $(pkg-config --cflags kj) \
       -o "$WORKDIR/pkgconfig-test" \
-      $(pkg-config --cflags --libs kj) \
-      "$WORKDIR/pkgconfig-test.cc"
+      "$WORKDIR/pkgconfig-test.cc" \
+      $(pkg-config --libs kj)
 
   if [[ "$?" != 0 ]]; then
     fail "compile failed"
@@ -83,8 +84,8 @@
   echo "$EXAMPLE_PROGRAM_2" >"$WORKDIR/version-test.cc"
 
   g++ -Wall -Werror \
-      -o "$WORKDIR/version-test" \
       $(pkg-config --cflags kj) \
+      -o "$WORKDIR/version-test" \
       "$WORKDIR/version-test.cc"
 
   if [[ "$?" != 0 ]]; then

Reply via email to