libminc build error

Hi all, I’m trying to build ITK 5.4.5 (stable) from source on Debian Forky. Any idea the cause for this error?

[ 93%] Building C object Modules/ThirdParty/MINC/src/libminc/CMakeFiles/itkminc2.dir/libcommon/ParseArgv.c.o
/home/gsharp/build/src/InsightToolkit-5.4.5/Modules/ThirdParty/MINC/src/libminc/libcommon/ParseArgv.c: In function ‘ParseArgv’:
/home/gsharp/build/src/InsightToolkit-5.4.5/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/gsharp/build/src/InsightToolkit-5.4.5/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,
| ~^~~~~~~~~~~~~ ~~~~~~~~~~~~
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

@Vladimir_Fonov @gdevenyi should be most familiar with MINC, they might have some advice.

probably compiling with newest C standard (i.e c23) instead of c17

I believe I encountered this error with the mingw compile. There is a fix in upstream MINC. I back ported an update to the release-5.4 branch after the prior tag. Please try this branch.

1 Like

Thank you! I’m using gcc 15.2.0. Is there a cmake option I should change?

Deleted. Sorry. You did tell me the ITK branch that is needed.