RHEL 9 build failing

Cris Collins <[email protected]> Tue, 26 Aug 2025 15:57:06 -0400
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAFHPGWmUJpZn2MWMnCDBgpMQFnW54D=vv9m4AakOBev8=dWt=w@mail.gmail.com>
Trying to get the ni_usb_gpib driver to compile on a RHEL 9 system with the
5.14.0 kernel. But get the following error. We had been using 4.1.0 under
RHEL 7 without problem.  Any help is appreciated.



CC [M]
/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.o

In file included from
/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/include/compat_device_create.h:30,

                 from
/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:20:

/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:
In function ‘gpib_common_init_module’:

./include/linux/export.h:17:22: error: passing argument 1 of ‘class_create’
from incompatible pointer type [-Werror=incompatible-pointer-types]

   17 | #define THIS_MODULE (&__this_module)

      |                     ~^~~~~~~~~~~~~~~

      |                      |

      |                      struct module *

/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/compat/include/linux/device.h:52:22:
note: in definition of macro ‘CLASS_CREATE’

   52 |         class_create(owner, name)

      |                      ^~~~~

/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:210:35:
note: in expansion of macro ‘THIS_MODULE’

  210 |         gpib_class = CLASS_CREATE(THIS_MODULE, "gpib_common");

      |                                   ^~~~~~~~~~~

In file included from ./include/linux/device.h:31,

                 from
/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/compat/include/linux/device.h:89,

                 from
/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/include/compat_device_create.h:30,

                 from
/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:20:

./include/linux/device/class.h:230:54: note: expected ‘const char *’ but
argument is of type ‘struct module *’

  230 | struct class * __must_check class_create(const char *name);

      |                                          ~~~~~~~~~~~~^~~~

In file included from
/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/include/compat_device_create.h:30,

                 from
/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:20:

/root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/compat/include/linux/device.h:52:9:
error: too many arguments to function ‘class_create’

   52 |         class_create(owner, name)









-- 
This is my G-Mail account. I do not usually check it.

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general