Menu

#92 Compilation failing on RHEL 8.10

v1.0 (example)
open
nobody
None
5
2025-11-05
2025-10-20
naatje80
No

Compilation on RHEL 8.10 currently failing due to. I could temporary fixed this by:
* Lowering the kernel version check to 4,18,0 in compat/include/linux/compiler_attributes.h (possible failing due to backport of fallthrough in RHEL kernel)
* Default GCC option in RHEL 8.10 seems to be -Werror=incompatible-pointer-types. Added sibdir-cclags-y += -Wno-error=incompatible-pointer-types to drivers/gpib/Makefile

Discussion

  • DaveP

    DaveP - 2025-10-23

    What version of linux-gpib are you using ?
    Also please send the compilation error messages.
    thanks,
    -DaveP

     
  • naatje80

    naatje80 - 2025-11-05

    @DaveP: Sorry for the delay. I was using the latest release from the repository itself.

    The first errors I get are (the full error output is to long to directly include here):

    make -C /lib/modules/`uname -r`/build V=0 modules \
                    M="/home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/drivers/gpib" \
                    GPIB_TOP_DIR=/home/myaccount/Downloads/linux-gpib/linux-gpib-kernel \
                    CONFIG_GPIB_ISA="" \
                    GPIB_CONFIG_PCMCIA="0" \
                    HAVE_DEV_OF_NODE= \
                    CLASS_CREATE1ARG=0 \
                    GPIB_CONFIG_KERNEL_DEBUG=0
    make[1]: Entering directory '/usr/src/kernels/4.18.0-553.81.1.el8_10.x86_64'
      CC [M]  /home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/drivers/gpib/agilent_82350b/agilent_82350b.o
    In file included from ././include/linux/compiler_types.h:67,
                     from <command-line>:
    ./include/linux/compiler-gcc.h:182: warning: "fallthrough" redefined
     # define fallthrough   __attribute__((__fallthrough__))
    
    In file included from ././include/linux/compiler_types.h:58,
                     from <command-line>:
    /home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/compat/include/linux/compiler_attributes.h:25: note: this is the location of the previous definition
     #define fallthrough  do {} while (0)  /* fallthrough */
    
    In file included from <command-line>:
    ././include/linux/compiler_types.h:147:58: error: unknown type name __gnu_inline
     #define inline inline                                    __gnu_inline \
                                                              ^~~~~~~~~~~~
    ./arch/x86/include/asm/barrier.h:36:8: note: in expansion of macro inline
     static inline unsigned long array_index_mask_nospec(unsigned long index,
            ^~~~~~
    ././include/linux/compiler_types.h:148:2: warning: variable __maybe_unused declared inline
      __maybe_unused notrace
      ^~~~~~~~~~~~~~
    ./arch/x86/include/asm/barrier.h:36:8: note: in expansion of macro inline
     static inline unsigned long array_index_mask_nospec(unsigned long index,
            ^~~~~~
    ././include/linux/compiler_types.h:148:2: error: no_instrument_function attribute applies only to functions
      __maybe_unused notrace
      ^~~~~~~~~~~~~~
    ./arch/x86/include/asm/barrier.h:36:8: note: in expansion of macro inline
     static inline unsigned long array_index_mask_nospec(unsigned long index,
            ^~~~~~
    In file included from ./include/linux/compiler.h:267,
    ..../
    

    After fixing the above, the second error that required the fix in the make file :

    In file included from ././include/linux/compiler_types.h:58,
                     from <command-line>:
    /home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/compat/include/linux/compiler_attributes.h:29: note: this is the location of the previous definition
     #define fallthrough  do {} while (0)  /* fallthrough */
    
    /home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/drivers/gpib/fmh_gpib/fmh_gpib.c: In function fmh_gpib_attach_impl:
    /home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/drivers/gpib/fmh_gpib/fmh_gpib.c:1388:50: error: passing argument 4 of driver_find_device from incompatible pointer type [-Werror=incompatible-pointer-types]
          NULL, (DRIVER_FIND_DEVICE_DATA_TYPE)config, &fmh_gpib_device_match);
                                                      ^~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/compat/include/linux/device.h:94,
                     from ./include/linux/dmaengine.h:8,
                     from /home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/drivers/gpib/fmh_gpib/fmh_gpib.h:9,
                     from /home/myaccount/Downloads/linux-gpib/linux-gpib-kernel/drivers/gpib/fmh_gpib/fmh_gpib.c:19:
    ./include/linux/device.h:454:16: note: expected int (*)(struct device *, const void *) but argument is of type int (*)(struct device *, void *)
     struct device *driver_find_device(struct device_driver *drv,
                    ^~~~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    
     
  • naatje80

    naatje80 - 2025-11-05

    I just noticed how to upload the logifles. Including those....

     

Log in to post a comment.