Skip to contentSkip to conversation

Problems compiling device-mapper 1.00.08 on RedHat 7.2 with linux-2.4.22

linux-lvm Donald Murray P.Eng. 2 participants 3 messages Mar 8, 2004

lore
Share & tools
lore
#0 lore raw

Is anyone running LVM2 on RedHat 7.2?

I'm trying to build LVM2 support for a RedHat 7.2 box. We use a 2.4.22 kernel from kernel.org. We only want LVM so we can do snapshot-based backups of a MySQL database.

Following the instructions in the device-mapper 1.00.08 INSTALL, I've successfully completed the following steps:

    ./configure --with-kernel-dir=/home/dmurray/kernel/linux-2.4.22
    make apply-patches
    make menuconfig 
    (LVM, Device-mapper, Mirror (RAID-1) support all compiled into the kernel)
    make dep && make bzImage && make modules

So far, so good.

When I tried to build the libdevmapper.so library, it failed on an undeclared DM_LIST_VERSIONS:

dmurray@dmdev:/home/dmurray/kernel/device-mapper.1.00.08> make
make -C include
make[1]: Entering directory /home/dmurray/kernel/device-mapper.1.00.08/include' make[1]: Nothing to be done for all'.
make[1]: Leaving directory `/home/dmurray/kernel/device-mapper.1.00.08/include' make -C man
make[1]: Entering directory /home/dmurray/kernel/device-mapper.1.00.08/man' make[1]: Nothing to be done for all'.
make[1]: Leaving directory `/home/dmurray/kernel/device-mapper.1.00.08/man' make -C lib
make[1]: Entering directory `/home/dmurray/kernel/device-mapper.1.00.08/lib' gcc -c -Iioctl
-I. -I../include -I/home/dmurray/kernel/linux-2.4.22/include -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -O2 ioctl/libdevmapper.c -o ioctl/libdevmapper.o
ioctl/libdevmapper.c:84: DM_LIST_VERSIONS' undeclared here (not in a function) ioctl/libdevmapper.c:84: initializer element is not constant ioctl/libdevmapper.c:84: (near initialization for _cmd_data_v4[16].cmd') make[1]: *** [ioctl/libdevmapper.o] Error 1
make[1]: Leaving directory `/home/dmurray/kernel/device-mapper.1.00.08/lib'
make: *** [lib] Error 2 dmurray@dmdev:/home/dmurray/kernel/device-mapper.1.00.08>

Any suggestions? Should we stick with LVM1 instead on RedHat 7.2?

------------------------------------------
Donald Murray, P.Eng.
Senior Software Engineer
Pason Systems Corp.
Direct: (403) 301-3473

#1 lore raw
Quoted 3 lines · Donald Murray P.Eng.

Following the instructions in the device-mapper 1.00.08 INSTALL, I've successfully completed the following steps:

    ./configure --with-kernel-dir=/home/dmurray/kernel/linux-2.4.22

The workaround is to run ./configure again *without* the kernel-dir option. Then make install the userspace tools/library.

You *don't* need to repatch/rebuild the kernel.

Alasdair

Signature · 1 line
[email protected]
#2 lore raw

Thanks for your quick reply, Alasdair. That allowed me to build device-mapper.

Now I'm having problems building LVM2. It's breaking on BLKBSZGET:
device/dev-io.c: In function `_get_block_size':
device/dev-io.c:112: `BLKBSZGET' undeclared (first use in this function) device/dev-io.c:112: (Each undeclared identifier is reported only once device/dev-io.c:112: for each function it appears in.) device/dev-io.c: In function `dev_get_size':
device/dev-io.c:219: `BLKGETSIZE64' undeclared (first use in this function) make[1]: *** [device/dev-io.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/dmurray/kernel/LVM2.2.00.08/lib'
make: *** [lib] Error 2 dmurray@dmdev:/home/dmurray/kernel/LVM2.2.00.08>

Any suggestions for this one?

Quoted 5 lines · On Mon, 8 Mar 2004 11:59:38 -0600 Alasdair G Kergon <[email protected]> wrote:
Quoted 3 lines · Donald Murray P.Eng.

Following the instructions in the device-mapper 1.00.08 INSTALL, I've successfully completed the following steps:

    ./configure --with-kernel-dir=/home/dmurray/kernel/linux-2.4.22
Quoted 14 lines

The workaround is to run ./configure again *without* the kernel-dir option. Then make install the userspace tools/library.

You *don't* need to repatch/rebuild the kernel.

Alasdair

Signature · 7 lines
[email protected]

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

------------------------------------------
Donald Murray, P.Eng.
Senior Software Engineer
Pason Systems Corp.
Direct: (403) 301-3473