[linux-lvm] Re: Problems compiling client utilities

Klaus Strebel stb at ep-ag.com
Thu Jan 13 13:36:00 UTC 2000


Jos Visser wrote:
> 
> Hi Klaus,
> 
> Unfortunately not. As it turns out, the devfs patch modifies certain
> kernel include files to the extent that the LVM client utilities run
> into all sorts of compile problems. However, it is my educated guess
> that you can compile the client utilities on a non-devfs system, and
> the use them on a devfs enabled system.
> 
> ++Jos
> 
> Klaus Strebel wrote:
> >
> > Hi Jos,
> >
> > i ran into the same problems, did you find a solution?
Ok Jos, i diffed in like swine and found a very very dirty hack!

First, remove the "-D__KERNEL__" from the Makefiles in the tools
directory. Then do the following around the include of <linux/kdev_t.h>
in <linux/lvm.h>:

/* KS : Look out! Following is a bad, bad hack to solve compile
problems         * when for tools with devfs and lvm! */
#if !defined (__KERNEL__)
#define  __KERNEL__ oh_no_no_no
#include <linux/kdev_t.h>
#undef __KERNEL__
#else
#include <linux/kdev_t.h>
#endif

It works for me, hope it helps you!

Ciao
Klaus
-- 
Klaus Strebel
stb at ep-ag.com
EIGNER + PARTNER AG   - The Engineering Warehouse Company -
<http://www.ep-ag.com>
-----------------------------------------------------------------------



More information about the linux-lvm mailing list