Problems with Kconfig select across directories
Subsystems (3)
I have this weird problem with Kconfig.
In fs/exofs/Kconfig I have:
# Library to be selected by users
config ORE
tristate
Then
config EXOFS_FS
tristate "exofs: OSD based file system support" depends on SCSI_OSD_ULD
select ORE
help ...
So far so good. Choosing EXOFS_FS in xmenuconfig works fine as expected. But now I add another user say: (It's more complicated but even below does not work)
config NFS_FS
tristate "NFS client support" depends on INET && FILE_LOCKING select LOCKD select SUNRPC select NFS_ACL_SUPPORT if NFS_V3_ACL select ORE help ...
This does not work. The ORE is not compiled and MODPOST complains. (Given EXOFS_FS is not selected since then it will work)
What am I doing wrong? Why can't I "select" in fs/nfs/Kconfig an option in fs/exofs/Kconfig? What can I do different?
Thanks
Boaz
Quoted 5 lines · Boaz Harrosh
This does not work. The ORE is not compiled and MODPOST complains. (Given
EXOFS_FSis not selected since then it will work)What am I doing wrong? Why can't I "select" in
fs/nfs/Kconfigan option infs/exofs/Kconfig? What can I do different?
We're not given much to go by here. So I'll just mention the first thing that I could think of: are you sure all NFS_FS's dependencies are met (like NETWORK_FILESYSTEMS)?
Paul Bolle
Quoted 28 lines · Boaz Harrosh
I have this weird problem with
Kconfig.In
fs/exofs/KconfigI have:# Library to be selected by users
config ORE
tristateThen
configEXOFS_FS
tristate "exofs: OSD based file system support" depends onSCSI_OSD_ULD
select ORE
help ...So far so good. Choosing
EXOFS_FSin xmenuconfig works fine as expected. But now I add another user say: (It's more complicated but even below does not work)config
NFS_FStristate "NFS client support" depends on INET && FILE_LOCKING select LOCKD select SUNRPC select NFS_ACL_SUPPORT if NFS_V3_ACL select ORE help ...
Quoted 2 lines
This does not work. The ORE is not compiled and MODPOST complains. (Given
EXOFS_FSis not selected since then it will work)
fs/Makefile only visits fs/exofs if CONFIG_EXOFS_FS is set.
Michal
Quoted 29 lines · Michal Marek
Quoted 28 lines · Boaz Harrosh
I have this weird problem with
Kconfig.In
fs/exofs/KconfigI have:# Library to be selected by users
config ORE
tristateThen
configEXOFS_FS
tristate "exofs: OSD based file system support" depends onSCSI_OSD_ULD
select ORE
help ...So far so good. Choosing
EXOFS_FSin xmenuconfig works fine as expected. But now I add another user say: (It's more complicated but even below does not work)config
NFS_FStristate "NFS client support" depends on INET && FILE_LOCKING select LOCKD select SUNRPC select NFS_ACL_SUPPORT if NFS_V3_ACL select ORE help ...
Quoted 6 lines
Quoted 2 lines
This does not work. The ORE is not compiled and MODPOST complains. (Given
EXOFS_FSis not selected since then it will work)fs/Makefile only visits fs/exofs if
CONFIG_EXOFS_FSis set.Michal
Bingo. Right on the money. With below patch it works. I'll think about it some more and submit.
Thanks
---
exofs/ore: Select fs/exofs/ folder in Makefile also for ORE only compilation
If any thing from fs/exofs is set the ORE will be selected. So conditionally include fs/exofs in fs/Makefile on ORE set and not EXOFS_FS
Boaz
---
git diff --stat -p -M
fs/Makefile | 2 +- fs/nfs/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
fs/Makefile +1 -1
@@ -120,6 +120,6 @@ obj-$(CONFIG_DEBUG_FS) += debugfs/ obj-$(CONFIG_OCFS2_FS) += ocfs2/ obj-$(CONFIG_BTRFS_FS) += btrfs/ obj-$(CONFIG_GFS2_FS) += gfs2/ -obj-$(CONFIG_EXOFS_FS) += exofs/ +obj-$(CONFIG_ORE) += exofs/ obj-$(CONFIG_CEPH_FS) += ceph/ obj-$(CONFIG_PSTORE) += pstore/
fs/nfs/Kconfig +1 -0
@@ -96,6 +96,7 @@ config PNFS_BLOCK config PNFS_OBJLAYOUT tristate depends on NFS_FS && NFS_V4_1 && SCSI_OSD_ULD + select ORE default m config ROOT_NFS
Quoted 16 lines · Boaz Harrosh
Quoted 5 lines · Michal Marek
Quoted 2 lines · Boaz Harrosh
This does not work. The ORE is not compiled and MODPOST complains. (Given
EXOFS_FSis not selected since then it will work)fs/Makefile only visits fs/exofs if
CONFIG_EXOFS_FSis set.Bingo. Right on the money. With below patch it works. I'll think about it some more and submit.
Thanks
---
exofs/ore: Selectfs/exofs/folder inMakefilealso for ORE only compilationIf any thing from fs/exofs is set the ORE will be selected. So conditionally include fs/exofs in fs/Makefile on ORE set and not
EXOFS_FS
...
fs/Makefile obj-$(CONFIG_DEBUG_FS) += debugfs/ · line 123
Quoted 8 lines
fs/Makefile +1
-1@@ -120,6 +120,6 @@ obj-$(CONFIG_DEBUG_FS) += debugfs/ obj-$(CONFIG_OCFS2_FS) += ocfs2/ obj-$(CONFIG_BTRFS_FS) += btrfs/ obj-$(CONFIG_GFS2_FS) += gfs2/ -obj-$(CONFIG_EXOFS_FS) += exofs/ +obj-$(CONFIG_ORE) += exofs/
Note that changing it to obj-y is also valid. And perhaps more obvious.
Michal
Quoted 29 lines · Michal Marek
Quoted 16 lines · Boaz Harrosh
Quoted 5 lines · Michal Marek
Quoted 2 lines · Boaz Harrosh
This does not work. The ORE is not compiled and MODPOST complains. (Given
EXOFS_FSis not selected since then it will work)fs/Makefile only visits fs/exofs if
CONFIG_EXOFS_FSis set.Bingo. Right on the money. With below patch it works. I'll think about it some more and submit.
Thanks
---
exofs/ore: Selectfs/exofs/folder inMakefilealso for ORE only compilationIf any thing from fs/exofs is set the ORE will be selected. So conditionally include fs/exofs in fs/Makefile on ORE set and not
EXOFS_FS...
fs/Makefile obj-$(CONFIG_DEBUG_FS) += debugfs/ · line 123
Quoted 8 lines
fs/Makefile +1
-1@@ -120,6 +120,6 @@ obj-$(CONFIG_DEBUG_FS) += debugfs/ obj-$(CONFIG_OCFS2_FS) += ocfs2/ obj-$(CONFIG_BTRFS_FS) += btrfs/ obj-$(CONFIG_GFS2_FS) += gfs2/ -obj-$(CONFIG_EXOFS_FS) += exofs/ +obj-$(CONFIG_ORE) += exofs/Note that changing it to obj-y is also valid. And perhaps more obvious.
Quoted 1 line
Michal
Thanks. You read my thoughts. The naming would be off with my change. I'll take your advise and send a patch to Al on Monday.
Cheers
Boaz