Hello!

I am novice to Linux raid.

Based on Slackware 3.5, I have sucessfully patched
raid0145-19981005-C-2.0.35.gz into kernel 2.0.35 and compiled it and it is
running in my Pentium PC. 

Now I am trying to build raidtools-199810-B-0.90.tar.gz. What I got from
make are only mkraid and raidstart executables in ./raidtools-0.90
directory. I don't see the other tools like raidadd, raidrun, raidstop,
ckraid.

Then I tried raidtools-0.50beta3.tar.gz. First the compiler could not find
file /usr/src/linux/include/linux/autoconf.h. After I copied autoconf.h
from somewhere I don't remember, compiler complains a lot:

gcc -g -O2 -I/usr/src/linux/include -DMD_VERSION=\""raidtools-0.50"\"   -c
raidadd.c -o raidadd.o
In file included from raidadd.c:21:
parser.h:17: parse error before `md_superblock_t'
parser.h:17: warning: no semicolon at end of struct or union
parser.h:18: `MD_SB_DISKS' undeclared here (not in a function)
parser.h:19: `MD_SB_DISKS' undeclared here (not in a function)
parser.h:20: `MD_SB_DISKS' undeclared here (not in a function)
parser.h:23: parse error before `}'
parser.h:23: warning: data definition has no type or storage class
parser.h:25: parse error before `*'
parser.h:25: warning: data definition has no type or storage class
parser.h:26: parse error before `*'
parser.h:26: warning: data definition has no type or storage class
raidadd.c:31: parse error before `*'
raidadd.c:31: warning: data definition has no type or storage class
raidadd.c: In function `do_mdadd':
raidadd.c:92: `FLOPPY_MAJOR' undeclared (first use this function)
raidadd.c:92: (Each undeclared identifier is reported only once
raidadd.c:92: for each function it appears in.)
raidadd.c:97: `REGISTER_DEV' undeclared (first use this function)
raidadd.c: In function `do_mdstart':
raidadd.c:112: `START_MD' undeclared (first use this function)
raidadd.c: In function `do_mdstop':
raidadd.c:123: `STOP_MD' undeclared (first use this function)
raidadd.c:126: `STOP_MD_RO' undeclared (first use this function)
raidadd.c: At top level:
raidadd.c:153: parse error before `md_cfg_entry_t'
raidadd.c: In function `handleOneConfig':
raidadd.c:159: `func' undeclared (first use this function)
raidadd.c:161: request for member `md_name' in something not a structure or
union
raidadd.c:162: `MD_SB_DISKS' undeclared (first use this function)
raidadd.c:163: request for member `device_name' in something not a
structure or union
raidadd.c:164: request for member `device_name' in something not a
structure or union
raidadd.c:171: request for member `sb' in something not a structure or union
raidadd.c:172: `LINEAR' undeclared (first use this function)
raidadd.c:173: `RAID0' undeclared (first use this function)
raidadd.c:174: `RAID1' undeclared (first use this function)
raidadd.c:176: `RAID5' undeclared (first use this function)
raidadd.c:180: request for member `sb' in something not a structure or union
raidadd.c:181: request for member `sb' in something not a structure or union
raidadd.c:182: request for member `sb' in something not a structure or union
raidadd.c:184: request for member `md_name' in something not a structure or
union
raidadd.c:185: request for member `md_name' in something not a structure or
union
raidadd.c:189: request for member `md_name' in something not a structure or
union
raidadd.c:190: request for member `md_name' in something not a structure or
union
raidadd.c:194: request for member `md_name' in something not a structure or
union
raidadd.c:195: request for member `md_name' in something not a structure or
union
raidadd.c: In function `main':
raidadd.c:207: `p' undeclared (first use this function)
raidadd.c:208: parse error before `char'
raidadd.c:229: `func' undeclared (first use this function)
raidadd.c:240: `optCon' undeclared (first use this function)
raidadd.c:240: `optionsTable' undeclared (first use this function)
raidadd.c:258: `fp' undeclared (first use this function)
raidadd.c:258: `configFile' undeclared (first use this function)
raidadd.c:280: `args' undeclared (first use this function)
make: *** [raidadd.o] Error 1

