* Re: problems compiling
@ 2000-04-13 14:01 Rodrigo Moya
2000-04-13 14:12 ` David Woodhouse
0 siblings, 1 reply; 9+ messages in thread
From: Rodrigo Moya @ 2000-04-13 14:01 UTC (permalink / raw)
To: MTD List
Hi all!
I've found again one of the errors I found yesterday: ram_write is
defined both in mtdram.c and mapped.c. I forgot to mention this one, but
yesterday I commented the ram_write definition in mtdram.c.
Is this another problem of mine?
Cheers
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problems compiling
2000-04-13 14:01 problems compiling Rodrigo Moya
@ 2000-04-13 14:12 ` David Woodhouse
0 siblings, 0 replies; 9+ messages in thread
From: David Woodhouse @ 2000-04-13 14:12 UTC (permalink / raw)
To: Rodrigo Moya; +Cc: MTD List
rmoya@tsai.es said:
> I've found again one of the errors I found yesterday: ram_write is
> defined both in mtdram.c and mapped.c. I forgot to mention this one,
> but yesterday I commented the ram_write definition in mtdram.c.
> Is this another problem of mine?
No, this is a real problem - they should both be declared 'static'.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* problems compiling
@ 2000-06-27 14:23 Rodrigo Moya
2000-06-27 14:29 ` David Woodhouse
0 siblings, 1 reply; 9+ messages in thread
From: Rodrigo Moya @ 2000-06-27 14:23 UTC (permalink / raw)
To: mtd
Hi all!
I just updated my local copy of mtd from CVS (after a long time without
doing so), and now, I get the following errors when compiling:
make[5]: Circular /usr/src/linux-2.2.12/include/linux/compatmac.h <-
/usr/src/linux-2.2.12/include/linux/compatmac.h dependency dropped.
gcc -D__KERNEL__ -I/usr/src/linux-2.2.12/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce
-m386 -DCPU=386 -DEXPORT_SYMTAB -c mtdcore.c
mtdcore.c:77: warning: type defaults to `int' in declaration of
`DECLARE_MUTEX'
mtdcore.c:77: warning: parameter names (without types) in function
declaration
mtdcore.c: In function `add_mtd_device':
mtdcore.c:88: `mtd_table_mutex' undeclared (first use in this function)
mtdcore.c:88: (Each undeclared identifier is reported only once
mtdcore.c:88: for each function it appears in.)
mtdcore.c: In function `del_mtd_device':
mtdcore.c:117: `mtd_table_mutex' undeclared (first use in this function)
mtdcore.c: In function `register_mtd_user':
mtdcore.c:145: `mtd_table_mutex' undeclared (first use in this function)
mtdcore.c: In function `unregister_mtd_user':
mtdcore.c:167: `mtd_table_mutex' undeclared (first use in this function)
mtdcore.c: In function `__get_mtd_device':
mtdcore.c:203: `mtd_table_mutex' undeclared (first use in this function)
mtdcore.c: In function `mtd_read_proc':
mtdcore.c:256: `mtd_table_mutex' undeclared (first use in this function)
mtdcore.c: At top level:
mtdcore.c:77: warning: `DECLARE_MUTEX' declared `static' but never defined
make[5]: *** [mtdcore.o] Error 1
make[5]: Leaving directory `/usr/src/linux-2.2.12/drivers/block/mtd'
make[4]: *** [first_rule] Error 2
make[4]: Leaving directory `/usr/src/linux-2.2.12/drivers/block/mtd'
make[3]: *** [_subdir_mtd] Error 2
make[3]: Leaving directory `/usr/src/linux-2.2.12/drivers/block'
make[2]: *** [_subdir_block] Error 2
make[2]: Leaving directory `/usr/src/linux-2.2.12/drivers'
make[1]: *** [_dir_drivers] Error 2
make[1]: Leaving directory `/usr/src/linux-2.2.12'
Looking at the sources, I've seen that the DECLARE_MUTEX is declared in the
sysdep-2.2.h file, but into a:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
...
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
...
#endif
#endif
I've been looking at the kernel sources to see which LINUX_VERSION_CODE was
defined, but haven't found nothing I could understand, so please help me.
It seems to me that an incorrect LINUX_VERSION_CODE is being defined, so
the compilation never reaches the line where the DECLARE_MUTEX is defined.
I'm using kernel 2.2.12 (the one shipped with RH 6.1)
Thanks
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problems compiling
2000-06-27 14:23 Rodrigo Moya
@ 2000-06-27 14:29 ` David Woodhouse
0 siblings, 0 replies; 9+ messages in thread
From: David Woodhouse @ 2000-06-27 14:29 UTC (permalink / raw)
To: rmoya; +Cc: mtd
rmoya@tsai.es said:
> mtdcore.c:77: warning: `DECLARE_MUTEX' declared `static' but never defined
You are using an old version of the kernel. Update to 2.2.16 for various
reasons. If you really can't do that then you can at least make MTD compile
by nabbing include/linux/compatmac.h from 2.2.16 and putting it in place.
rmoya@tsai.es said:
> Looking at the sources, I've seen that the DECLARE_MUTEX is declared
> in the sysdep-2.2.h file, but into a:
We're not using the sysdep-2.2.h file any more. The compatibility macros
have been included into the 2.2.16 kernel.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <38F5ADF6.30B89174@tsai.es>]
* Re: problems compiling
@ 2000-04-12 19:38 ` Rodrigo Moya
2000-04-13 8:25 ` David Woodhouse
0 siblings, 1 reply; 9+ messages in thread
From: Rodrigo Moya @ 2000-04-12 19:38 UTC (permalink / raw)
To: MTD List
Hi all!
After putting the compatmac.h file, I've still problems compiling:
1 - I had to comment the definition of DECLARE_WAITQUEUE in mtd.h, as
it's also defined in compatmac.h. Commenting the same line in
compatmac.h did not compile.
2 - Compiler complained about 'add' not being a member of mtd_notifier.
And it was right, mtd.h contained the following:
struct mtd_notifier {
void (*func)(struct mtd_info *mtd, int num);
struct mtd_notifier *next;
};
So, I guessed I had to change it to:
struct mtd_notifier {
void (*add)(struct mtd_info *mtd);
void (*remove)(struct mtd_info *mtd);
struct mtd_notifier *next;
};
3 - Then, in doc2000.c, it complained about CDSNControl and
CDSN_CTRL_FR_B not being defined. Looking at the header files
(doc2000.h), I saw that it's CSDNControl and CDSN_CTRL_FR_B. So I
changed all this.
4 - Again in doc2000.c, doc->nextdoc (struct DiskOnChip *doc) does not
exist. I couldn't figure out this one.
I suppose all these errors are because I took the sources from CVS, and
that this is development code.
Cheers
N§²æìr¸zǧvéì¹»\x1c®&Þ×m¢f£¢·h§~¶y§h®
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: problems compiling
2000-04-12 19:38 ` Rodrigo Moya
@ 2000-04-13 8:25 ` David Woodhouse
[not found] ` <17190.955625589@devel2.axiom.internal>
0 siblings, 1 reply; 9+ messages in thread
From: David Woodhouse @ 2000-04-13 8:25 UTC (permalink / raw)
To: Rodrigo Moya; +Cc: MTD List
_Please_ turn off the base64 :)
rmoya@tsai.es said:
> 1 - I had to comment the definition of DECLARE_WAITQUEUE in mtd.h, as
> it's also defined in compatmac.h.
> 2 - Compiler complained about 'add' not being a member of mtd_notifier.
You say later that you're using CVS. DECLARE_WAITQUEUE isn't in my version,
and the add/remove members of the struct mtd_notifier _are_:
/* $Id: mtd.h,v 1.8 2000/03/31 14:40:42 dwmw2 Exp $ */
> 3 - Then, in doc2000.c, it complained about CDSNControl and
> CDSN_CTRL_FR_B not being defined.
> 4 - Again in doc2000.c, doc->nextdoc (struct DiskOnChip *doc) does not
> exist. I couldn't figure out this one.
For each of these two, I changed the include files at the same time as I
changed the C files. It's OK in the current CVS:
/* $Id: doc2000.h,v 1.4 2000/03/31 14:40:42 dwmw2 Exp $ */
rmoya@tsai.es said:
> I suppose all these errors are because I took the sources from CVS,
> and that this is development code.
You seem to have an old copy of the include directory. Try 'cvs update -A'
Note that the IO request handling in the current NFTL code (v1.26) is not
working. You need to revert to v1.25 ('cvs update -r 1.25 nftl.c').
Alternatively, you could fix it :)
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* problems compiling
@ 2000-04-12 14:16 Rodrigo Moya
2000-04-12 14:31 ` David Woodhouse
0 siblings, 1 reply; 9+ messages in thread
From: Rodrigo Moya @ 2000-04-12 14:16 UTC (permalink / raw)
To: MTD List
[-- Attachment #1: Type: text/plain, Size: 373 bytes --]
hi all!
I've successfully applied the patches to the kernel, but when compiling
I get lots of errors (see attached file). I haven't investigated too
much why are these errors, but the first is about linux/compatmac.h.
I've seen that the patches are for kernel 2.2.14, and I'm with 2.2.12.
Is that a problem? Does the CVS version work with 2.2x kernels?
Cheers
[-- Attachment #2: output --]
[-- Type: application/octet-stream, Size: 2861 bytes --]
gcc -D__KERNEL__ -I/usr/src/linux-2.2.12/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -m386 -DCPU=386 -DPMC551_DRAM_BUG -DEXPORT_SYMTAB -c mtd.c
mtd.c:32: linux/compatmac.h: No such file or directory
mtd.c:80: warning: type defaults to `int' in declaration of `DECLARE_MUTEX'
mtd.c:80: warning: parameter names (without types) in function declaration
mtd.c: In function `mtd_open':
mtd.c:147: warning: implicit declaration of function `DEBUG'
mtd.c:158: `mtd_table_mutex' undeclared (first use in this function)
mtd.c:158: (Each undeclared identifier is reported only once
mtd.c:158: for each function it appears in.)
mtd.c: In function `mtd_ioctl':
mtd.c:349: `x' undeclared (first use in this function)
mtd.c:349: `y' undeclared (first use in this function)
mtd.c:349: warning: left-hand operand of comma expression has no effect
mtd.c:349: parse error before `struct'
mtd.c:348: warning: unused variable `waitq'
mtd.c:349: `wait' undeclared (first use in this function)
mtd.c:349: warning: left-hand operand of comma expression has no effect
mtd.c:352: `waitq' undeclared (first use in this function)
mtd.c:380: case label not within a switch statement
mtd.c:410: break statement not within loop or switch
mtd.c:414: case label not within a switch statement
mtd.c:445: break statement not within loop or switch
mtd.c:452: default label not within a switch statement
mtd.c:455: warning: control reaches end of non-void function
mtd.c: At top level:
mtd.c:457: parse error before `return'
mtd.c: In function `add_mtd_device':
mtd.c:469: `mtd_table_mutex' undeclared (first use in this function)
mtd.c:480: structure has no member named `add'
mtd.c: In function `del_mtd_device':
mtd.c:497: `mtd_table_mutex' undeclared (first use in this function)
mtd.c:505: structure has no member named `remove'
mtd.c: In function `register_mtd_user':
mtd.c:524: `mtd_table_mutex' undeclared (first use in this function)
mtd.c:531: structure has no member named `add'
mtd.c: In function `unregister_mtd_user':
mtd.c:544: `mtd_table_mutex' undeclared (first use in this function)
mtd.c:552: structure has no member named `remove'
mtd.c: In function `mtd_read_proc':
mtd.c:588: `mtd_table_mutex' undeclared (first use in this function)
mtd.c: At top level:
mtd.c:80: warning: `DECLARE_MUTEX' declared `static' but never defined
mtd.c:676: warning: `cleanup_mtd' defined but not used
make[4]: *** [mtd.o] Error 1
make[4]: Leaving directory `/usr/src/linux-2.2.12/drivers/block/mtd'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/usr/src/linux-2.2.12/drivers/block/mtd'
make[2]: *** [_subdir_mtd] Error 2
make[2]: Leaving directory `/usr/src/linux-2.2.12/drivers/block'
make[1]: *** [_subdir_block] Error 2
make[1]: Leaving directory `/usr/src/linux-2.2.12/drivers'
make: *** [_dir_drivers] Error 2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problems compiling
2000-04-12 14:16 Rodrigo Moya
@ 2000-04-12 14:31 ` David Woodhouse
0 siblings, 0 replies; 9+ messages in thread
From: David Woodhouse @ 2000-04-12 14:31 UTC (permalink / raw)
To: Rodrigo Moya; +Cc: MTD List
rmoya@tsai.es said:
> I haven't investigated too much why are these errors, but the first
> is about linux/compatmac.h.
compatmac.h contains a handful of macros which allow you to use 2.3 code
with 2.2 kernels. If you really can't update your kernel, you should be
able to get away with just grabbing a copy of include/linux/compatmac.h
from a newer kernel.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2000-06-27 14:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-13 14:01 problems compiling Rodrigo Moya
2000-04-13 14:12 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2000-06-27 14:23 Rodrigo Moya
2000-06-27 14:29 ` David Woodhouse
[not found] <38F5ADF6.30B89174@tsai.es>
2000-04-12 19:38 ` Rodrigo Moya
2000-04-13 8:25 ` David Woodhouse
[not found] ` <17190.955625589@devel2.axiom.internal>
2000-04-13 11:36 ` Rodrigo Moya
2000-04-12 14:16 Rodrigo Moya
2000-04-12 14:31 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox