Skip to content

SCST-3.10 Compilation Issues on RHEL9.8, RHEL10.2 and OEL10.1 #355

@dkambleNetapp

Description

@dkambleNetapp

We found some issues with compilation of SCST-3.10 on PreRelease OS RHEL9.8 and RHEL10.2. Also an issue seen in OEL10.1 with UEK Kernel

RHEL9.8 failure:

[2026-03-18 14:36:54]   CC [M]  //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers/scst_vdisk.o
[2026-03-18 14:36:55] In file included from //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers/../../include/scst.h:71,
[2026-03-18 14:36:55]                  from //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers/scst_vdisk.c:66:
[2026-03-18 14:36:55] //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers/../../include/backport.h:1800: warning: "timer_container_of" redefined
[2026-03-18 14:36:55]  1800 | #define timer_container_of from_timer
[2026-03-18 14:36:55]       |
[2026-03-18 14:36:55] In file included from ./include/linux/workqueue.h:9,
[2026-03-18 14:36:55]                  from ./include/linux/srcu.h:21,
[2026-03-18 14:36:55]                  from ./include/linux/notifier.h:16,
[2026-03-18 14:36:55]                  from ./arch/x86/include/asm/uprobes.h:13,
[2026-03-18 14:36:55]                  from ./include/linux/uprobes.h:49,
[2026-03-18 14:36:55]                  from ./include/linux/mm_types.h:16,
[2026-03-18 14:36:55]                  from ./include/linux/mmzone.h:22,
[2026-03-18 14:36:55]                  from ./include/linux/gfp.h:7,
[2026-03-18 14:36:55]                  from ./include/linux/xarray.h:15,
[2026-03-18 14:36:55]                  from ./include/linux/list_lru.h:14,
[2026-03-18 14:36:55]                  from ./include/linux/fs.h:13,
[2026-03-18 14:36:55]                  from ./include/uapi/linux/aio_abi.h:31,
[2026-03-18 14:36:55]                  from ./include/linux/aio.h:5,
[2026-03-18 14:36:55]                  from //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers/scst_vdisk.c:29:
[2026-03-18 14:36:55] ./include/linux/timer.h:139: note: this is the location of the previous definition
[2026-03-18 14:36:55]   139 | #define timer_container_of(var, callback_timer, timer_fieldname)        \
[2026-03-18 14:36:55]       |
[2026-03-18 14:36:55] //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers/scst_vdisk.c: In function ‘vdisk_create_bioset’:
[2026-03-18 14:36:55] //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers/scst_vdisk.c:6551:23: error: implicit declaration of function ‘bioset_integrity_create’; did you mean ‘bio_integrity_clone’? [-Werror=implicit-function-declaration]
[2026-03-18 14:36:55]  6551 |                 res = bioset_integrity_create(virt_dev->vdisk_bioset, 2);
[2026-03-18 14:36:55]       |                       ^~~~~~~~~~~~~~~~~~~~~~~
[2026-03-18 14:36:55]       |                       bio_integrity_clone
[2026-03-18 14:36:57] cc1: some warnings being treated as errors
[2026-03-18 14:36:57] make[4]: *** [scripts/Makefile.build:250: //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers/scst_vdisk.o] Error 1
[2026-03-18 14:36:57] make[3]: *** [Makefile:1968: //root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src/dev_handlers] Error 2
[2026-03-18 14:36:57] make[3]: Leaving directory '/usr/src/kernels/5.14.0-687.el9.x86_64'
[2026-03-18 14:36:57] make[2]: *** [Makefile:84: all] Error 2
[2026-03-18 14:36:57] make[2]: Leaving directory '/root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst/src'
[2026-03-18 14:36:57] make[1]: *** [Makefile:39: install] Error 2
[2026-03-18 14:36:57] make[1]: Leaving directory '/root/project.tfXOPt/project1.12.0/project1.12.0/dist/scst/scst/scst'
[2026-03-18 14:36:57] make: *** [Makefile:218: scst_install] Error 2

RHEL10.2 failure:

root@localhost:~# tail -45 install_20260318143426.log
[2026-03-18 14:34:36]
[2026-03-18 14:34:36] make[3]: Entering directory '/usr/src/kernels/6.12.0-211.1.1.el10_2.x86_64'
[2026-03-18 14:34:37]   CC [M]  //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/scst_copy_mgr.o
[2026-03-18 14:34:41] In file included from //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/../include/scst.h:71,
[2026-03-18 14:34:41]                  from //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/scst_copy_mgr.c:16:
[2026-03-18 14:34:41] //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/../include/backport.h:253:28: error: static declaration of ‘blk_mq_num_possible_queues’ follows non-static declaration
[2026-03-18 14:34:41]   253 | static inline unsigned int blk_mq_num_possible_queues(unsigned int max_queues)
[2026-03-18 14:34:41]       |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
[2026-03-18 14:34:41] In file included from ./include/linux/t10-pi.h:6,
[2026-03-18 14:34:41]                  from ./include/scsi/scsi_cmnd.h:7,
[2026-03-18 14:34:41]                  from //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/../include/scst.h:61:
[2026-03-18 14:34:41] ./include/linux/blk-mq.h:954:14: note: previous declaration of ‘blk_mq_num_possible_queues’ with type ‘unsigned int(unsigned int)’
[2026-03-18 14:34:41]   954 | unsigned int blk_mq_num_possible_queues(unsigned int max_queues);
[2026-03-18 14:34:41]       |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
[2026-03-18 14:34:41] //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/../include/backport.h:258:28: error: static declaration of ‘blk_mq_num_online_queues’ follows non-static declaration
[2026-03-18 14:34:41]   258 | static inline unsigned int blk_mq_num_online_queues(unsigned int max_queues)
[2026-03-18 14:34:41]       |                            ^~~~~~~~~~~~~~~~~~~~~~~~
[2026-03-18 14:34:41] ./include/linux/blk-mq.h:955:14: note: previous declaration of ‘blk_mq_num_online_queues’ with type ‘unsigned int(unsigned int)’
[2026-03-18 14:34:41]   955 | unsigned int blk_mq_num_online_queues(unsigned int max_queues);
[2026-03-18 14:34:41]       |              ^~~~~~~~~~~~~~~~~~~~~~~~
[2026-03-18 14:34:41] //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/../include/backport.h:1800:9: warning: "timer_container_of" redefined
[2026-03-18 14:34:41]  1800 | #define timer_container_of from_timer
[2026-03-18 14:34:41]       |         ^~~~~~~~~~~~~~~~~~
[2026-03-18 14:34:41] In file included from ./include/linux/workqueue.h:10,
[2026-03-18 14:34:41]                  from ./include/linux/srcu.h:21,
[2026-03-18 14:34:41]                  from ./include/linux/notifier.h:16,
[2026-03-18 14:34:41]                  from ./arch/x86/include/asm/uprobes.h:13,
[2026-03-18 14:34:41]                  from ./include/linux/uprobes.h:61,
[2026-03-18 14:34:41]                  from ./include/linux/mm_types.h:16,
[2026-03-18 14:34:41]                  from ./include/linux/mmzone.h:22,
[2026-03-18 14:34:41]                  from ./include/linux/gfp.h:7,
[2026-03-18 14:34:41]                  from ./include/linux/slab.h:16,
[2026-03-18 14:34:41]                  from //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/scst_copy_mgr.c:10:
[2026-03-18 14:34:41] ./include/linux/timer.h:132:9: note: this is the location of the previous definition
[2026-03-18 14:34:41]   132 | #define timer_container_of(var, callback_timer, timer_fieldname)        \
[2026-03-18 14:34:41]       |         ^~~~~~~~~~~~~~~~~~
[2026-03-18 14:34:41] make[5]: *** [scripts/Makefile.build:229: //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src/scst_copy_mgr.o] Error 1
[2026-03-18 14:34:41] make[4]: *** [/usr/src/kernels/6.12.0-211.1.1.el10_2.x86_64/Makefile:1994: //root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src] Error 2
[2026-03-18 14:34:41] make[3]: *** [Makefile:242: __sub-make] Error 2
[2026-03-18 14:34:41] make[3]: Leaving directory '/usr/src/kernels/6.12.0-211.1.1.el10_2.x86_64'
[2026-03-18 14:34:41] make[2]: *** [Makefile:83: all] Error 2
[2026-03-18 14:34:41] make[2]: Leaving directory '/root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst/src'
[2026-03-18 14:34:41] make[1]: *** [Makefile:39: install] Error 2
[2026-03-18 14:34:41] make[1]: Leaving directory '/root/project.mD99Rk/project1.12.0/project1.12.0/dist/scst/scst/scst'
[2026-03-18 14:34:41] make: *** [Makefile:218: scst_install] Error 2
root@localhost:~#

OEL10.1 failure:

make[3]: Entering directory '/usr/src/kernels/6.12.0-200.74.27.el10uek.x86_64'
  CC [M]  /root/patch_work/scst_patched_2/scst/src/scst_copy_mgr.o
In file included from /root/patch_work/scst_patched_2/scst/src/../include/scst.h:71,
                 from /root/patch_work/scst_patched_2/scst/src/scst_copy_mgr.c:16:
/root/patch_work/scst_patched_2/scst/src/../include/backport.h:780:9: error: "secs_to_jiffies" redefined [-Werror]
  780 | #define secs_to_jiffies(_secs) (unsigned long)((_secs) * HZ)
      |         ^~~~~~~~~~~~~~~
In file included from ./include/linux/ktime.h:25,
                 from ./include/linux/timer.h:6,
                 from ./include/linux/workqueue.h:9,
                 from ./include/linux/srcu.h:21,
                 from ./include/linux/notifier.h:16,
                 from ./arch/x86/include/asm/uprobes.h:13,
                 from ./include/linux/uprobes.h:52,
                 from ./include/linux/mm_types.h:16,
                 from ./include/linux/mmzone.h:23,
                 from ./include/linux/gfp.h:7,
                 from ./include/linux/slab.h:16,
                 from /root/patch_work/scst_patched_2/scst/src/scst_copy_mgr.c:10:
./include/linux/jiffies.h:540:9: note: this is the location of the previous definition
  540 | #define secs_to_jiffies(_secs) ((_secs) * HZ)
      |         ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:229: /root/patch_work/scst_patched_2/scst/src/scst_copy_mgr.o] Error 1
make[4]: *** [/usr/src/kernels/6.12.0-200.74.27.el10uek.x86_64/Makefile:1961: /root/patch_work/scst_patched_2/scst/src] Error 2
make[3]: *** [Makefile:226: __sub-make] Error 2
make[3]: Leaving directory '/usr/src/kernels/6.12.0-200.74.27.el10uek.x86_64'
make[2]: *** [Makefile:83: all] Error 2
make[2]: Leaving directory '/root/patch_work/scst_patched_2/scst/src'
make[1]: *** [Makefile:39: install] Error 2
make[1]: Leaving directory '/root/patch_work/scst_patched_2/scst'
make: *** [Makefile:218: scst_install] Error 2

The temporary fixes for these problems are:

RHEL9.8 patch:

diff -ruN scst/scst/include/backport.h scst_patched/scst/include/backport.h
--- scst/scst/include/backport.h	2025-12-30 03:35:55.000000000 -0500
+++ scst_patched/scst/include/backport.h	2026-03-19 15:49:27.703635379 -0400
@@ -130,6 +130,11 @@
 #define BIO_MAX_VECS BIO_MAX_PAGES
 #endif

+#if !defined(BIOSET_NEED_INTEGRITY) && \
+    (defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE -0 >= RHEL_RELEASE_VERSION(9, 8))
+#define BIOSET_NEED_INTEGRITY (1 << 4)
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0) &&		\
 	(!defined(RHEL_RELEASE_CODE) ||				\
 	 RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 1))
@@ -1796,9 +1801,12 @@
  * See also commit 41cb08555c41 ("treewide, timers: Rename from_timer() to
  * timer_container_of()") # v6.16.
  */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) && \
+    (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(9, 8))
+#ifndef timer_container_of
 #define timer_container_of from_timer
 #endif
+#endif

 /*
  * See also commit 1d27e3e2252b ("timer: Remove expires and data arguments
diff -ruN scst/scst/src/dev_handlers/scst_vdisk.c scst_patched/scst/src/dev_handlers/scst_vdisk.c
--- scst/scst/src/dev_handlers/scst_vdisk.c	2025-12-30 03:35:55.000000000 -0500
+++ scst_patched/scst/src/dev_handlers/scst_vdisk.c	2026-03-18 18:49:36.812621386 -0400
@@ -6523,15 +6523,21 @@
 static int vdisk_create_bioset(struct scst_vdisk_dev *virt_dev)
 {
 	int res = 0;
-
+#if defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE -0 >= RHEL_RELEASE_VERSION(9, 8)
+        int flags = BIOSET_NEED_BVECS;
+        if (virt_dev->dif_mode & SCST_DIF_MODE_DEV)
+                flags |= BIOSET_NEED_INTEGRITY;
+#else
+        int flags = BIOSET_NEED_BVECS;
+#endif
 	EXTRACHECKS_BUG_ON(virt_dev->vdisk_bioset || !virt_dev->blockio);

 	/* Pool size doesn't really matter */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
 	virt_dev->vdisk_bioset = &virt_dev->vdisk_bioset_struct;
-	res = bioset_init(&virt_dev->vdisk_bioset_struct, 2, 0, BIOSET_NEED_BVECS);
+	res = bioset_init(&virt_dev->vdisk_bioset_struct, 2, 0, flags);
 #else
-	virt_dev->vdisk_bioset = bioset_create(2, 0, BIOSET_NEED_BVECS);
+	virt_dev->vdisk_bioset = bioset_create(2, 0, flags);
 	if (!virt_dev->vdisk_bioset)
 		res = -ENOMEM;
 #endif
@@ -6542,7 +6548,8 @@

 #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0) &&		\
 	(!defined(RHEL_RELEASE_CODE) ||				\
-	 RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(10, 1))
+         (RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(10, 1) &&  \
+          RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 8)))
 	/*
 	 * See also commit 105ca2a2c2ff ("block: split struct bio_integrity_payload") #v6.15.
 	 */