Now I went back to raidtools-pre3-0.42.tar.gz:

gcc -g -O2 -I/usr/src/linux/include -DMD_VERSION=\""raidtools-0.42"\"   -c
mdadd.c -o mdadd.o
In file included from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/md.h:21,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/linux/sched.h:97: redefinition of `struct sched_param'
In file included from /usr/src/linux/include/linux/md.h:33,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/linux/proc_fs.h:274: parse error before `filldir_t'
/usr/src/linux/include/linux/proc_fs.h:274: warning: `struct file' declared
inside parameter list
/usr/src/linux/include/linux/proc_fs.h:274: warning: its scope is only this
definition or declaration,
/usr/src/linux/include/linux/proc_fs.h:274: warning: which is probably not
what you want.
In file included from /usr/src/linux/include/net/ip.h:28,
                 from /usr/src/linux/include/net/checksum.h:22,
                 from /usr/src/linux/include/linux/md.h:36,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/net/route.h:77: parse error before `atomic_t'
/usr/src/linux/include/net/route.h:77: warning: no semicolon at end of
struct or union
/usr/src/linux/include/net/route.h:78: warning: data definition has no type
or storage class
/usr/src/linux/include/net/route.h:80: parse error before `rt_lastuse'
/usr/src/linux/include/net/route.h:80: warning: data definition has no type
or storage class
/usr/src/linux/include/net/route.h:87: parse error before `}'
/usr/src/linux/include/net/route.h:103: parse error before `ip_rt_lock'
/usr/src/linux/include/net/route.h:103: warning: data definition has no
type or storage class
/usr/src/linux/include/net/route.h: In function `ip_rt_put':
/usr/src/linux/include/net/route.h:137: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:137: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h: In function `ip_rt_route':
/usr/src/linux/include/net/route.h:154: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:157: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:157: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:159: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:159: `jiffies' undeclared (first use
this function)
/usr/src/linux/include/net/route.h:159: (Each undeclared identifier is
reported only once
/usr/src/linux/include/net/route.h:159: for each function it appears in.)
/usr/src/linux/include/net/route.h:160: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:161: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h: In function `ip_check_route':
/usr/src/linux/include/net/route.h:178: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:178: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:179: dereferencing pointer to incomplete
type
/usr/src/linux/include/net/route.h:179: `RTF_LOCAL' undeclared (first use
this function)
/usr/src/linux/include/asm/atomic.h: At top level:
In file included from /usr/src/linux/include/linux/skbuff.h:20,
                 from /usr/src/linux/include/net/sock.h:43,
                 from /usr/src/linux/include/net/ip.h:34,
                 from /usr/src/linux/include/net/checksum.h:22,
                 from /usr/src/linux/include/linux/md.h:36,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/asm/atomic.h:41: warning: type mismatch with
previous implicit declaration
/usr/src/linux/include/net/route.h:160: warning: previous implicit
declaration of `atomic_inc'
/usr/src/linux/include/asm/atomic.h:41: warning: `atomic_inc' was
previously implicitly declared to return `int'
/usr/src/linux/include/asm/atomic.h:41: warning: `atomic_inc' was declared
implicitly `extern' and later `static'
/usr/src/linux/include/asm/atomic.h:49: warning: type mismatch with
previous implicit declaration
/usr/src/linux/include/net/route.h:115: warning: previous implicit
declaration of `atomic_dec'
/usr/src/linux/include/asm/atomic.h:49: warning: `atomic_dec' was
previously implicitly declared to return `int'
/usr/src/linux/include/asm/atomic.h:49: warning: `atomic_dec' was declared
implicitly `extern' and later `static'
/usr/src/linux/include/asm/atomic.h:57: warning: `atomic_dec_and_test' was
declared implicitly `extern' and later `static'
In file included from /usr/src/linux/include/net/ipx.h:16,
                 from /usr/src/linux/include/net/sock.h:56,
                 from /usr/src/linux/include/net/ip.h:34,
                 from /usr/src/linux/include/net/checksum.h:22,
                 from /usr/src/linux/include/linux/md.h:36,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/net/datalink.h:10: warning: `struct packet_type'
declared inside parameter list
In file included from /usr/src/linux/include/net/ipx.h:51,
                 from /usr/src/linux/include/net/sock.h:56,
                 from /usr/src/linux/include/net/ip.h:34,
                 from /usr/src/linux/include/net/checksum.h:22,
                 from /usr/src/linux/include/linux/md.h:36,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/net/ipxcall.h:2: warning: `struct net_proto'
