Skip to content

Cannot build from source with GCC 15 due to dependency MINC not using C23 #849

Description

@galenlynch

I followed the build instructions but ran into the following problem with dependency MINC, included in the ITK dependency:

/home/glynch/Documents/Code/ANTsPy/itksource/Modules/ThirdParty/MINC/src/libminc/libcommon/ParseArgv.c: In
      function ‘ParseArgv’:
      /home/glynch/Documents/Code/ANTsPy/itksource/Modules/ThirdParty/MINC/src/libminc/libcommon/ParseArgv.c:320:15:
      error: too many arguments to function ‘handlerProc’; expected 0, have 3
        320 |          if ((*handlerProc)(infoPtr->dst, infoPtr->key,
            |              ~^~~~~~~~~~~~~ ~~~~~~~~~~~~
      /home/glynch/Documents/Code/ANTsPy/itksource/Modules/ThirdParty/MINC/src/libminc/libcommon/ParseArgv.c:330:18:
      error: too many arguments to function ‘handlerProc’; expected 0, have 4
        330 |          argc = (*handlerProc)(infoPtr->dst, infoPtr->key,
            |                 ~^~~~~~~~~~~~~ ~~~~~~~~~~~~
      At top level:
      cc1: note: unrecognized command-line option ‘-Wno-c++11-long-long’ may have been intended to silence earlier
      diagnostics
      make[2]: *** [Modules/ThirdParty/MINC/src/libminc/CMakeFiles/itkminc2.dir/build.make:303:
      Modules/ThirdParty/MINC/src/libminc/CMakeFiles/itkminc2.dir/libcommon/ParseArgv.c.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:12406: Modules/ThirdParty/MINC/src/libminc/CMakeFiles/itkminc2.dir/all] Error
      2
      make[1]: *** Waiting for unfinished jobs....
      make: *** [Makefile:156: all] Error 2

This is a known problem with some verisions of MINC due to GCC switching from C17 to C23 with GCC-15.

I will see if I can build MINC by itself and report upstream if it is still a problem there, but wanted to also report it here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions