* compiling Multipath-tools on RHE4 .
@ 2005-03-22 20:08 Allen Sanabria
2005-03-22 22:43 ` christophe varoqui
0 siblings, 1 reply; 8+ messages in thread
From: Allen Sanabria @ 2005-03-22 20:08 UTC (permalink / raw)
To: dm-devel-
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compiling Multipath-tools on RHE4 .
2005-03-22 20:08 compiling Multipath-tools on RHE4 Allen Sanabria
@ 2005-03-22 22:43 ` christophe varoqui
2005-03-22 22:50 ` Alasdair G Kergon
0 siblings, 1 reply; 8+ messages in thread
From: christophe varoqui @ 2005-03-22 22:43 UTC (permalink / raw)
To: device-mapper development
Try compiling with "make BUILD=klibc"
On mar, 2005-03-22 at 15:08 -0500, Allen Sanabria wrote:
> 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
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
--
christophe varoqui <christophe.varoqui@free.fr>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compiling Multipath-tools on RHE4 .
2005-03-22 22:43 ` christophe varoqui
@ 2005-03-22 22:50 ` Alasdair G Kergon
2005-03-22 23:22 ` christophe varoqui
0 siblings, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2005-03-22 22:50 UTC (permalink / raw)
To: device-mapper development
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
Patches 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
--
agk@redhat.com
[-- Attachment #2: makefile.patch --]
[-- Type: text/plain, Size: 3255 bytes --]
diff -ru multipath-tools-0.4.2-new1/kpartx/Makefile multipath-tools-0.4.2/kpartx/Makefile
--- multipath-tools-0.4.2-new1/kpartx/Makefile 2005-01-23 22:48:05.000000000 +0000
+++ multipath-tools-0.4.2/kpartx/Makefile 2005-03-02 19:24:56.000000000 +0000
@@ -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)
diff -ru multipath-tools-0.4.2-new1/Makefile multipath-tools-0.4.2/Makefile
--- multipath-tools-0.4.2-new1/Makefile 2005-03-02 18:39:00.000000000 +0000
+++ multipath-tools-0.4.2/Makefile 2005-03-02 19:18:01.000000000 +0000
@@ -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
diff -ru multipath-tools-0.4.2-new1/multipath/Makefile multipath-tools-0.4.2/multipath/Makefile
--- multipath-tools-0.4.2-new1/multipath/Makefile 2005-01-23 22:48:05.000000000 +0000
+++ multipath-tools-0.4.2/multipath/Makefile 2005-03-02 19:24:06.000000000 +0000
@@ -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
diff -ru multipath-tools-0.4.2-new1/multipathd/Makefile multipath-tools-0.4.2/multipathd/Makefile
--- multipath-tools-0.4.2-new1/multipathd/Makefile 2005-01-23 22:48:05.000000000 +0000
+++ multipath-tools-0.4.2/multipathd/Makefile 2005-03-02 19:24:29.000000000 +0000
@@ -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)
[-- Attachment #3: old_dev_t_int.patch --]
[-- Type: text/plain, Size: 610 bytes --]
--- multipath-tools-0.4.2/kpartx/loop.h 2005-01-23 22:48:06.000000000 +0000
+++ multipath-tools-0.4.2-new/kpartx/loop.h 2005-03-02 18:16:06.000000000 +0000
@@ -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 */
[-- Attachment #4: old_dev_t_long.patch --]
[-- Type: text/plain, Size: 612 bytes --]
--- multipath-tools-0.4.2/kpartx/loop.h 2005-01-23 22:48:06.000000000 +0000
+++ multipath-tools-0.4.2-new/kpartx/loop.h 2005-03-02 18:16:06.000000000 +0000
@@ -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 */
[-- Attachment #5: old_dev_t_short.patch --]
[-- Type: text/plain, Size: 614 bytes --]
--- multipath-tools-0.4.2/kpartx/loop.h 2005-01-23 22:48:06.000000000 +0000
+++ multipath-tools-0.4.2-new/kpartx/loop.h 2005-03-02 18:16:06.000000000 +0000
@@ -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 */
[-- Attachment #6: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compiling Multipath-tools on RHE4 .
2005-03-22 22:50 ` Alasdair G Kergon
@ 2005-03-22 23:22 ` christophe varoqui
2005-03-23 18:51 ` Alasdair G Kergon
2005-03-23 18:53 ` Alasdair G Kergon
0 siblings, 2 replies; 8+ messages in thread
From: christophe varoqui @ 2005-03-22 23:22 UTC (permalink / raw)
To: device-mapper development
On mar, 2005-03-22 at 22:50 +0000, Alasdair G Kergon wrote:
> 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
>
> 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
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
--
christophe varoqui <christophe.varoqui@free.fr>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compiling Multipath-tools on RHE4 .
2005-03-22 23:22 ` christophe varoqui
@ 2005-03-23 18:51 ` Alasdair G Kergon
2005-03-23 20:52 ` christophe varoqui
2005-03-23 18:53 ` Alasdair G Kergon
1 sibling, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2005-03-23 18:51 UTC (permalink / raw)
To: device-mapper development
On Wed, Mar 23, 2005 at 12:22:03AM +0100, christophe varoqui wrote:
> Also what would be to proper fix to the dev_t define ?
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
--
agk@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compiling Multipath-tools on RHE4 .
2005-03-22 23:22 ` christophe varoqui
2005-03-23 18:51 ` Alasdair G Kergon
@ 2005-03-23 18:53 ` Alasdair G Kergon
2005-03-23 19:14 ` christophe varoqui
1 sibling, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2005-03-23 18:53 UTC (permalink / raw)
To: device-mapper development
On Wed, Mar 23, 2005 at 12:22:03AM +0100, christophe varoqui wrote:
> What problems does the Makefile patch 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
--
agk@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compiling Multipath-tools on RHE4 .
2005-03-23 18:53 ` Alasdair G Kergon
@ 2005-03-23 19:14 ` christophe varoqui
0 siblings, 0 replies; 8+ messages in thread
From: christophe varoqui @ 2005-03-23 19:14 UTC (permalink / raw)
To: device-mapper development
On mer, 2005-03-23 at 18:53 +0000, Alasdair G Kergon wrote:
> On Wed, Mar 23, 2005 at 12:22:03AM +0100, christophe varoqui wrote:
> > What problems does the Makefile patch 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,
--
christophe varoqui <christophe.varoqui@free.fr>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compiling Multipath-tools on RHE4 .
2005-03-23 18:51 ` Alasdair G Kergon
@ 2005-03-23 20:52 ` christophe varoqui
0 siblings, 0 replies; 8+ messages in thread
From: christophe varoqui @ 2005-03-23 20:52 UTC (permalink / raw)
To: device-mapper development
Thanks for the detailled explanation.
I'll give a try to this, and wait to see if it solves the build problems
people reported.
On mer, 2005-03-23 at 18:51 +0000, Alasdair G Kergon wrote:
> The private copy of loop.h does look unnecessary.
>
Regards,
--
christophe varoqui <christophe.varoqui@free.fr>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-03-23 20:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-22 20:08 compiling Multipath-tools on RHE4 Allen Sanabria
2005-03-22 22:43 ` christophe varoqui
2005-03-22 22:50 ` Alasdair G Kergon
2005-03-22 23:22 ` christophe varoqui
2005-03-23 18:51 ` Alasdair G Kergon
2005-03-23 20:52 ` christophe varoqui
2005-03-23 18:53 ` Alasdair G Kergon
2005-03-23 19:14 ` christophe varoqui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.