[DRBD-user] Redhat ES 3 compile error

Kelly Opal kelly at eriecoast.com
Mon Jul 26 23:19:49 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.


On Mon, 2004-07-26 at 08:02, Lars Ellenberg wrote:
> / 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
> _
Hi
	I was digging through the compile and found these 2 warnings. I hope
this will help in finding the problem.

drbd_worker.c: In function `w_e_end_rsdata_req':
drbd_worker.c:619: warning: implicit declaration of function
`page_count'

drbd_receiver.c: In function `drbd_put_ee':
drbd_receiver.c:346: warning: implicit declaration of function
`page_count'

This is the entry in the mm.h file 

#define is_page_cache_freeable(page) (page_count(page) - !!page->buffers
== 1)

So I put #include <linux/mm.h> in the drbd_reciever.c file as well. But
the problem persists. I also tried using 0.6.13 and got the same error.
I then tried it on RH Enterprise 3 Workstation and got the same thing.

Hope this helps

Kelly
> ______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
> 




More information about the drbd-user mailing list