[DRBD-user] drbd8.4 latest source can't build on sles platform
li songmin
lisongmin9 at gmail.com
Mon Apr 23 11:27:35 CEST 2018
There is an error when build on sles platform:
```
test -d /usr/src/linux-3.0.13-0.27-obj/x86_64/default//.
++ KDIR=/usr/src/linux-3.0.13-0.27-obj/x86_64/default/
++ scripts/get_uts_release.sh
+ test 3.0.13-0.27-default = 3.0.13
error: Bad exit status from /var/tmp/rpm-tmp.20427 (%prep)
```
It seems get_uts_release.sh check kernelrelease first and then
kernelversion,
so i think we should get version by kernelrelease before kernelversion in
Makefile
```
diff --git a/Makefile b/Makefile
index f0ad0c39..efdb6e45 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ ifndef KVER
KVER = `uname -r`
KDIR = /lib/modules/$(KVER)/build
else
-KVER := $(shell (make -s -C $(KDIR) kernelversion || make -s -C $(KDIR)
kernelrelease) | tail -n1)
+KVER := $(shell (make -s -C $(KDIR) kernelrelease || make -s -C $(KDIR)
kernelversion) | tail -n1)
ifeq ($(KVER),)
$(error could not guess kernel version string from kernel sources
at "$(KDIR)")
endif
(END)
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20180423/d0aa1104/attachment.htm>
More information about the drbd-user
mailing list