Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
What is official way to build DRBD on SUSE-like distros? Hello! I use openSUSE-10.2 and want to build drbd correctly. But automagic not works: node2:~/drbd-0.7.23 # make make -C drbd drbd_buildtag.c make[1]: Entering directory `/root/drbd-0.7.23/drbd' make[1]: Leaving directory `/root/drbd-0.7.23/drbd' make[1]: Entering directory `/root/drbd-0.7.23/user' gcc -c -Wall -I../drbd -c -o ../drbd/drbd_buildtag.o ../drbd/drbd_buildtag.c gcc -o drbdsetup drbdsetup.o ../drbd/drbd_buildtag.o gcc -o drbdadm drbdadm_scanner.o drbdadm_parser.o drbdadm_main.o drbdadm_adjust. o ../drbd/drbd_buildtag.o make[1]: Leaving directory `/root/drbd-0.7.23/user' make[1]: Entering directory `/root/drbd-0.7.23/scripts' Makefile:45: No special distribution INITD Makefile:46: setting INITD=/etc/init.d/ according to LSB make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/root/drbd-0.7.23/scripts' make[1]: Entering directory `/root/drbd-0.7.23/documentation' To (re)make the documentation: make doc make[1]: Leaving directory `/root/drbd-0.7.23/documentation' make[1]: Entering directory `/root/drbd-0.7.23/drbd' Calling toplevel makefile of kernel source tree, which I believe is in KDIR=/lib/modules/2.6.18.2-34-bigsmp/build test -f ../scripts/adjust_drbd_config_h.sh && \ KDIR=/lib/modules/2.6.18.2-34-bigsmp/build /bin/sh ../scripts/adjust_drbd_config_h.sh ls: cannot access /lib/modules/2.6.18.2-34-bigsmp/build/include/linux/sched.h: No such file or directory ls: cannot access /lib/modules/2.6.18.2-34-bigsmp/build/include/linux/list.h: No such file or directory ls: cannot access /lib/modules/2.6.18.2-34-bigsmp/build/include/linux/fs.h: No such file or directory Sorry, automagic adjustment of drdb_config.h failed. For well known 2.6. kernels, no adjustment to the shipped drbd_config is necessary. You need to verify it yourself. make[1]: [kbuild] Error 2 (ignored) make -C /lib/modules/2.6.18.2-34-bigsmp/build SUBDIRS=/root/drbd-0.7.23/drbd mo dules make[2]: Entering directory `/usr/src/linux-2.6.18.2-34-obj/i386/bigsmp' make -C ../../../linux-2.6.18.2-34 O=../linux-2.6.18.2-34-obj/i386/bigsmp modules CC [M] /root/drbd-0.7.23/drbd/drbd_main.o /root/drbd-0.7.23/drbd/drbd_main.c:53:35: error: linux/devfs_fs_kernel.h: No such file or directory /root/drbd-0.7.23/drbd/drbd_main.c: In function 'drbd_cleanup': /root/drbd-0.7.23/drbd/drbd_main.c:1798: error: implicit declaration of function 'devfs_remove' /root/drbd-0.7.23/drbd/drbd_main.c: In function 'drbd_init': /root/drbd-0.7.23/drbd/drbd_main.c:1898: error: implicit declaration of function 'devfs_mk_dir' /root/drbd-0.7.23/drbd/drbd_main.c:1923: error: 'struct gendisk' has no member named 'devfs_name' make[5]: *** [/root/drbd-0.7.23/drbd/drbd_main.o] Error 1 make[4]: *** [_module_/root/drbd-0.7.23/drbd] Error 2 make[3]: *** [modules] Error 2 make[2]: *** [modules] Error 2 make[2]: Leaving directory `/usr/src/linux-2.6.18.2-34-obj/i386/bigsmp' make[1]: *** [kbuild] Error 2 make[1]: Leaving directory `/root/drbd-0.7.23/drbd' As I see, the problem is that in SUSE-like distros kernel sources are split in two directories: one containing sources itself (/usr/src/linux -> /usr/src/linux-linux-2.6.18.2-34) and one where kernel compiles (/usr/src/linux-obj -> /usr/src/linux-2.6.18.2-34-obj). But as I see, DRBD wants all files to be in one directory. And if I will copy kernel includes to linux-obj directory, everything will be just fine. But I don't want to do it on every new SUSE installation. So, what it official way to build DRBD on such a distros? Where KDIR should point to? Thanks!