build-sys: link swapoff to libblkid
PATCH 1/1 build-sys: link swapoff to libblkid
The swapoff utility seems to need linking with libblkid otherwise this build error occurs:
$ git describe v2.25-180-g29607ed $ ./autogen.sh && ./configure --without-python && make [....] CCLD swapoff /usr/bin/ld: sys-utils/swapoff-swapon-common.o: undefined reference to symbol 'blkid_probe_lookup_value@@BLKID_2.15' //home/ah/opt/pkg-util-linux/util-linux/.libs/libblkid.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:5992: recipe for target 'swapoff' failed make[2]: *** [swapoff] Error 1 make[2]: Leaving directory '/home/ah/opt/pkg-util-linux/util-linux' Makefile:10220: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/ah/opt/pkg-util-linux/util-linux' Makefile:4433: recipe for target 'all' failed make: *** [all] Error 2
--- sys-utils/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sys-utils/Makemodule.am +1 -1
@@ -275,7 +275,7 @@ swapon_LDADD = $(LDADD) \ swapoff_SOURCES = sys-utils/swapoff.c sys-utils/swapon-common.c swapoff_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) -I$(ul_libblkid_incdir) -swapoff_LDADD = $(LDADD) libmount.la +swapoff_LDADD = $(LDADD) libmount.la libblkid.la endif if BUILD_LSCPU
Signature · 1 line
2.1.0
Karel Zak
maintainerRe: [PATCH 4/5] build-sys: swaplabel needs libmount
Quoted 8 lines · Andreas Henriksson
The swaplabel utility uses libmount functionality and thus libmount has to be available if we want to build swaplabel. This change makes swaplabel be automatically disabled when we don't.
--- configure.ac | 1 + 1 file changed, 1 insertion(+)
Quoted 20 lines · Andreas Henriksson
The swapoff utility seems to need linking with libblkid otherwise this build error occurs:
$ git describe v2.25-180-g29607ed $ ./autogen.sh && ./configure --without-python && make [....] CCLD swapoff /usr/bin/ld: sys-utils/swapoff-swapon-common.o: undefined reference to symbol 'blkid_probe_lookup_value@@BLKID_2.15' //home/ah/opt/pkg-util-linux/util-linux/.libs/libblkid.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:5992: recipe for target 'swapoff' failed make[2]: *** [swapoff] Error 1 make[2]: Leaving directory '/home/ah/opt/pkg-util-linux/util-linux' Makefile:10220: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/ah/opt/pkg-util-linux/util-linux' Makefile:4433: recipe for target 'all' failed make: *** [all] Error 2
Quoted 3 lines
--- sys-utils/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I have modified swapoff, swapon and swaplabel to use separate file lib/swapprobe.c for libblkid stuff. So now:
swapon - requires libmount and libblkid
swapoff - requires libmount
swaplabel - requires libblkid
link directly both libs everywhere is overkill. Please, test the current git tree. Thanks!
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com