declared inside parameter list
In file included from /usr/src/linux/include/net/sock.h:56,
                 from /usr/src/linux/include/net/ip.h:34,
                 from /usr/src/linux/include/net/checksum.h:22,
                 from /usr/src/linux/include/linux/md.h:36,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/net/ipx.h:52: warning: `struct packet_type' declared
inside parameter list
In file included from /usr/src/linux/include/net/ip.h:34,
                 from /usr/src/linux/include/net/checksum.h:22,
                 from /usr/src/linux/include/linux/md.h:36,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/net/sock.h:90: field `notifier' has incomplete type
/usr/src/linux/include/net/sock.h:387: parse error before `select_table'
/usr/src/linux/include/linux/raid/md_compatible.h: In function
`md_copy_from_user':
In file included from /usr/src/linux/include/linux/md.h:40,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/linux/raid/md_compatible.h:51: `VERIFY_READ'
undeclared (first use this function)
/usr/src/linux/include/linux/raid/md_compatible.h: In function
`md_copy_to_user':
/usr/src/linux/include/linux/raid/md_compatible.h:63: `VERIFY_WRITE'
undeclared (first use this function)
/usr/src/linux/include/linux/raid/md_compatible.h: In function
`md_flush_signals':
/usr/src/linux/include/linux/raid/md_compatible.h:92: `current' undeclared
(first use this function)
/usr/src/linux/include/linux/raid/md_compatible.h: In function
`md_init_signals':
/usr/src/linux/include/linux/raid/md_compatible.h:99: `current' undeclared
(first use this function)
/usr/src/linux/include/linux/raid/md_compatible.h: At top level:
/usr/src/linux/include/linux/raid/md_compatible.h:105: warning: `struct
task_struct' declared inside parameter list
/usr/src/linux/include/linux/raid/md_compatible.h: In function
`md_signal_pending':
/usr/src/linux/include/linux/raid/md_compatible.h:107: dereferencing
pointer to incomplete type
/usr/src/linux/include/linux/raid/md_compatible.h:107: dereferencing
pointer to incomplete type
/usr/src/linux/include/linux/raid/md_k.h: At top level:
In file included from /usr/src/linux/include/linux/md.h:50,
                 from common.h:26,
                 from mdadd.c:18:
/usr/src/linux/include/linux/raid/md_k.h:192: warning: `struct file'
declared inside parameter list
In file included from mdadd.c:18:
common.h:47: parse error before `md_superblock_t'
common.h:47: warning: no semicolon at end of struct or union
common.h:53: parse error before `}'
common.h:53: warning: data definition has no type or storage class
mdadd.c: In function `do_mdadd':
mdadd.c:66: `REGISTER_DEV' undeclared (first use this function)
mdadd.c: In function `do_mdstart':
mdadd.c:78: `START_MD' undeclared (first use this function)
mdadd.c: In function `do_mdstop':
mdadd.c:89: `STOP_MD' undeclared (first use this function)
mdadd.c: In function `main':
mdadd.c:208: `FAULT_SHIFT' undeclared (first use this function)
make: *** [mdadd.o] Error 1

What did I do wrong?

Kernel 2.1.134 and raidtools-pre3-0.42 also have similar problems. As I
have asked too many questions in this message, I do not include in this
message the complilation log of the other versions this time.

BTW, do I still need "Gadi's raid stop patch" as described in ROOT-RAID-HOWTO?

The other thing is that I already installed linuxthreads. I added flags for
gcc

-D_REENTRANT -lpthread

in kernel Makefile. The following message shows up repeatedly:

gcc:-lpthread: linker input file unused since linking not done

Will this create any trouble?


Regards,

CN

Reply via email to