LCQPow icon indicating copy to clipboard operation
LCQPow copied to clipboard

Issue: `QPOASES_SCHUR` option basically does not work.

Open hwyao opened this issue 10 months ago • 7 comments

Problem description

When enabling the QPOASES_SCHUR option, the linking always failed.

Ways to reporduce

We can just run cmake .. -DQPOASES_SCHUR=ON in the build folder of this repo, or setup a simple enviroment running the repo as ExternalProject().

ExternalProject_Add(
   # ...
    CMAKE_ARGS 
      -DQPOASES_SCHUR=ON
)

Comparison

Expected: The linking against MATLAB shared objects runs successfully, result can be confirmed by ldd. Actual: Always error even if Matlab is in this machine.

CMake Error at CMakeLists.txt:151 (message):
  Failed to locate one of the following dependencies for Schur Complement
  Method:

  MA57 /libmwma57.so

  BLAS /libmwblas.so

  LAPACK /libmwlapack.so

  METIS /libmwmetis.so

Reason

The reason is actually simple. When inspecting CMakeLists#L103, ${MATLAB_LIBDIR} is used. However the corresponding find_package is in CMakeLists.txt#L344. So this variable will never be available.

hwyao avatar Mar 30 '24 21:03 hwyao