zfsonlinux/zfs — Issue #530: ZFS build for SLE 11 SP1 with kernel 2.6.32 broken
Author: munix9
Created: 2012-01-13 02:40:33+00:00
State: open

zfsonlinux-spl-spl-0.6.0-rc6-27-g588d900.tar.gz
zfsonlinux-zfs-zfs-0.6.0-rc6-38-g2932b6a.tar.gz

make fails with

make all-recursive
make[1]: Entering directory `/tmp/zfsonlinux-zfs-2932b6a'
Making all in module
make[2]: Entering directory `/tmp/zfsonlinux-zfs-2932b6a/module'
make -C /usr/src/linux-2.6.32.12-0.7-obj/x86_64/default SUBDIRS=`pwd` O=/usr/src/linux-2.6.32.12-0.7-obj/x86_64/default modules
make[3]: Entering directory `/usr/src/linux-2.6.32.12-0.7-obj/x86_64/default'
make -C ../../../linux-2.6.32.12-0.7 O=/usr/src/linux-2.6.32.12-0.7-obj/x86_64/default/. modules
CC [M] /tmp/zfsonlinux-zfs-2932b6a/module/avl/../../module/avl/avl.o
LD [M] /tmp/zfsonlinux-zfs-2932b6a/module/avl/zavl.o
CC [M] /tmp/zfsonlinux-zfs-2932b6a/module/nvpair/../../module/nvpair/nvpair.o
CC [M] /tmp/zfsonlinux-zfs-2932b6a/module/nvpair/../../module/nvpair/nvpair_alloc_spl.o
CC [M] /tmp/zfsonlinux-zfs-2932b6a/module/nvpair/../../module/nvpair/nvpair_alloc_fixed.o
LD [M] /tmp/zfsonlinux-zfs-2932b6a/module/nvpair/znvpair.o
CC [M] /tmp/zfsonlinux-zfs-2932b6a/module/unicode/../../module/unicode/u8_textprep.o
CC [M] /tmp/zfsonlinux-zfs-2932b6a/module/unicode/../../module/unicode/uconv.o
LD [M] /tmp/zfsonlinux-zfs-2932b6a/module/unicode/zunicode.o
CC [M] /tmp/zfsonlinux-zfs-2932b6a/module/zcommon/../../module/zcommon/zfs_deleg.o
In file included from /tmp/zfsonlinux-zfs-2932b6a/include/sys/dmu.h:514,
from /tmp/zfsonlinux-zfs-2932b6a/include/sys/dsl_deleg.h:28,
from /tmp/zfsonlinux-zfs-2932b6a/module/zcommon/../../module/zcommon/zfs_deleg.c:38:
/tmp/zfsonlinux-zfs-2932b6a/include/linux/blkdev_compat.h:41: error: static declaration of ‘blk_fetch_request’ follows non-static declaration
/usr/src/linux-2.6.32.12-0.7/include/linux/blkdev.h:887: error: previous declaration of ‘blk_fetch_request’ was here
/tmp/zfsonlinux-zfs-2932b6a/include/linux/blkdev_compat.h: In function ‘blk_fetch_request’:
/tmp/zfsonlinux-zfs-2932b6a/include/linux/blkdev_compat.h:45: error: implicit declaration of function ‘elv_next_request’
/tmp/zfsonlinux-zfs-2932b6a/include/linux/blkdev_compat.h:45: warning: assignment makes pointer from integer without a cast
/tmp/zfsonlinux-zfs-2932b6a/include/linux/blkdev_compat.h:47: error: implicit declaration of function ‘blkdev_dequeue_request’
/tmp/zfsonlinux-zfs-2932b6a/include/linux/blkdev_compat.h: At top level:
/tmp/zfsonlinux-zfs-2932b6a/include/linux/blkdev_compat.h:55: error: expected ‘)’ before ‘*’ token
/tmp/zfsonlinux-zfs-2932b6a/include/linux/blkdev_compat.h:63: error: static declaration of ‘__blk_end_request’ follows non-static declaration
...

it seems similar to issue 459
https://github.com/zfsonlinux/zfs/issues/459

after patching the generated zfs_config.h file with this lines

--- a/zfs_config.h 2012-01-13 02:07:09.000000000 +0100
+++ b/zfs_config.h 2012-01-13 02:00:56.000000000 +0100
@@ -14,7 +14,7 @@
/* #undef HAVE_BDEV_BLOCK_DEVICE_OPERATIONS */

/* bdev_logical_block_size() is available */
-/* #undef HAVE_BDEV_LOGICAL_BLOCK_SIZE */
+#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1

/* struct super_block has s_bdi */
#define HAVE_BDI 1
@@ -44,28 +44,28 @@
/* #undef HAVE_BLKDEV_GET_BY_PATH */

/* blk_end_request() is available */
-/* #undef HAVE_BLK_END_REQUEST */
+#define HAVE_BLK_END_REQUEST 1

/* blk_end_request() is GPL-only */
-#define HAVE_BLK_END_REQUEST_GPL_ONLY 1
+/* #undef HAVE_BLK_END_REQUEST_GPL_ONLY */

/* blk_fetch_request() is available */
-/* #undef HAVE_BLK_FETCH_REQUEST */
+#define HAVE_BLK_FETCH_REQUEST 1

/* blk_requeue_request() is available */
-/* #undef HAVE_BLK_REQUEUE_REQUEST */
+#define HAVE_BLK_REQUEUE_REQUEST 1

/* blk_rq_bytes() is available */
-/* #undef HAVE_BLK_RQ_BYTES */
+#define HAVE_BLK_RQ_BYTES 1

/* blk_rq_bytes() is GPL-only */
-#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1
+/* #undef HAVE_BLK_RQ_BYTES_GPL_ONLY */

/* blk_rq_pos() is available */
-/* #undef HAVE_BLK_RQ_POS */
+#define HAVE_BLK_RQ_POS 1

/* blk_rq_sectors() is available */
-/* #undef HAVE_BLK_RQ_SECTORS */
+#define HAVE_BLK_RQ_SECTORS 1

/* check_disk_size_change() is available */
#define HAVE_CHECK_DISK_SIZE_CHANGE 1
@@ -104,7 +104,7 @@
#define HAVE_FSYNC_WITH_DENTRY 1

/* blk_disk_ro() is available */
-/* #undef HAVE_GET_DISK_RO */
+#define HAVE_GET_DISK_RO 1

/* Define to 1 if licensed under the GPL */
/* #undef HAVE_GPL_ONLY_SYMBOLS */
@@ -155,10 +155,10 @@
/* #undef HAVE_REQ_SYNC */

/* rq_for_each_segment() is available */
-/* #undef HAVE_RQ_FOR_EACH_SEGMENT */
+#define HAVE_RQ_FOR_EACH_SEGMENT 1

/* rq_is_sync() is available */
-/* #undef HAVE_RQ_IS_SYNC */
+#define HAVE_RQ_IS_SYNC 1

/* set_nlink() is available */
/* #undef HAVE_SET_NLINK */

it compiles fine.

configure seems to be broken?

see also a test-repo on obs (openSUSE build service)
https://build.opensuse.org/project/show?project=home%3Amunix9%3Azfs