compiling Multipath-tools on RHE4 .
Subsystems (2)
Our System!
2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux ES release 4 (Nahant)
Packages installed
gcc-3.4.3-9.EL4
udev-039-10.8.EL4
device-mapper-1.00.19-2
This is the output I get when I run a make on
multipath-tools-0.4.3-pre9.
In file included from lopart.c:30:
loop.h:82: error: syntax error before "__kernel_old_dev_t" loop.h:82: warning: no semicolon at end of struct or union loop.h:84: error: syntax error before "lo_rdevice" loop.h:84: warning: type defaults to int' in declaration of lo_rdevice'
loop.h:84: warning: data definition has no type or storage class loop.h:93: error: syntax error before '}' token lopart.c: In function `find_loop_by_file':
lopart.c:100: error: storage size of 'loopinfo' isn't known lopart.c:100: warning: unused variable loopinfo' lopart.c: In function find_unused_loop_device':
lopart.c:144: error: storage size of 'loopinfo' isn't known lopart.c:144: warning: unused variable loopinfo' lopart.c: In function set_loop':
lopart.c:225: error: storage size of 'loopinfo' isn't known lopart.c:225: warning: unused variable `loopinfo' make[1]: *** [lopart.o] Error 1
make[1]: Leaving directory `/root/Multipath/multipath-tools-0.4.3-pre9/kpartx'
make: *** [recurse] Error 2
If you anyone could please help me on getting this to work, This needs to be implemented ASAP...
Allen Sanabria
Systems Administrator I
205 Hudson St 6th Floor
New York, New York 10013
Try compiling with "make BUILD=klibc"
Quoted 46 lines · Allen Sanabria
Our System!
2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005x86_64x86_64x86_64GNU/Linux
Red Hat Enterprise Linux ES release 4 (Nahant)Packages installed
gcc-3.4.3-9.EL4
udev-039-10.8.EL4
device-mapper-1.00.19-2This is the output I get when I run a make on
multipath-tools-0.4.3-pre9.In file included from lopart.c:30:
loop.h:82: error: syntax error before "__kernel_old_dev_t" loop.h:82: warning: no semicolon at end of struct or union loop.h:84: error: syntax error before "lo_rdevice" loop.h:84: warning: type defaults toint' in declaration oflo_rdevice'
loop.h:84: warning: data definition has no type or storage class loop.h:93: error: syntax error before '}' tokenlopart.c: In function `find_loop_by_file':
lopart.c:100: error: storage size of 'loopinfo' isn't known lopart.c:100: warning: unused variableloopinfo' lopart.c: In functionfind_unused_loop_device':
lopart.c:144: error: storage size of 'loopinfo' isn't known lopart.c:144: warning: unused variableloopinfo' lopart.c: In functionset_loop':
lopart.c:225: error: storage size of 'loopinfo' isn't known lopart.c:225: warning: unused variable `loopinfo' make[1]: *** [lopart.o] Error 1
make[1]: Leaving directory `/root/Multipath/multipath-tools-0.4.3-pre9/kpartx'
make: *** [recurse] Error 2If you anyone could please help me on getting this to work, This needs to be implemented ASAP...
Allen Sanabria
Systems Administrator I
205 Hudson St 6th Floor
New York, New York 10013--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Signature · 1 line
christophe varoqui <[email protected]>
Alasdair G Kergon
maintainerPatches I needed to build 4.2 attached.
Pick the right one for your architecture.
Patch0: old_dev_t_long.patch
Patch1: old_dev_t_int.patch
Patch2: old_dev_t_short.patch
%ifarch ppc64 x86_64
%patch0 -p1
%endif
%ifarch ppc ia64
%patch1 -p1
%endif
%ifarch i386 s390 s390x
%patch2 -p1
%endif
Alasdair
Signature · 1 line
[email protected]
kpartx/Makefile +1 -2
@@ -29,7 +29,6 @@ glibc: prepare $(OBJS) $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(STRIP) $(EXEC) - $(GZIP) $(EXEC).8 > $(EXEC).8.gz klibc: prepare $(KLIBC) $(OBJS) $(LD) -o $(EXEC) $(CRT0) $(OBJS) $(KLIBC) $(LIBGCC)
@@ -51,7 +50,7 @@ install -d $(DESTDIR)$(bindir) install -m 755 $(EXEC) $(DESTDIR)$(bindir) install -d $(DESTDIR)$(mandir) - install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) + install -m 644 $(EXEC).8 $(DESTDIR)$(mandir) uninstall: rm -f $(DESTDIR)$(bindir)/$(EXEC)
Makefile +2 -2
@@ -12,11 +12,11 @@ devmap_name multipath multipathd kpartx else BUILDDIRS = libmultipath libcheckers path_priority \ - devmap_name multipath multipathd kpartx + multipath multipathd kpartx endif VERSION = $(shell basename ${PWD} | cut -d'-' -f3) -INSTALLDIRS = devmap_name multipath multipathd kpartx path_priority +INSTALLDIRS = multipath multipathd kpartx path_priority all: recurse
multipath/Makefile +1 -8
@@ -31,7 +31,6 @@ glibc: prepare $(OBJS) $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(STRIP) $(EXEC) - $(GZIP) $(EXEC).8 > $(EXEC).8.gz klibc: prepare $(KLIBC) $(OBJS) $(LD) -o $(EXEC) $(CRT0) $(OBJS) $(KLIBC) $(LIBGCC)
@@ -58,16 +57,10 @@ install: install -d $(DESTDIR)$(bindir) install -m 755 $(EXEC) $(DESTDIR)$(bindir)/ - install -d $(DESTDIR)/etc/dev.d/block/ - install -m 755 multipath.dev $(DESTDIR)/etc/dev.d/block/ - install -d $(DESTDIR)/etc/udev/rules.d - install -m 755 multipath.rules $(DESTDIR)/etc/udev/rules.d/ install -d $(DESTDIR)$(mandir) - install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) + install -m 644 $(EXEC).8 $(DESTDIR)$(mandir) uninstall: - rm $(DESTDIR)/etc/dev.d/block/multipath.dev - rm $(DESTDIR)/etc/udev/rules.d/multipath.rules rm $(DESTDIR)$(bindir)/$(EXEC) rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
multipathd/Makefile +1 -2
@@ -42,7 +42,6 @@ $(EXEC): $(OBJS) $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) strip $(EXEC) - $(GZIP) $(EXEC).8 > $(EXEC).8.gz $(CHECKERSLIB)-glibc.a: $(MAKE) -C $(checkersdir) BUILD=glibc glibc
@@ -56,7 +55,7 @@ install -d $(DESTDIR)$(rcdir) install -m 755 multipathd.init $(DESTDIR)$(rcdir)/$(EXEC) install -d $(DESTDIR)$(mandir) - install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) + install -m 644 $(EXEC).8 $(DESTDIR)$(mandir) uninstall: rm -f $(DESTDIR)$(bindir)/$(EXEC)
kpartx/loop.h +2 -2
@@ -79,9 +79,9 @@/* Backwards compatibility version */ struct loop_info {int lo_number;/* ioctl r/o */ -__kernel_old_dev_t lo_device;/* ioctl r/o */ +unsigned int lo_device;/* ioctl r/o */ unsigned long lo_inode;/* ioctl r/o */ -__kernel_old_dev_t lo_rdevice;/* ioctl r/o */ +unsigned int lo_rdevice;/* ioctl r/o */ int lo_offset;int lo_encrypt_type;int lo_encrypt_key_size;/* ioctl w/o */
kpartx/loop.h +2 -2
@@ -79,9 +79,9 @@/* Backwards compatibility version */ struct loop_info {int lo_number;/* ioctl r/o */ -__kernel_old_dev_t lo_device;/* ioctl r/o */ +unsigned long lo_device;/* ioctl r/o */ unsigned long lo_inode;/* ioctl r/o */ -__kernel_old_dev_t lo_rdevice;/* ioctl r/o */ +unsigned long lo_rdevice;/* ioctl r/o */ int lo_offset;int lo_encrypt_type;int lo_encrypt_key_size;/* ioctl w/o */
kpartx/loop.h +2 -2
@@ -79,9 +79,9 @@/* Backwards compatibility version */ struct loop_info {int lo_number;/* ioctl r/o */ -__kernel_old_dev_t lo_device;/* ioctl r/o */ +unsigned short lo_device;/* ioctl r/o */ unsigned long lo_inode;/* ioctl r/o */ -__kernel_old_dev_t lo_rdevice;/* ioctl r/o */ +unsigned short lo_rdevice;/* ioctl r/o */ int lo_offset;int lo_encrypt_type;int lo_encrypt_key_size;/* ioctl w/o */
Quoted 3 lines · Alasdair G Kergon
Patches I needed to build 4.2 attached.
Pick the right one for your architecture.
What problems does the Makefile patch tries to address ? is it redhat specific ?
Also what would be to proper fix to the dev_t define ? Why does it happen only on redhat systems ?
Would you say the problem is in the loop code or in the headers redhat packages ? This code comes from util-linux, mostly unchanged ... how redhat fixed that for util-linux ?
I may have to install a redhat system to debug this out, but quite frankly, I would prefer others to propose the right fix and skip that additional work :)
Regards,
cvaroqui
Quoted 24 lines
Patch0: old_dev_t_long.patch
Patch1: old_dev_t_int.patch
Patch2: old_dev_t_short.patch%ifarch ppc64
x86_64
%patch0 -p1
%endif%ifarch ppc ia64
%patch1 -p1
%endif%ifarch i386 s390 s390x
%patch2 -p1
%endifAlasdair
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Signature · 1 line
christophe varoqui <[email protected]>
Alasdair G Kergon
maintainerQuoted 1 line · christophe varoqui
Also what would be to proper fix to the
dev_tdefine ?
Persuade the glibc-kernheaders people they have a responsibility to provide support through the headers for every linux ioctl, even the ones with nasty structures they wish would go away. Even extensions like O_DIRECT can take years to work their way through for applications to use. [Yes, I'm thinking of when lvm2 started using O_DIRECT on Debian and ended up having to use private #defines for different architectures.]
linux dev_t handling is always a mess - we're left with applications needing workarounds such as maintaining private copies of kernel headers because the glibc ones are inadequate.
e.g. losetup takes its own copy of loop.h and modifies it to use "my_dev_t" with:
/* silliness to get dev_t defined as the kernel defines it */ /* glibc uses a different dev_t */
/* maybe we need __kernel_old_dev_t -- later */
/* for ancient systems use "unsigned short" */
#include <linux/posix_types.h> #define my_dev_t __kernel_dev_t
which does look wrong because:
typedef __u32 __kernel_dev_t;
whereas the kernel's loop.h uses:
__kernel_old_dev_t lo_device;
The intended usage looks something like:
#include <linux/posix_types.h>
/* If, as in RHEL4, __kernel_old_dev_t is not defined, then replace
this #include with the correct definition for the current arch. */
typedef __kernel_old_dev_t dev_t; #include <linux/loop.h>
/* NB Take care if dev_t is used anywhere later in the code
or if lo_device or lo_rdevice are referenced */
The private copy of loop.h does look unnecessary.
Alasdair
Signature · 1 line
[email protected]
Thanks for the detailled explanation.
I'll give a try to this, and wait to see if it solves the build problems people reported.
Quoted 2 lines · Alasdair G Kergon
The private copy of
loop.hdoes look unnecessary.
Regards,
Signature · 1 line
christophe varoqui <[email protected]>
Alasdair G Kergon
maintainerQuoted 2 lines · christophe varoqui
What problems does the
Makefilepatch tries to address ? is it redhat specific ?
RPM scripts handle compression of the man pages.
(There might be a way to tell it the pages are already compressed, I don't know, I was in a hurry and just needed to make things work.)
Alasdair
Signature · 1 line
[email protected]
Quoted 9 lines · Alasdair G Kergon
Quoted 2 lines · christophe varoqui
What problems does the
Makefilepatch tries to address ? is it redhat specific ?RPM scripts handle compression of the man pages.
(There might be a way to tell it the pages are already compressed, I don't know, I was in a hurry and just needed to make things work.)
ok
Do you expect me to apply to patch or is it definitely in the redhat patch pile ?
Regards,
Signature · 1 line
christophe varoqui <[email protected]>