Re: RHEL 9 build failing

dave penkler <[email protected]> Wed, 27 Aug 2025 09:01:06 +0200
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAL=kjP3WufMHgMF+W8fNXHQfvJNT=BW5JnKDjX-Vja5jdwaZYw@mail.gmail.com>
Hi Chris,
It was fixed with this commit [778a98]
<https://sourceforge.net/p/linux-gpib/git/ci/778a98df97a2b89d401a54515bad3ce2346dd3af/>
,
The latest kernel divers are currently available in the
linux-gpib-git/linux-gpib-kernel directory of the git repo: git clone
https://[email protected]/p/linux-gpib/git linux-gpib-git
I hope to cut a release for 4.3.7 which includes this fix in the next few
weeks.
cheers,
-Dave

On Tue, 26 Aug 2025 at 23:49, Cris Collins <[email protected]> wrote:

> Solved.
> RHEL 9's 5.14 kernel must be showing up as greater than 6.4
> Changed device.h from:
>
> #if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
>
> #define CLASS_CREATE(owner, name) \
>
>         class_create(owner, name)
>
> #else
>
> #define CLASS_CREATE(owner, name) \
>
>         class_create(name)
>
> #endif
>
>
> To:
>
> #define CLASS_CREATE(owner, name) \
>
>         class_create(name)
>
>
>
>
>
> On Tue, Aug 26, 2025 at 3:57 PM Cris Collins <[email protected]>
> wrote:
>
>>
>>
>> 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.
>>
>
>
> --
> 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
>

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