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

osqp 0.6.2 and 0.6.3 with Ninja generator + osqp build options #23539

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tkhyn
Copy link
Contributor

@tkhyn tkhyn commented Apr 15, 2024

Specify library name and version: osqp/0.6.2 and osqp/0.6.3

This PR fixes issue #16821 by patching OSQP's cmake file to generate the shared and static libraries in different folders.
It also exposes the OSQP build options in the recipe.


@tkhyn tkhyn changed the title Osqp osqp 0.6.2 and 0.6.3 with Ninja generator + osqp build options Apr 15, 2024
@conan-center-bot

This comment has been minimized.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since only either static or shared libraries get packaged, ultimately, I would recommend simply disabling the other one based on BUILD_SHARED_LIBS instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach better too

"ctrlc": [True, False],
"dfloat": [True, False],
"dlong": [True, False],
"coverage": [True, False],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coverage does not really make much sense as a package option. It only has an effect when unit tests are being run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as a library user I don't really care about coverage so happy to skip (done in commits I just pushed), but as the UNITTEST option was handled by the recipe possibly the COVERAGE could be too.

"dfloat": False,
"dlong": True,
"coverage": False,
"mkl_paradisio": True
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An options_description = {...} field would be nice, since the meaning of the options isn't super obvious.

Comment on lines 21 to 27
"printing": [True, False],
"profiling": [True, False],
"ctrlc": [True, False],
"dfloat": [True, False],
"dlong": [True, False],
"coverage": [True, False],
"mkl_paradisio": [True, False]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest skipping the mkl_paradisio option as it is being replaced by OSQP_ALGEBRA_BACKEND in the upcoming v1 release and would have to be deprecated. https://github.com/osqp/osqp/blob/master/CMakeLists.txt#L77-L79

}
default_options = {
"shared": False,
"fPIC": True,
"printing": True,
"profiling": True,
"ctrlc": True,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has been renamed to interrupt in upcoming 1.0 version. Might be worth renaming here as well. https://github.com/osqp/osqp/blob/master/CMakeLists.txt#L83

@AbrilRBS AbrilRBS self-assigned this Apr 15, 2024
@tkhyn
Copy link
Contributor Author

tkhyn commented Apr 17, 2024

Thank you @valgur and @RubenRBS for the feedback. I have implemented the requested changes and learnt a few things on the way!

Note: it doesn't look like shared=True works on Windows though due to the library not exporting any symbols. It looks like it's more a library issue than a recipe issue though (I understand it's fixed in version 1.0), although if you think it's a good thing we could force shared=False on windows.

@AbrilRBS
Copy link
Member

Let's validate out the shared case for windows until 1.0 yes :)

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

1 similar comment
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 6 (627130451f5e792a76dc749f382ba1e3d2c832dd):

  • osqp/0.6.2:
    All packages built successfully! (All logs)

  • osqp/0.6.3:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 6 (627130451f5e792a76dc749f382ba1e3d2c832dd):

  • osqp/0.6.3:
    All packages built successfully! (All logs)

  • osqp/0.6.2:
    All packages built successfully! (All logs)

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

Successfully merging this pull request may close these issues.

4 participants