CMake error while Building Acados using Matlab

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

I notice that your mingw installation is on a network share?

That might be an issue. Can you manually complile a sinmple helloWorld.c program with the installed MinGW64 gcc compiler?

I install the ACADOS in Maltab, while I get the follows errors. How do I to correctly install the ACADOS in Windows?
Error using acados_install_windows
cmake command failed. Command was:
cmake.exe -G “MinGW Makefiles” -DACADOS_INSTALL_DIR=%ACADOS_INSTALL_DIR% -DBUILD_SHARED_LIBS=OFF -DACADOS_WITH_OSQP=OFF

What do you mean with “following errors”?
I only see

The relevant part seems to be missing.