Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build osqp-eigen from source #136

Closed
jkaob opened this issue Jun 19, 2023 · 2 comments
Closed

Cannot build osqp-eigen from source #136

jkaob opened this issue Jun 19, 2023 · 2 comments

Comments

@jkaob
Copy link

jkaob commented Jun 19, 2023

Hello,
The CI pipeline suddenly failed, as Cmake cannot locate the OsqpEigen installation for our project.

In particular, when installing OsqpEigen, running make leads to errors such as:

../osqp-eigen/include/OsqpEigen/SparseMatrixHelper.hpp:42:37: error: ‘csc’ has not been declared
  42 |                                     csc*& osqpSparseMatrix);
....
../osqp-eigen/include/OsqpEigen/SparseMatrixHelper.tpp:18:5: error: ‘c_int’ was not declared in this scope; did you mean ‘u_int’?
...
 In member function ‘void OsqpEigen::Data::setNumberOfVariables(int)’:
.../osqp-eigen/src/Data.cpp:74:5: error: ‘m_data’ was not declared in this scope; did you mean ‘Data’?
  74 |     m_data->n = n;

and so on.
I thought it might have anything to do with newer releases Eigen or Osqp, but i cannot seem to find any issues with them. I have also tried with earlier tags that used to be compatible. Osqp is installed in /usr/local/share/osqp/.

I have tried changing cmake -DCMAKE_INSTALL_PREFIX:PATH=<custom-folder> ../ to different locations, but to no avail. I have been using docker, with newest stable versions of Eigen and Osqp.
Is this a known problem, or am I doing something completely wrong? I dont understand why this suddenly happened, as we have been successfully passing build tests for many months before.
Thank you for any help!

@traversaro
Copy link
Member

traversaro commented Jun 19, 2023

Hello @jkaob, see #135 .

TL;DR: Now osqp default branch points to the unreleased 1.0.0 version, while osqp-eigen default branch is only compatible with osqp <= 0.6.3 at the moment. In general, if you want to avoid these kind of problems you may want to use tagged verson of dependencies, instead of relying on the latest version of default branches to be compatible.

@jkaob
Copy link
Author

jkaob commented Jun 20, 2023

Thank you for the response, i apologize for not checking the closed issues.
I did check the version of the master branch of osqp, but i misread it and thought it was still 0.6.3.
It now works, like it used to. Also thanks for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants