[DRBD-user] Red Hat compile Problem

Lars Ellenberg Lars.Ellenberg at linbit.com
Sat Jul 17 12:27:05 CEST 2004

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


/ 2004-07-17 13:29:44 +0300
\ drbd-user at kenyaweb.com:
> Hi,
> 
> Yes, I did read the INSTALL from the DRBD.tz. After a few misteps, the
> kernel compile went on fine.
> 
> I also edited the file drbd_config.h.
> 
> The make error I get from the DRBD directorty is :-
> --
> 
> drbd_compat_wrappers.h:258: warning: implicit declaration of function
> `dump_stack'
> make[2]: *** [drbd_bitmap.o] Error 1
> make[2]: Leaving directory `/usr/src/drbd-0.7.0/drbd'
> make[1]: *** [_mod_/usr/src/drbd-0.7.0/drbd] Error 2
> make[1]: Leaving directory `/usr/src/linux-2.4.18-14'
> make: *** [kbuild] Error 2
> 
> -----

use a 2.6 kernel, and be happy.

no, actually dump_stack only showed up in 2.4.20...
with 2.4.18, use stack_dump instead (which is arch-specific).

	Lars Ellenberg

apply this patch:
Index: drbd_compat_wrappers.h
===================================================================
--- drbd_compat_wrappers.h	(revision 1440)
+++ drbd_compat_wrappers.h	(working copy)
@@ -6,6 +6,18 @@
 #define __module_get  __MOD_INC_USE_COUNT
 #define   module_put  __MOD_DEC_USE_COUNT
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)
+/*
+ * dump_stack() showed up in 2.4.20.
+ * show_stack is arch-specific
+ * The architecture-independent backtrace generator
+ */
+static inline void dump_stack(void)
+{
+        show_stack(0);
+}
+#endif
+
 // b_end_io handlers
 extern void drbd_md_io_complete     (struct buffer_head *bh, int uptodate);
 extern void enslaved_read_bi_end_io (struct buffer_head *bh, int uptodate);







More information about the drbd-user mailing list