Package: procinfo
Version: 2.0.304-1
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

Hello,

In https://launchpad.net/bugs/771106  it was reported that procinfo
fails to build when linking with --as-needed:

/tmp/cc4FCBB7.o: In function `mainLoop(bool, bool, bool, bool, bool, bool, 
bool, bool, bool, unsigned int, std::vector<IRQ, std::allocator<IRQ> > const&)':
/build/buildd/procinfo-2.0.304/procinfo.cpp:220: undefined reference to 
`refresh'
/build/buildd/procinfo-2.0.304/procinfo.cpp:222: undefined reference to `erase'
/tmp/cc4FCBB7.o: In function `main':
/build/buildd/procinfo-2.0.304/procinfo.cpp:375: undefined reference to `clear'
/tmp/cc4FCBB7.o: In function `resetConsole':
/build/buildd/procinfo-2.0.304/lib/prettyPrint.cpp:60: undefined reference to 
`endwin'
/tmp/cc4FCBB7.o: In function `initConsole':
/build/buildd/procinfo-2.0.304/lib/prettyPrint.cpp:52: undefined reference to 
`initscr'
/build/buildd/procinfo-2.0.304/lib/prettyPrint.cpp:54: undefined reference to 
`cbreak'
collect2: ld returned 1 exit status
make[1]: *** [procinfo] Error 1

Please see http://wiki.debian.org/ToolChain/DSOLinking for details.

Attached patch fixes the link order to build with --as-needed as well.

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
=== modified file 'Makefile.in'
--- Makefile.in 2009-05-03 23:34:49 +0000
+++ Makefile.in 2011-09-14 06:53:49 +0000
@@ -44,7 +44,7 @@
 cygwin_procstat.cpp cygwin_rendercpupagestat.cpp \
 lib/routines.cpp lib/timeRoutines.cpp lib/prettyPrint.cpp \
 Makefile
-       $(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@
+       $(CXX) $(CFLAGS) procinfo.cpp $(LDFLAGS) -o $@
 
 #procinfo.o: procinfo.cpp procinfo.h
 #      $(XX) $(CFLAGS) procinfo.cpp -o procinfo.o

=== modified file 'debian/changelog'
--- debian/changelog    2009-05-03 23:34:49 +0000
+++ debian/changelog    2011-09-14 06:53:49 +0000
@@ -1,3 +1,10 @@
+procinfo (1:2.0.304-1ubuntu1) UNRELEASED; urgency=low
+
+  * Makefile.in: Fix link order so that this builds with --as-needed.
+    (LP: #771106)
+
+ -- Martin Pitt <martin.p...@ubuntu.com>  Wed, 14 Sep 2011 08:53:26 +0200
+
 procinfo (1:2.0.304-1) unstable; urgency=low
 
   * [9413c06] New Upstream Version 2.0.304

Attachment: signature.asc
Description: Digital signature

Reply via email to