[DRBD-user] Can not compile drbd 0.7.21 with FC5 kernel2.6.18-1.2200.

Francis SOUYRI francis.souyri at apec.fr
Tue Oct 17 11:06:16 CEST 2006

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello Lars,

On the net I saw some informations about problems with the "UTS_RELEASE" 
in the 2.6.18 kernel the definition was moved from the linux/version.h 
to the linux/utsrelease.h.

A "make KDIR=/lib/modules/2.6.18-1.2200.fc5/source" failed with these 
messages:

...
CC [M] /usr/src/cluster/drbd-0.7.21/drbd/lru_cache.o
CC [M] /usr/src/cluster/drbd-0.7.21/drbd/drbd_main.o
In file included from /usr/src/cluster/drbd-0.7.21/drbd/drbd_main.c:34:
include/linux/config.h:6:2: warning: #warning Including config.h is 
deprecated.
/usr/src/cluster/drbd-0.7.21/drbd/drbd_main.c:52:35: error: 
linux/devfs_fs_kernel.h: No such file or directory
/usr/src/cluster/drbd-0.7.21/drbd/drbd_main.c: In function ‘drbd_cleanup’:
/usr/src/cluster/drbd-0.7.21/drbd/drbd_main.c:1698: error: implicit 
declaration of function ‘devfs_remove’
/usr/src/cluster/drbd-0.7.21/drbd/drbd_main.c: In function ‘drbd_init’:
/usr/src/cluster/drbd-0.7.21/drbd/drbd_main.c:1794: error: implicit 
declaration of function ‘devfs_mk_dir’
/usr/src/cluster/drbd-0.7.21/drbd/drbd_main.c:1817: error: ‘struct 
gendisk’ has no member named ‘devfs_name’
make[3]: *** [/usr/src/cluster/drbd-0.7.21/drbd/drbd_main.o] Error 1
make[2]: *** [_module_/usr/src/cluster/drbd-0.7.21/drbd] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.18-1.2200.fc5-i686'
make[1]: *** [kbuild] Error 2
make[1]: Leaving directory `/usr/src/cluster/drbd-0.7.21/drbd'
make: *** [all] Error 2

Best regards.

Francis

Lars Ellenberg wrote:
> / 2006-10-17 08:35:15 +0200
> \ Francis SOUYRI:
>   
>> Hello,
>>
>> When I try to compile the drbd 0.7.21 with the latest fc5 kernel 2.6.18-1.2200 I have these 
>> messages.
>>
>> ++ echo -e '#include <linux/version.h>\ndrbd_kernel_release UTS_RELEASE'
>> ++ gcc -nostdinc -E -P -I/lib/modules/2.6.18-1.2200.fc5/source/include -
>> ++ sed -ne 's/^drbd_kernel_release "\(.*\)".*/\1/p'
>> + test = 2.6.18-1.2200.fc5smp
>> /var/tmp/rpm-tmp.3564: line 40: test: =: unary operator expected
>> error: Bad exit status from /var/tmp/rpm-tmp.3564 (%prep)
>>
>>
>> RPM build errors:
>>    Macro %kernelversion has empty body
>>    Macro %kernelversion has empty body
>>    Bad exit status from /var/tmp/rpm-tmp.3564 (%prep)
>> make: *** [rpm] Error 1
>>     
>
> it works for me.
> it does not for you.
> so please make sure you did install your kernel headers correctly,
> or prepared your kernel source appropriately.
>
> yes, I could patch that line (missing quotes),
> but the error would then be:
> + test '' = 2.6.18-1.2200.fc5smp
> error: Bad exit status from ... (%prep)
>
> so get your preparation right.
> follow what is outlined in INSTALL
>
> first, try to just make it.
> if that works out ok, try to
> make an rpm of it.
>
> if some part of what is written in INSTALL is no longer true,
> you'll find out that way.
>
> cheers.
>
>   



More information about the drbd-user mailing list