RHEL10.2 patch:

diff -ruN scst/scst/include/backport.h scst_patched/scst/include/backport.h
--- scst/scst/include/backport.h	2025-12-30 03:35:55.000000000 -0500
+++ scst_patched/scst/include/backport.h	2026-03-19 15:53:14.845710415 -0400
@@ -240,7 +240,8 @@
 #define blk_execute_rq_nowait blk_execute_rq_nowait_backport
 #endif

-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 17, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 17, 0) && \
+    (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(10, 2))
 static inline unsigned int blk_mq_num_queues(const struct cpumask *mask,
 					     unsigned int max_queues)
 {
@@ -1796,9 +1797,12 @@
  * See also commit 41cb08555c41 ("treewide, timers: Rename from_timer() to
  * timer_container_of()") # v6.16.
  */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) && \
+    (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(10, 2))
+#ifndef timer_container_of
 #define timer_container_of from_timer
 #endif
+#endif

 /*
  * See also commit 1d27e3e2252b ("timer: Remove expires and data arguments

Kernel 6.12 (OEL10.1) patch:

diff -ruN scst/scst/include/backport.h scst_patched/scst/include/backport.h
--- scst/scst/include/backport.h        2025-12-30 03:35:55.000000000 -0500
+++ scst_patched/scst/include/backport.h        2026-03-25 11:44:52.526700895 -0400
@@ -770,8 +770,10 @@
  * See also commit 3740dcdf8a77 ("jiffies: add time comparison functions for 64 bit jiffies")
  * # v4.9.
  */
+#ifndef
 #define time_is_before_jiffies64(a) time_after64(get_jiffies_64(), a)
 #endif
+#endif

 #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
 /*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions