Package: cronutils
Version: 1.1-2
Severity: normal
Tags: upstream patch
User: debian-...@lists.debian.org
Usertags: ld-as-needed

The package fails to build when --as-needed linker option is enabled,
because of incorrect order of parameters passed to ld. Here's a log of
failed build in Ubuntu:
https://launchpadlibrarian.net/76832085/buildlog_ubuntu-oneiric-i386.cronutils_1.1-2_FAILEDTOBUILD.txt.gz

See also
http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries

The attached patch was used in Ubuntu to fix the problem.
https://launchpad.net/ubuntu/+source/cronutils/1.1-2ubuntu1

-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 
'natty-proposed'), (500, 'natty'), (100, 'natty-backports')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-11-generic (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Description: Place libraries at the end of the linker call, allowing to build
 with --as-needed linker option.
Author: Ilya Barygin <bary...@gmail.com>
--- cronutils-1.1.orig/Makefile
+++ cronutils-1.1/Makefile
@@ -21,7 +21,7 @@ runlock: runlock.c subprocess.c tempdir.
 runstat: runstat.c subprocess.c tempdir.c
 
 CFLAGS=-Wall -Werror -Wextra -D_XOPEN_SOURCE=500 -g -O0 -ansi -pedantic-errors 
-Wwrite-strings -Wcast-align -Wcast-qual -Winit-self -Wformat=2 -Wuninitialized 
-Wmissing-declarations -Wpointer-arith -Wstrict-aliasing -fstrict-aliasing
-LDFLAGS=-lrt
+LDLIBS=-lrt
 
 SOURCES = runalarm.c runlock.c runstat.c subprocess.c subprocess.h tempdir.c 
tempdir.h Makefile runalarm.1 runlock.1 runstat.1 version
 

Reply via email to