[DRBD-user] Redhat ES 3 compile error

Lars Ellenberg Lars.Ellenberg at linbit.com
Mon Jul 26 14:02:44 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-26 01:50:29 -0400
\ Kelly Opal:
> On Sun, 2004-07-25 at 04:24, Lars Ellenberg wrote:
> > / 2004-07-25 00:39:54 -0400
> > \ Kelly Opal:
> > > Hi
> > > 	I got everthing to compile but when I go to instal it I get the
> > > following error and can find nothing archives for it.
> > > 
> > > /sbin/insmod drbd
> > > Using /lib/modules/2.4.21-15.EL/kernel/drivers/block/drbd.o
> > > /lib/modules/2.4.21-15.EL/kernel/drivers/block/drbd.o: unresolved symbol
> > > page_count
> > 
> > it is just a macro, defined in mm.h.
> > it should not be referenced at all.
> > did you get any warnings during compile?
> > 
> > it could help to include mm.h explicitly,
> > though it was included implicitly anyways:
> > 
> > 	Lars Ellenberg
> > 
> > --- drbd_main.c (revision 1454)
> > +++ drbd_main.c (working copy)
> > @@ -44,6 +44,7 @@
> >  #include <linux/file.h>
> >  #include <linux/proc_fs.h>
> >  #include <linux/init.h>
> > +#include <linux/mm.h>
> >  #include <linux/slab.h>
> >  #include <linux/devfs_fs_kernel.h>
> >  
> > --- drbd_receiver.c     (revision 1454)
> > +++ drbd_receiver.c     (working copy)
> > @@ -38,6 +38,7 @@
> >  #include <linux/version.h>
> >  #include <linux/fs.h>
> >  #include <linux/file.h>
> > +#include <linux/mm.h>
> >  #include <linux/slab.h>
> >  #include <linux/smp_lock.h>
> >  #include <linux/pkt_sched.h>
> > 
> HI
> 	I applied the patch but the problem still persists. Any ideas.

no.
I have several kernel trees here, where I compile agains just to test
compatibility. a number of kernel.org one, some SuSEs, ..., and because
of the many complaints even two RH, too: 2.4.18-14 (beacuse someone
recently had big problems compiling DRBD on it, and 2.4.22-whatever.
and in all cases, it compiles just fine,
all symbols resolve, and no macro becomes an unresolved symbol ...
(which is "technically impossible") :-/

please get some local experienced C guy to resolve this problem for you.
maybe you just have a look in mentioned header file (mm.h) and look for
the page_count macro... if it is NOT a macro with your kernel source,
let me know... an other option might be to compile against some
different kernel source tree, and see if that works for you.
if that does not work either, you really have some different problem.

	Lars Ellenberg



More information about the drbd-user mailing list