CMake Error when building acados with Mingw compiler

Hi :wave:

I have cloned acados for my project in my university windows cluster. I have installed Mingw C compiler installed from Matlab add ons and tried building using Cmake and facing the below error.

This is my mex -setup output:
MEX configured to use ‘MinGW64 Compiler (C)’ for C language compilation.

Please let me know if anyone has solution for this issue.

-interface of acados (C/ Matlab/ Python/ Octave)? Matlab


>> acados_install_windows()
Setting up environment PATH variable
Creating build dir in W:\NMPC\MiL_NMPC\acados\build
Executing cmake configuration
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/ProgramData/MATLAB/SupportPackages/R2022a/3P.instrset/mingw_w64.instrset/bin/gcc.exe
-- Check for working C compiler: C:/ProgramData/MATLAB/SupportPackages/R2022a/3P.instrset/mingw_w64.instrset/bin/gcc.exe - broken
CMake Error at //cifs/cluster/Home/vt402364/WinDocuments/cmake-3.24.2-windows-x86_64/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "C:/ProgramData/MATLAB/SupportPackages/R2022a/3P.instrset/mingw_w64.instrset/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: W:/NMPC/MiL_NMPC/acados/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/ProgramData/MATLAB/SupportPackages/R2022a/3P.instrset/mingw_w64.instrset/bin/mingw32-make.exe -f Makefile cmTC_51c37/fast && C:/ProgramData/MATLAB/SupportPackages/R2022a/3P.instrset/mingw_w64.instrset/bin/mingw32-make.exe  -f CMakeFiles\cmTC_51c37.dir\build.make CMakeFiles/cmTC_51c37.dir/build 
    mingw32-make.exe[1]: Entering directory 'W:/NMPC/MiL_NMPC/acados/build/CMakeFiles/CMakeTmp' 
    CMakeFiles\cmTC_51c37.dir\build.make:76: recipe for target 'CMakeFiles/cmTC_51c37.dir/testCCompiler.c.obj' failed 
    process_begin: CreateProcess(NULL, \cifs\cluster\Home\vt402364\WinDocuments\cmake-3.24.2-windows-x86_64\bin\cmake.exe -E cmake_echo_color --switch= --progress-dir=W:\NMPC\MiL_NMPC\acados\build\CMakeFiles\CMakeTmp\CMakeFiles --progress-num=1 "Building C object CMakeFiles/cmTC_51c37.dir/testCCompiler.c.obj", ...) failed. 
    make (e=2): The system cannot find the file specified.  
    mingw32-make.exe[1]: *** [CMakeFiles/cmTC_51c37.dir/testCCompiler.c.obj] Error 2 
    mingw32-make.exe[1]: Leaving directory 'W:/NMPC/MiL_NMPC/acados/build/CMakeFiles/CMakeTmp' 
    Makefile:126: recipe for target 'cmTC_51c37/fast' failed 
    mingw32-make.exe: *** [cmTC_51c37/fast] Error 2 
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:42 (project)

Thanks and Regards
Raghu

Hi Raghu,

the automatic build process was added very recently and I am not very familiar with it.
Have you tried the manual one?
https://docs.acados.org/installation/#build-acados-manually-mingw