2.6.15-git9 build failure when CONFIG_SWAP is not set
Compile fails when CONFIG_SWAP is not set. Attaching the .config for reference.
...
CHK include/linux/compile.h
UPD include/linux/compile.hmm/built-in.o: In function `swap_pages':mm/mempolicy.c:576: undefined reference to migrate_pages' mm/mempolicy.c:577: undefined reference to putback_lru_pages' mm/mempolicy.c:578: undefined reference to putback_lru_pages' mm/built-in.o: In function migrate_page_add':mm/mempolicy.c:558: undefined reference to isolate_lru_page' mm/built-in.o: In function do_mbind':mm/mempolicy.c:677: undefined reference to putback_lru_pages' mm/built-in.o: In function do_migrate_pages':mm/mempolicy.c:606: undefined reference to `putback_lru_pages'
make: *** [.tmp_vmlinux1] Error 1
Thanks,
Kiran
Please check anoth thread
"can not compile in the latest git"
YH
Quoted 2 lines · Ravikiran G Thirumalai
Compile fails when
CONFIG_SWAPis not set. Attaching the .config for reference.
-- Patch that was sent to Andrew.
Some people apparently run CONFIG_NUMA without CONFIG_SWAP. The migration code currently depends on swap. This patch provides a set of inline fallback functions so that the kernel properly compiles. Howeverver, calls to migration functions will fail.
include/linux/swap.h +5 -0
@@ -180,6 +180,11 @@ extern int isolate_lru_page(struct pageextern int putback_lru_pages (struct list_head *l);extern int migrate_pages (struct list_head *l,struct list_head *t,struct list_head *moved,struct list_head *failed); +#else +static inline int isolate_lru_page (struct page *p) {return -ENOSYS ; } +static inline int putback_lru_pages (struct list_head *l) {return 0 ; } +static inline int migrate_pages (struct list_head *l,struct list_head *t, +struct list_head *moved,struct list_head *failed) {return -ENOSYS ; }#endif #ifdef CONFIG_MMU