commit: b5719a7a45673faada9502bba39c5e9af9e16a30
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 3 06:26:38 2017 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Sep 3 06:28:16 2017 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=b5719a7a
gen_compile: allow lvm-2.02.173 to compile
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
gen_compile.sh | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/gen_compile.sh b/gen_compile.sh
index 76e11a8..19ea1ce 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -502,15 +502,20 @@ compile_lvm() {
[ -d "${LVM_DIR}" ] ||
gen_die "LVM directory ${LVM_DIR} is invalid!"
cd "${LVM_DIR}"
+ print_info 1 'lvm: >> Patching ...'
apply_patches lvm ${LVM_VER}
+ # we currently have a patch that changes configure.ac
+ # once given patch is dropped, drop autoconf too
+ print_info 1 'lvm: >> Autoconf ...'
+ autoconf || gen_die 'Autoconf failed for LVM2'
print_info 1 'lvm: >> Configuring...'
LVM_CONF=(
--enable-static_link
--prefix=/
- --enable-dmeventd
+ --disable-dmeventd # Fails to build
libdm-string.c:(.text+0x1481): undefined reference to `nearbyintl'
--enable-cmdlib
- --enable-lib
- --enable-lvmetad
+ --enable-applib
+ --disable-lvmetad
--with-lvm1=internal
--with-clvmd=none
--with-cluster=none
@@ -524,12 +529,16 @@ compile_lvm() {
--with-raid=internal
)
CFLAGS="-fPIC" \
+ LIBS='-luuid -lrt -lpthread -lm' \
+ LDFLAGS='-Wl,--no-as-needed' \
./configure "${LVM_CONF[@]}" \
>> ${LOGFILE} 2>&1 || \
gen_die 'Configure of lvm failed!'
print_info 1 'lvm: >> Compiling...'
compile_generic '' utils || gen_die "failed to build LVM"
+
mkdir -p "${TEMP}/lvm/sbin"
+ print_info 1 'lvm: >> Installing to DESTDIR...'
compile_generic "install DESTDIR=${TEMP}/lvm/" utils || gen_die
"failed to install LVM"
# Upstream does u-w on files, and this breaks stuff.
chmod -R u+w "${TEMP}/lvm/"