Skip to contentSkip to conversation

2.6.14-rc5 fails to build with out CONFIG_FUTEX

PATCH In review George Anzinger 3 participants 6 messages Oct 24, 2005 – Oct 25, 2005 Futex

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.6.14-rc5 fails to build with out CONFIG_FUTEX

Both kernel/exit.c and fs/dcache.c refer to functions in kernel/futex.c which is not built unless CONFIG_FUTEX is true. This causes a build failure at link time:
LD vmlinux
kernel/built-in.o(.text+0xab58): In function `do_exit':
/usr/src/linux-2.6.14-rc/kernel/exit.c:851: undefined reference to `exit_futex'
fs/built-in.o(.text+0x1b2bf): In function `dput':
/usr/src/linux-2.6.14-rc/fs/dcache.c:165: undefined reference to `futex_free_robust_list'

Attached patch "defines" away the problem.

Signature · 2 lines
George Anzinger   [email protected]
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/

Source: MontaVista Software, Inc.

Type: Defect Fix
Description:
CONFIG_FUTEX is an option but kernel/exit.c and fs/dcache.c refer to functions in kernel/futux.c unconditionally. This patch ties those request off and allows a build with CONFIG_FUTEX "not set".

 include/linux/futex.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)
include/linux/futex.h +5 -1
Index: linux-2.6.14-rc/include/linux/futex.h
===================================================================
@@ -35,9 +35,13 @@
 long do_futex(unsigned long uaddr, int op, int val,
 		unsigned long timeout, unsigned long uaddr2, int val2,
 		int val3);
-
+#ifdef CONFIG_FUTEX
 extern void futex_free_robust_list(struct inode *inode);
 extern void exit_futex(struct task_struct *tsk);
+#else
+#define futex_free_robust_list(a)
+#define exit_futex(b)
+#endif
 static inline void futex_init_inode(struct inode *inode)
 {
 	INIT_LIST_HEAD(&inode->i_data.robust_list);
#1 lore raw
Quoted 8 lines · George Anzinger

Both kernel/exit.c and fs/dcache.c refer to functions in kernel/futex.c which is not built unless CONFIG_FUTEX is true. This causes a build failure at link time:
LD vmlinux
kernel/built-in.o(.text+0xab58): In function `do_exit':
/usr/src/linux-2.6.14-rc/kernel/exit.c:851: undefined reference to exit_futex' fs/built-in.o(.text+0x1b2bf): In function dput':
/usr/src/linux-2.6.14-rc/fs/dcache.c:165: undefined reference to `futex_free_robust_list'

This problem is specific to the robust-futexes patch.

#2 lore raw
Quoted 11 lines · Andrew Morton
Quoted 6 lines · George Anzinger

Both kernel/exit.c and fs/dcache.c refer to functions in kernel/futex.c which is not built unless CONFIG_FUTEX is true. This causes a build failure at link time:
LD vmlinux
kernel/built-in.o(.text+0xab58): In function `do_exit':
/usr/src/linux-2.6.14-rc/kernel/exit.c:851: undefined reference to `exit_futex'
fs/built-in.o(.text+0x1b2bf): In function `dput':
/usr/src/linux-2.6.14-rc/fs/dcache.c:165: undefined reference to `futex_free_robust_list'

This problem is specific to the robust-futexes patch.

And that appears to be in rc5, right?

Signature · 2 lines
George Anzinger   [email protected]
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/
#3 lore raw
Quoted 13 lines · George Anzinger
Quoted 11 lines · Andrew Morton
Quoted 7 lines · George Anzinger

Both kernel/exit.c and fs/dcache.c refer to functions in kernel/futex.c which is not built unless CONFIG_FUTEX is true. This causes a build failure at link time:
LD vmlinux
kernel/built-in.o(.text+0xab58): In function `do_exit':
/usr/src/linux-2.6.14-rc/kernel/exit.c:851: undefined reference to exit_futex' fs/built-in.o(.text+0x1b2bf): In function dput':
/usr/src/linux-2.6.14-rc/fs/dcache.c:165: undefined reference to `futex_free_robust_list'

Quoted 4 lines
Quoted 1 line

This problem is specific to the robust-futexes patch.

And that appears to be in rc5, right?

Nope. Your patch is not applicable to mainline kernels.

#4 lore raw
Quoted 15 lines · Andrew Morton
Quoted 13 lines · George Anzinger
Quoted 11 lines · Andrew Morton
Quoted 6 lines · George Anzinger

Both kernel/exit.c and fs/dcache.c refer to functions in kernel/futex.c which is not built unless CONFIG_FUTEX is true. This causes a build failure at link time:
LD vmlinux
kernel/built-in.o(.text+0xab58): In function `do_exit':
/usr/src/linux-2.6.14-rc/kernel/exit.c:851: undefined reference to `exit_futex'
fs/built-in.o(.text+0x1b2bf): In function `dput':
/usr/src/linux-2.6.14-rc/fs/dcache.c:165: undefined reference to `futex_free_robust_list'

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

This problem is specific to the robust-futexes patch.

And that appears to be in rc5, right?

Ok, got it, excuse the noise.

Signature · 2 lines
George Anzinger   [email protected]
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/
#5 lore raw
In reply to George Anzinger
Quoted 3 lines · George Anzinger

Both kernel/exit.c and fs/dcache.c refer to functions in kernel/futex.c which is not built unless CONFIG_FUTEX is true. This causes a build failure at link time:

uhm, -rt5 you wanted to write, and a different Cc: list, right? :-)

otherwise, thanks and applied.

Ingo