[DRBD-user] Fedora Core 1 compile problems

Lars Ellenberg Lars.Ellenberg at linbit.com
Thu Feb 19 08:17:23 CET 2004


/ 2004-02-18 22:56:01 -0500
\ William Dooley:
> I am having a lot of problems compiling drbd-0.6.10
> 
> I have installed the kernel-source for my distro
> took out the custom part of the Makefile
> 
> it now looks like this
> EXTRAVERSION = -1.2115.nptl
> 
> did
> # make mrproper
> # make menuconfig
> after the menu came up I just saved it.
> a default config was copied automatically
> 
> did
> # make dep
> # make include/linux/version.h
> 
> NOTE: I think your documentation on the www.drbd.org site says
> # make linux/include/version.h  that didn't work.
(because you don't have permission to write it?)


> 
> then I installed your tarball
> 
> untarred it into
> /usr/src/drbd-0.6.10
> 
> edited the drbd_config.h
> uncommented the #define SIGHAND_HACK line
> 
> then tried to build the rpm
> # make rpm KDIR=/usr/src/linux-2.4.22-1.2115.nptl/

did you try to just 
cd drbd ; make clean ; make KDIR=/usr/src/linux-2.4.22-1.2115.nptl

> It starts the build and during the compile it errors, start of errors
> below
> 
> 
> make -C /usr/src/linux-2.4.22-1.2115.nptl/ 
> SUBDIRS=/usr/src/drbd-0.6.10/dist/BUILD/drbd-0.6.10/drbd  modules
> make[3]: Entering directory `/usr/src/linux-2.4.22-1.2115.nptl'
> make -r -f tmp_include_depends all
> make[4]: Entering directory `/usr/src/linux-2.4.22-1.2115.nptl'
> make[4]: Nothing to be done for `all'.
> make[4]: Leaving directory `/usr/src/linux-2.4.22-1.2115.nptl'
> make -C  /usr/src/drbd-0.6.10/dist/BUILD/drbd-0.6.10/drbd 
> CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.22-1.2115.nptl/include -Wall 
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
> -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 
> -DMODULE -DMODVERSIONS -include 
> /usr/src/linux-2.4.22-1.2115.nptl/include/linux/modversions.h" 
> MAKING_MODULES=1 modules
> make[4]: Entering directory 
> `/usr/src/drbd-0.6.10/dist/BUILD/drbd-0.6.10/drbd'
> gcc32 -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2115.nptl/include -Wall 
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
> -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 
> -DMODULE -DMODVERSIONS -include 
> /usr/src/linux-2.4.22-1.2115.nptl/include/linux/modversions.h  -nostdinc 
> -iwithprefix include -DKBUILD_BASENAME=drbd_fs  -c -o drbd_fs.o drbd_fs.c
> In file included from 
> /usr/src/linux-2.4.22-1.2115.nptl/include/asm/uaccess.h:8,
>                 from drbd_fs.c:39:
> /usr/src/linux-2.4.22-1.2115.nptl/include/linux/sched.h:6: invalid suffix 
> on integer constant
> /usr/src/linux-2.4.22-1.2115.nptl/include/linux/sched.h:6: syntax error 
> before numeric constant
> /usr/src/linux-2.4.22-1.2115.nptl/include/linux/sched.h:6: warning: 
> function declaration isn't a prototype
> 
> ...
> ...
> many more errors follow and ends like this
> 
> make[2]: Leaving directory 
> `/usr/src/drbd-0.6.10/dist/BUILD/drbd-0.6.10/drbd'
> make[1]: *** [all] Error 1
> make[1]: Leaving directory `/usr/src/drbd-0.6.10/dist/BUILD/drbd-0.6.10'
> error: Bad exit status from /var/tmp/rpm-tmp.32103 (%build)
> 
> 
> RPM build errors:
>    Bad exit status from /var/tmp/rpm-tmp.32103 (%build)
> make: *** [rpm] Error 1

> what am I doing incorrect
> any help would be appreciated.

Sorry, I can not tell.
I just did the very same thing, though my host system is SuSE,
and we don't have "gcc32", so I say CC=gcc, and I don't want to
rebuild the documentation (because it is supplied in the tgz),
and this is drbd-0.6.11 (so RPMOPTIONS=... don't work with 0.6.10, I think)

Works for me.

# make rpm KDIR=/usr/kernel-src/RH/linux-2.4.22-1.2135.nptl/ CC=gcc \
	RPMOPTIONS="--define 'skip_make_doc true'"
# ls dist/RPMS/i586/drbd-*
dist/RPMS/i586/drbd-0.6.11-3.i586.rpm
dist/RPMS/i586/drbd-km-2.4.22_1.2135.nptl-0.6.11-3.i586.rpm
# rpm -qvilp dist/RPMS/i586/drbd-*
(
 everything alright, execpt drbd.o beeing in
 /lib/modules/*/block/drbd.o instead of
 /lib/modules/*/kernel/driver/block/drbd.o
 So there is somewhere a wrong condition in the Makefiles,
 this should still be improved.
 As long as /lib/modules/*/kernel/driver/block/ already exists,
 it ends up in the correct location.
)


	Lars Ellenberg



More information about the drbd-user mailing list