Package: slurm
Version: 0.3.3-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu oneiric ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following:
slurm fails to build from source with the linker flag --as-needed.
Libraries must be placed behind objects needing their symbols when this flag is
used.
So autotools handles command line ordering correctly libraries to link with
must be placed in the LIBS variable and not in LDFLAGS as is the case in this
package.
Attached patch fixes this by using the correct variable in configure.in. In
order to do this dh-autoreconf was used to regenerate configure from the
patched configure.in before the build.
Changelog:
* use dh_autoreconf
* debian/patches/0004-fix-as-needed-build.patch: (LP: #832924)
- fix build with ld --as-needed by using LIBS instead of LDFLAGS for links
Thanks for considering the patch.
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500,
'oneiric'), (100, 'oneiric-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-9-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
=== modified file 'debian/control'
--- debian/control 2010-07-18 19:05:29 +0000
+++ debian/control 2011-09-03 13:23:03 +0000
@@ -2,7 +2,7 @@
Section: net
Priority: optional
Maintainer: Matthias Schmitz <[email protected]>
-Build-Depends: debhelper (>= 5.0.0), libncurses5-dev
+Build-Depends: debhelper (>= 5.0.0), libncurses5-dev, dh-autoreconf
Standards-Version: 3.8.4
vcs-git: git://git.debian.org/users/matthias-guest/slurm.git
vcs-browser: http://git.debian.org/?p=users/matthias-guest/slurm.git;a=summary
=== added file 'debian/patches/0004-fix-as-needed-build.patch'
--- debian/patches/0004-fix-as-needed-build.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/0004-fix-as-needed-build.patch 2011-09-03 13:14:24 +0000
@@ -0,0 +1,28 @@
+=== modified file 'configure.in'
+--- slurm.orig/configure.in 2007-10-02 18:59:35 +0000
++++ slurm/configure.in 2011-08-28 19:23:58 +0000
+@@ -67,14 +67,15 @@
+ esac
+ # add Slowlaris -R and libraries to LDFLAGS
+ if test ${OSTYPE} = "solaris" ; then
+- LDFLAGS="${LDFLAGS} ${SOLLDFLAGS} -lnsl -lsocket -lkstat"
++ LDFLAGS="${LDFLAGS} ${SOLLDFLAGS}"
++ LIBS="${LIBS} -lnsl -lsocket -lkstat"
+ fi
+
+ AC_CHECK_LIB(fridge, vanilla_coke, echo "WTF?!", echo "Warning: No vanilla coke found in fridge.";echo "We highly suggest that you rectify this situation immediatly.")
+ ncurses_support="no"
+ curses_support="no"
+ color_support="no"
+-AC_CHECK_LIB(ncurses, use_default_colors, LDFLAGS="$LDFLAGS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES -D_HAVE_NCURSES_COLOR"; color_support="yes"; ncurses_support="yes", AC_CHECK_LIB(ncurses, use_default_colors, LDFLAGS="$LDFLAGS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES"; ncurses_support="yes"; echo "NO TRANSPARENCY SUPPORT in this ncurses lib", AC_CHECK_LIB(curses, initscr, LDFLAGS="$LDFLAGS -lcurses"; CFLAGS="$CFLAGS -D_HAVE_CURSES"; curses_support="yes"; echo "NO TRANSPARENCY SUPPORT in curses lib")))
++AC_CHECK_LIB(ncurses, use_default_colors, LIBS="$LIBS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES -D_HAVE_NCURSES_COLOR"; color_support="yes"; ncurses_support="yes", AC_CHECK_LIB(ncurses, use_default_colors, LIBS="$LIBS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES"; ncurses_support="yes"; echo "NO TRANSPARENCY SUPPORT in this ncurses lib", AC_CHECK_LIB(curses, initscr, LIBS="$LIBS -lcurses"; CFLAGS="$CFLAGS -D_HAVE_CURSES"; curses_support="yes"; echo "NO TRANSPARENCY SUPPORT in curses lib")))
+
+ # disable color support on Solaris for now
+ if test ${OSTYPE} = "solaris" ; then
+@@ -95,4 +96,5 @@
+ compiler: ${CC}
+ compiler flags: ${CFLAGS}
+ linker flags: ${LDFLAGS}
++ libraries: ${LIBS}
+ "
+
=== modified file 'debian/patches/series'
--- debian/patches/series 2010-07-18 19:05:29 +0000
+++ debian/patches/series 2011-09-03 13:15:28 +0000
@@ -1,3 +1,4 @@
0001-config.guess.patch
0002-slurm.1.patch
0003-config.sub.patch
+0004-fix-as-needed-build.patch
=== modified file 'debian/rules'
--- debian/rules 2007-10-02 18:59:35 +0000
+++ debian/rules 2011-09-03 13:12:57 +0000
@@ -13,11 +13,7 @@
config.status: configure
dh_testdir
- # work around weird upstream timestamps
- touch aclocal.m4
- touch Makefile.in
- touch config.h.in
- touch configure
+ dh_autoreconf
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
@@ -33,6 +29,7 @@
clean:
dh_testdir
dh_testroot
+ dh_autoreconf_clean
rm -f build-stamp
[ ! -f Makefile ] || $(MAKE) distclean