Menu

#24 comedi_get_cmd_generic_timed configure test failed

open
nobody
None
5
2025-07-11
2025-06-29
franta
No

When compile xoscope-2.3 (with comedilib-0.13.0 or comedilib-0.12.0) on Fedora 42 x86_64 / gcc-15.1.1, configure test for 4 or 5 comedi_get_cmd_generic_timed(5 parameters) failed for some other reason than parameter number - and then test is incorrectly evaluated as if routine need only 4 parameters. The related part from config.log:

...
configure:8345: checking how many arguments comedi_get_cmd_generic_timed takes
configure:8355: gcc -c -g -O2 -Wall  conftest.c >&5
conftest.c:27:1: error: return type defaults to 'int' [-Wimplicit-int]
   27 | main() {
      | ^~~~
conftest.c: In function 'main':
conftest.c:28:43: error: passing argument 2 of 'comedi_get_cmd_generic_timed' makes integer from pointer without a cast [-Wint-conversion]
   28 |        comedi_get_cmd_generic_timed(NULL, NULL, NULL, 0, 0);
      |                                           ^~~~
      |                                           |
      |                                           void *
In file included from conftest.c:26:
/usr/include/comedilib.h:193:61: note: expected 'unsigned int' but argument is of type 'void *'
  193 | int comedi_get_cmd_generic_timed(comedi_t *dev,unsigned int subdevice,
      |                                                ~~~~~~~~~~~~~^~~~~~~~~
configure:8355: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "xoscope"
| #define PACKAGE_TARNAME "xoscope"
| #define PACKAGE_VERSION "2.3"
| #define PACKAGE_STRING "xoscope 2.3"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "xoscope"
| #define VERSION "2.3"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_TIME_H 1
| #define STDC_HEADERS 1
| #define PERL "/usr/bin/perl"
| #define HAVE_LIBM 1
| #define HAVE_LIBCOMEDI 1
| /* end confdefs.h.  */
| 
| #include <comedilib.h>
| main() {
|        comedi_get_cmd_generic_timed(NULL, NULL, NULL, 0, 0);
| }
configure:8371: result: 4
...

Does anyone have an idea how to fix the test?

Discussion

  • franta

    franta - 2025-06-30

    After some search, it seems as a temporary crutch, changing CFLAGS during configure can be used:

    %configure CFLAGS="%{optflags} -Wno-implicit-int -Wno-int-conversion"
    

    (in my case, change is in RPM packager xoscope.spec file)

     
  • Brent Baccala

    Brent Baccala - 2025-07-11

    Commit 0107c7 should fix this

     

Log in to post a comment.

MongoDB Logo MongoDB