Package: spooles
Version: 2.2-11
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch utopic
User: autopkgtest-de...@lists.alioth.debian.org
Usertags: autopkgtest

Hello,

spooles' autopkgtest currently succeeds in Debian, but fails in
Ubuntu [1]

| adt-run: & apt0t-build2:  - - - - - - - - - - results - - - - - - - - - -
| apt0t-build2         FAIL non-zero exit status 1
| adt-run: & apt0t-build2:  - - - - - - - - - - stderr - - - - - - - - - -
| /tmp/ccCeSbJF.o: In function `main':
| expandGraph.c:(.text+0x1c1): undefined reference to `Graph_new'
| expandGraph.c:(.text+0x1d9): undefined reference to `Graph_readFromFile'
| [...]
| collect2: error: ld returned 1 exit status

That's because Ubuntu's gcc/binutils already use the stricter linking
as with binutils-gold, where the order matters. (See
https://wiki.debian.org/ToolChain/DSOLinking for details)

Attached patch fixes the -l to come after the source that needs the
library, which makes the test succeed with binutils-gold too.

Thanks for considering,

Martin

[1] 
https://jenkins.qa.ubuntu.com/job/utopic-adt-spooles/1/ARCH=i386,label=adt/console
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
diff -Nru spooles-2.2/debian/changelog spooles-2.2/debian/changelog
--- spooles-2.2/debian/changelog        2014-05-17 19:53:58.000000000 +0200
+++ spooles-2.2/debian/changelog        2014-05-19 17:47:36.000000000 +0200
@@ -1,3 +1,9 @@
+spooles (2.2-11ubuntu1) utopic; urgency=medium
+
+  * Fix link order in autopkgtest.
+
+ -- Martin Pitt <martin.p...@ubuntu.com>  Mon, 19 May 2014 17:45:00 +0200
+
 spooles (2.2-11) unstable; urgency=medium
 
   * [0e2b291] Fix FTBFS in timings.h. (Closes: #747773)
diff -Nru spooles-2.2/debian/tests/build1 spooles-2.2/debian/tests/build1
--- spooles-2.2/debian/tests/build1     2014-05-17 19:35:44.000000000 +0200
+++ spooles-2.2/debian/tests/build1     2014-05-19 17:44:25.000000000 +0200
@@ -5213,7 +5213,7 @@
 
 EOF
 
-gcc -I/usr/include -I/usr/include/spooles -lspooles checkComponents.c -o 
checkComponents
+gcc -I/usr/include -I/usr/include/spooles checkComponents.c -lspooles -o 
checkComponents
 
 echo "build: OK"
 [ -x checkComponents ]
diff -Nru spooles-2.2/debian/tests/build2 spooles-2.2/debian/tests/build2
--- spooles-2.2/debian/tests/build2     2014-05-17 19:43:11.000000000 +0200
+++ spooles-2.2/debian/tests/build2     2014-05-19 17:44:44.000000000 +0200
@@ -2389,7 +2389,7 @@
 
 EOF
 
-gcc -I/usr/include -I/usr/include/spooles -lspooles expandGraph.c -o 
expandGraph
+gcc -I/usr/include -I/usr/include/spooles expandGraph.c -lspooles -o 
expandGraph
 
 echo "build: OK"
 [ -x expandGraph ]

Attachment: signature.asc
Description: Digital signature

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to