Bug#748683: Fix linking order in autopkgtest
Martin Pitt
martin.pitt at ubuntu.com
Mon May 19 16:00:08 UTC 2014
Package: alglib
Version: 3.8.2-2
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch utopic
User: autopkgtest-devel at lists.alioth.debian.org
Usertags: autopkgtest
Hello,
alglib' autopkgtest currently succeeds in Debian, but fails in
Ubuntu [1]
| adt-run [2014-05-10 23:27:56]: & apt0t-build1: running...
| adt-run [2014-05-10 23:27:57]: & apt0t-build1: finished
| adt-run: & apt0t-build1: - - - - - - - - - - results - - - - - - - - - -
| apt0t-build1 FAIL non-zero exit status 1
| adt-run: & apt0t-build1: - - - - - - - - - - stderr - - - - - - - - - -
| /tmp/cc9aaZ3b.o: In function `main':
| demo.cpp:(.text+0x15): undefined reference to `alglib::real_2d_array::real_2d_array()'
| demo.cpp:(.text+0x24): undefined reference to `alglib::real_2d_array::real_2d_array()'
| [...]
| /tmp/cc9aaZ3b.o:demo.cpp:(.text+0x26b): more undefined references to `alglib::real_2d_array::~real_2d_array()' follow
| 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. I also
took the liberty to drop the -I/usr/include as that's a standard gcc
include search path. If that isn't working, then our gcc is broken.
I tested this under current Debian sid and Ubuntu utopic, and it's
succeeding in both now.
Thanks for considering,
Martin
[1] https://jenkins.qa.ubuntu.com/job/utopic-adt-alglib/1/ARCH=i386,label=adt/console
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
diff -Nru alglib-3.8.2/debian/changelog alglib-3.8.2/debian/changelog
--- alglib-3.8.2/debian/changelog 2014-05-10 17:18:34.000000000 +0200
+++ alglib-3.8.2/debian/changelog 2014-05-19 17:56:43.000000000 +0200
@@ -1,3 +1,9 @@
+alglib (3.8.2-2ubuntu1) utopic; urgency=medium
+
+ * Fix link order in autopkgtest.
+
+ -- Martin Pitt <martin.pitt at ubuntu.com> Mon, 19 May 2014 17:56:32 +0200
+
alglib (3.8.2-2) unstable; urgency=medium
* [c95abb4] Add autopkgtests.
--- alglib-3.8.2/debian/tests/build1 2014-05-10 17:10:11.000000000 +0200
+++ alglib-3.8.2/debian/tests/build1 2014-05-19 17:55:45.000000000 +0200
@@ -54,7 +54,7 @@
EOF
-g++ -I/usr/include -lalglib -o demo demo.cpp
+g++ -o demo demo.cpp -lalglib
echo "build: OK"
[ -x demo ]
./demo
diff -Nru alglib-3.8.2/debian/tests/build2 alglib-3.8.2/debian/tests/build2
--- alglib-3.8.2/debian/tests/build2 2014-05-10 17:13:52.000000000 +0200
+++ alglib-3.8.2/debian/tests/build2 2014-05-19 17:55:34.000000000 +0200
@@ -69,7 +69,7 @@
EOF
-g++ -I/usr/include -lalglib -o demo demo.cpp
+g++ -o demo demo.cpp -lalglib
echo "build: OK"
[ -x demo ]
./demo
diff -Nru alglib-3.8.2/debian/tests/build3 alglib-3.8.2/debian/tests/build3
--- alglib-3.8.2/debian/tests/build3 2014-05-10 17:14:44.000000000 +0200
+++ alglib-3.8.2/debian/tests/build3 2014-05-19 17:55:52.000000000 +0200
@@ -73,7 +73,7 @@
EOF
-g++ -I/usr/include -lalglib -o demo demo.cpp
+g++ -o demo demo.cpp -lalglib
echo "build: OK"
[ -x demo ]
./demo
diff -Nru alglib-3.8.2/debian/tests/build4 alglib-3.8.2/debian/tests/build4
--- alglib-3.8.2/debian/tests/build4 2014-05-10 17:16:00.000000000 +0200
+++ alglib-3.8.2/debian/tests/build4 2014-05-19 17:55:59.000000000 +0200
@@ -121,7 +121,7 @@
EOF
-g++ -I/usr/include -lalglib -o demo demo.cpp
+g++ -o demo demo.cpp -lalglib
echo "build: OK"
[ -x demo ]
./demo
diff -Nru alglib-3.8.2/debian/tests/build5 alglib-3.8.2/debian/tests/build5
--- alglib-3.8.2/debian/tests/build5 2014-05-10 17:17:02.000000000 +0200
+++ alglib-3.8.2/debian/tests/build5 2014-05-19 17:56:15.000000000 +0200
@@ -125,7 +125,7 @@
EOF
-g++ -I/usr/include -lalglib -o demo demo.cpp
+g++ -o demo demo.cpp -lalglib
echo "build: OK"
[ -x demo ]
./demo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20140519/2c788ea2/attachment.sig>
More information about the debian-science-maintainers
mailing list