Compilation issue with cmake 4.0.3 on mac

Hi guys,

I am trying to compile acados on mac with M1max. I have cmake 4.0.3 and when I try to run it I get this error

zmario@Marios-MacBook-Pro build % cmake -DACADOS_WITH_QPOASES=ON -DACADOS_WITH_QPDUNES=ON -DACADOS_WITH_HPMPC=ON -DACADOS_PYTHON=ON -DACADOS_OCTAVE=ON .. 
CMake Error at CMakeLists.txt:35 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

If I add that flag then I get complaints about not finding malloc or square root.

Hi Mario,

we also had this issue already in our continuous integration and fixed it by adding the -DCMAKE_POLICY_VERSION_MINIMUM=3.5 flag in Fix Github Action errors by FreyJo · Pull Request #1487 · acados/acados · GitHub
I am not aware of further issues about finding functions from standard libraries.
These are probably Mac specific as they didn’t occur on the Linux based CI script with CMake 4.0.

If you could try to find out more about these further issues, it would be highly appreciated.

Best,
Jonathan

Hi Jonathan,

I would be happy to provide more details, but I do not know how I can do that.

This is what I get:

zmario@Marios-MacBook-Pro build % cmake -DACADOS_WITH_QPOASES=ON -DACADOS_WITH_QPDUNES=ON -DACADOS_WITH_HPMPC=ON -DBLASFEO_TARGET=GENERIC -DACADOS_PYTHON=ON -DACADOS_OCTAVE=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
CMake Deprecation Warning at CMakeLists.txt:35 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type is Release
CMake Deprecation Warning at external/blasfeo/CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The ASM compiler identification is AppleClang
-- Found assembler: /usr/bin/cc
-- Using linear algebra: HIGH_PERFORMANCE
-- Using external BLAS: 0
-- Testing target GENERIC: compilation [success]
-- Testing target GENERIC: run [success]
-- Compiling for target: GENERIC
CMake Deprecation Warning at external/hpipm/CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Using BLASFEO path: 
CMake Deprecation Warning at external/hpmpc/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Deprecation Warning at external/qpdunes/CMakeLists.txt:49 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Deprecation Warning at external/qpoases/CMakeLists.txt:32 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Target: BLASFEO is GENERIC, HPIPM is X64_INTEL_HASWELL
-- Linear algebra: HIGH_PERFORMANCE
-- Matlab MEX (OFF)
-- Octave MEX (ON)
-- Octave Templates (OFF)
-- System name:version Darwin:24.0.0
-- Build type is Release
-- Installation directory is /Users/zmario/src/acados
-- Configuring done (1.2s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/zmario/src/acados/build
zmario@Marios-MacBook-Pro build % make
[  1%] Building C object external/qpoases/CMakeFiles/qpOASES_e.dir/src/Bounds.c.o
/Users/zmario/src/acados/external/qpoases/src/Bounds.c:115:28: error: call to undeclared library function 'malloc' with type 'void *(unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  115 |     void *raw_memory_ptr = malloc(memory_size);
      |                            ^
/Users/zmario/src/acados/external/qpoases/src/Bounds.c:115:28: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
1 error generated.
make[2]: *** [external/qpoases/CMakeFiles/qpOASES_e.dir/src/Bounds.c.o] Error 1
make[1]: *** [external/qpoases/CMakeFiles/qpOASES_e.dir/all] Error 2
make: *** [all] Error 2

Best,
Mario

This error is “new” in Clang and it used to be a warning: New warnings and errors in Clang 16. Basically, QPOases should get updated to fix it ideally, or you should be able to pass -std=c89 into the CFLAGS to use the older C89/90 standard where these undeclared functions are allowed.

Thanks Ian, that’s good to know!
@Mario can you try to compile without qpOASES?
Adding some includes in the acados qpOASES version should not be too difficult either.
We usually compile with the c99 standard, so I guess adding -std=c89 will lead to other issues.

I think that the issue is somewhere else. I think that cmake is skipping some information about standard libraries as now the error is with the square root:

zmario@Marios-MacBook-Pro build % cmake -DACADOS_WITH_QPDUNES=ON -DACADOS_WITH_HPMPC=ON -DBLASFEO_TARGET=GENERIC -DACADOS_PYTHON=ON -DACADOS_OCTAVE=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
CMake Deprecation Warning at CMakeLists.txt:35 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type is Release
CMake Deprecation Warning at external/blasfeo/CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The ASM compiler identification is AppleClang
-- Found assembler: /usr/bin/cc
-- Using linear algebra: HIGH_PERFORMANCE
-- Using external BLAS: 0
-- Testing target GENERIC: compilation [success]
-- Testing target GENERIC: run [success]
-- Compiling for target: GENERIC
CMake Deprecation Warning at external/hpipm/CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Using BLASFEO path: 
CMake Deprecation Warning at external/hpmpc/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Deprecation Warning at external/qpdunes/CMakeLists.txt:49 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Target: BLASFEO is GENERIC, HPIPM is X64_INTEL_HASWELL
-- Linear algebra: HIGH_PERFORMANCE
-- Matlab MEX (OFF)
-- Octave MEX (ON)
-- Octave Templates (OFF)
-- System name:version Darwin:24.0.0
-- Build type is Release
-- Installation directory is /Users/zmario/src/acados
-- Configuring done (1.3s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/zmario/src/acados/build
zmario@Marios-MacBook-Pro build % make
[  0%] Building C object external/qpdunes/CMakeFiles/qpdunes.dir/src/dual_qp.c.o
[  1%] Building C object external/qpdunes/CMakeFiles/qpdunes.dir/src/stage_qp_solver_clipping.c.o
[  1%] Building C object external/qpdunes/CMakeFiles/qpdunes.dir/src/matrix_vector.c.o
[  1%] Building C object external/qpdunes/CMakeFiles/qpdunes.dir/src/setup_qp.c.o
[  2%] Building C object external/qpdunes/CMakeFiles/qpdunes.dir/src/qpdunes_utils.c.o
[  2%] Building C object external/qpdunes/CMakeFiles/qpdunes.dir/interfaces/mpc/setup_mpc.c.o
[  3%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/src/stage_qp_solver_qpoases.cpp.o
[  3%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/Bounds.cpp.o
[  4%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/Constraints.cpp.o
[  4%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/Flipper.cpp.o
[  4%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/Indexlist.cpp.o
[  5%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/LoggedSQProblem.cpp.o
[  5%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/Matrices.cpp.o
[  6%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/MessageHandling.cpp.o
[  6%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/Options.cpp.o
[  7%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/QProblem.cpp.o
[  7%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/QProblemB.cpp.o
[  7%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/SQProblem.cpp.o
[  8%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/SubjectTo.cpp.o
[  8%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/Utils.cpp.o
[  9%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/LAPACKReplacement.cpp.o
[  9%] Building CXX object external/qpdunes/CMakeFiles/qpdunes.dir/externals/qpOASES-3.0beta/src/BLASReplacement.cpp.o
[ 10%] Linking CXX shared library lib/libqpdunes.dylib
[ 10%] Built target qpdunes
[ 11%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/blasfeo_processor_features.c.o
[ 11%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/blasfeo_stdlib.c.o
[ 12%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/d_aux_lib4.c.o
[ 12%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/m_aux_lib44.c.o
[ 13%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/s_aux_lib4.c.o
[ 13%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_daxpy_lib.c.o
[ 13%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_ddot_lib.c.o
[ 14%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgecp_lib4.c.o
[ 14%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgemm_4x4_lib4.c.o
[ 15%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgemm_diag_lib4.c.o
[ 15%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgemv_4_lib4.c.o
[ 16%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgeqrf_4_lib4.c.o
[ 16%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgetr_lib4.c.o
[ 16%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgetrf_pivot_lib4.c.o
[ 17%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dpack_lib4.c.o
[ 17%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_dsymv_4_lib4.c.o
[ 18%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_saxpy_lib.c.o
[ 18%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_sdot_lib.c.o
[ 18%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgecp_lib4.c.o
[ 19%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgemm_4x4_lib4.c.o
[ 19%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgemm_diag_lib4.c.o
[ 20%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgemv_4_lib4.c.o
[ 20%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgetr_lib4.c.o
[ 21%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgetrf_pivot_lib4.c.o
[ 21%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_spack_lib4.c.o
[ 21%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/generic/kernel_ssymv_4_lib4.c.o
[ 22%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/kernel/kernel_align_generic.c.o
[ 22%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/d_blas1_lib4.c.o
[ 23%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/d_blas2_diag_lib.c.o
[ 23%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/d_blas2_lib4.c.o
[ 24%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/d_blas3_diag_lib4.c.o
[ 24%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/d_blas3_lib4.c.o
[ 24%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/d_lapack_lib4.c.o
[ 25%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/s_blas1_lib4.c.o
[ 25%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/s_blas2_diag_lib.c.o
[ 26%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/s_blas2_lib4.c.o
[ 26%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/s_blas3_diag_lib4.c.o
[ 27%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/s_blas3_lib4.c.o
[ 27%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blasfeo_api/s_lapack_lib4.c.o
[ 27%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dcopy.c.o
[ 28%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/daxpy.c.o
[ 28%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/ddot.c.o
[ 29%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dgemm.c.o
[ 29%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dsyrk.c.o
[ 29%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dtrmm.c.o
[ 30%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dtrsm.c.o
[ 30%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dgesv.c.o
[ 31%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dgetrf.c.o
[ 31%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dgetrf_np.c.o
[ 32%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dgetrs.c.o
[ 32%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dlaswp.c.o
[ 32%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dposv.c.o
[ 33%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dpotrf.c.o
[ 33%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dpotrs.c.o
[ 34%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/dtrtrs.c.o
[ 34%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/saxpy.c.o
[ 35%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/sdot.c.o
[ 35%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/sgemm.c.o
[ 35%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/blas_api/strsm.c.o
[ 36%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/d_aux_ext_dep_lib.c.o
[ 36%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/d_aux_ext_dep_lib4.c.o
[ 37%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/i_aux_ext_dep_lib.c.o
[ 37%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/s_aux_ext_dep_lib.c.o
[ 38%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/s_aux_ext_dep_lib4.c.o
[ 38%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/timing.c.o
[ 38%] Building C object external/blasfeo/CMakeFiles/blasfeo.dir/auxiliary/v_aux_ext_dep_lib.c.o
[ 39%] Linking C shared library libblasfeo.dylib
/usr/bin/cc  -std=c99 -Wall -fdiagnostics-show-option -Wno-error -w -DLA_HIGH_PERFORMANCE -DK_MAX_STACK=300 -DBLAS_API -DUSE_C99_MATH -DEXT_DEP -DMACRO_LEVEL=1 -DOS_MAC -DEXTERNAL_BLAS_NONE -O2 -fPIC -DTARGET_GENERIC  -O3 -DNDEBUG -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -o libblasfeo.dylib -install_name @rpath/libblasfeo.dylib CMakeFiles/blasfeo.dir/auxiliary/blasfeo_processor_features.c.o CMakeFiles/blasfeo.dir/auxiliary/blasfeo_stdlib.c.o CMakeFiles/blasfeo.dir/auxiliary/d_aux_lib4.c.o CMakeFiles/blasfeo.dir/auxiliary/m_aux_lib44.c.o CMakeFiles/blasfeo.dir/auxiliary/s_aux_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_daxpy_lib.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_ddot_lib.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgecp_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgemm_4x4_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgemm_diag_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgemv_4_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgeqrf_4_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgetr_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dgetrf_pivot_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dpack_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_dsymv_4_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_saxpy_lib.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_sdot_lib.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgecp_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgemm_4x4_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgemm_diag_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgemv_4_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgetr_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_sgetrf_pivot_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_spack_lib4.c.o CMakeFiles/blasfeo.dir/kernel/generic/kernel_ssymv_4_lib4.c.o CMakeFiles/blasfeo.dir/kernel/kernel_align_generic.c.o CMakeFiles/blasfeo.dir/blasfeo_api/d_blas1_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/d_blas2_diag_lib.c.o CMakeFiles/blasfeo.dir/blasfeo_api/d_blas2_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/d_blas3_diag_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/d_blas3_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/d_lapack_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/s_blas1_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/s_blas2_diag_lib.c.o CMakeFiles/blasfeo.dir/blasfeo_api/s_blas2_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/s_blas3_diag_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/s_blas3_lib4.c.o CMakeFiles/blasfeo.dir/blasfeo_api/s_lapack_lib4.c.o CMakeFiles/blasfeo.dir/blas_api/dcopy.c.o CMakeFiles/blasfeo.dir/blas_api/daxpy.c.o CMakeFiles/blasfeo.dir/blas_api/ddot.c.o CMakeFiles/blasfeo.dir/blas_api/dgemm.c.o CMakeFiles/blasfeo.dir/blas_api/dsyrk.c.o CMakeFiles/blasfeo.dir/blas_api/dtrmm.c.o CMakeFiles/blasfeo.dir/blas_api/dtrsm.c.o CMakeFiles/blasfeo.dir/blas_api/dgesv.c.o CMakeFiles/blasfeo.dir/blas_api/dgetrf.c.o CMakeFiles/blasfeo.dir/blas_api/dgetrf_np.c.o CMakeFiles/blasfeo.dir/blas_api/dgetrs.c.o CMakeFiles/blasfeo.dir/blas_api/dlaswp.c.o CMakeFiles/blasfeo.dir/blas_api/dposv.c.o CMakeFiles/blasfeo.dir/blas_api/dpotrf.c.o CMakeFiles/blasfeo.dir/blas_api/dpotrs.c.o CMakeFiles/blasfeo.dir/blas_api/dtrtrs.c.o CMakeFiles/blasfeo.dir/blas_api/saxpy.c.o CMakeFiles/blasfeo.dir/blas_api/sdot.c.o CMakeFiles/blasfeo.dir/blas_api/sgemm.c.o CMakeFiles/blasfeo.dir/blas_api/strsm.c.o CMakeFiles/blasfeo.dir/auxiliary/d_aux_ext_dep_lib.c.o CMakeFiles/blasfeo.dir/auxiliary/d_aux_ext_dep_lib4.c.o CMakeFiles/blasfeo.dir/auxiliary/i_aux_ext_dep_lib.c.o CMakeFiles/blasfeo.dir/auxiliary/s_aux_ext_dep_lib.c.o CMakeFiles/blasfeo.dir/auxiliary/s_aux_ext_dep_lib4.c.o CMakeFiles/blasfeo.dir/auxiliary/timing.c.o CMakeFiles/blasfeo.dir/auxiliary/v_aux_ext_dep_lib.c.o
[ 39%] Built target blasfeo
[ 39%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/d_cast_qcqp.c.o
[ 40%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/d_cond.c.o
[ 40%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/d_cond_aux.c.o
[ 41%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/d_cond_qcqp.c.o
[ 41%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/d_part_cond.c.o
[ 41%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/d_part_cond_qcqp.c.o
[ 42%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/s_cast_qcqp.c.o
[ 42%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/s_cond.c.o
[ 43%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/s_cond_aux.c.o
[ 43%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/s_cond_qcqp.c.o
[ 43%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/s_part_cond.c.o
[ 44%] Building C object external/hpipm/CMakeFiles/hpipm.dir/cond/s_part_cond_qcqp.c.o
[ 44%] Building C object external/hpipm/CMakeFiles/hpipm.dir/dense_qp/d_dense_qcqp.c.o
[ 45%] Building C object external/hpipm/CMakeFiles/hpipm.dir/dense_qp/d_dense_qcqp_dim.c.o
[ 45%] Building C object external/hpipm/CMakeFiles/hpipm.dir/dense_qp/d_dense_qcqp_ipm.c.o
In file included from /Users/zmario/src/acados/external/hpipm/dense_qp/d_dense_qcqp_ipm.c:212:
/Users/zmario/src/acados/external/hpipm/dense_qp/x_dense_qcqp_ipm.c:843:18: error: call to undeclared library function 'sqrt' with type 'double (double)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  843 |         REAL sqrt_mu0 = sqrt(mu0);
      |                         ^
/Users/zmario/src/acados/external/hpipm/dense_qp/x_dense_qcqp_ipm.c:843:18: note: include the header <math.h> or explicitly provide a declaration for 'sqrt'
1 error generated.
make[2]: *** [external/hpipm/CMakeFiles/hpipm.dir/dense_qp/d_dense_qcqp_ipm.c.o] Error 1
make[1]: *** [external/hpipm/CMakeFiles/hpipm.dir/all] Error 2
make: *** [all] Error 2
zmario@Marios-MacBook-Pro build % 

The file it complains about now seems to be missing an #include <math.h>.

Alternatively, you might try with another compiler to decouple the new cmake and clang issues.

Yeah, I got that, but I doubt that the code is missing that include command. I think that probably cmake didn’t do its job correctly, or am I missing something?

That is a weirder error, because from what I can tell, it should be including the math header inside d_dense_qcqp_ipm when USE_C99_MATH is true - which it appears to be because the earlier link line included it. Those line numbers don’t match with teh HPIPM that is currently in Acados master though, so which version are you trying?