conda-forge / osqp-feedstock

A conda-smithy repository for osqp.
BSD 3-Clause "New" or "Revised" License
0 stars 13 forks source link

Depend on libosqp instead of rebuilding it #48

Closed h-vetinari closed 1 year ago

h-vetinari commented 1 year ago

~Upstream has been pushing new versions (0.7.x) that the bot seems to have missed.~

Edit: as it turns out, these were not meant for publication anyway.

Edit²: Split off the version bump into #49, now just doing the switch to conda-forge's libosqp

Closes #37 Closes #36 Closes #35 Xref #25

conda-forge-linter commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

marcelotrevisani commented 1 year ago

@conda-forge-admin please rerender

h-vetinari commented 1 year ago

If you want we can separate this PR from the switch to libosqp, which is trickier than just a version bump

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

h-vetinari commented 1 year ago

Hey @conda-forge/osqp @conda-forge/libosqp After being open for more than 2.5 years (xref #25), I've finally figured out how to build osqp against our existing shared library build of the C-side, libosqp (which contains libosqp.so / libosqp.dylib / osqp.dll etc. per platform).

That would finally bring this feedstock in line with conda-forge best practices, reduce the package footprint, and bring several other benefits.

However, this comes at the cost of having to deactivate the codegen ability of osqp. Basically:

To recap the available options:

  1. patching the codegen to point to the shared libosqp is possible, but:
    • defeats the point of building standalone binaries
    • runs into ABI issues because our libosqp is compiled non-EMBEDDED
  2. copying the osqp/qdldl sources into $SP_DIR/osqp/codegen/sources is also possible, but:
    • creates segfaults when running the codegen tests
    • conceivable that renaming some artefacts (e.g. the internally compiled osqp) would work, but that's not user-friendly either
  3. creating a libosqp with the EMBEDDED ABI (there are three different ones actually!) is not reasonable
  4. leaving the status quo is not desirable either
  5. disable codegen (which I consider the least bad)

So I'm planning to disable codegen here (see the last patch), and wanted to ask if there are objections, alternatives I overlooked, or other thoughts about this.

CC @conda-forge/cvxpy @conda-forge/libqdldl @conda-forge/qdldl-python @vineetbansal @imciner2

traversaro commented 1 year ago

I think it is reasonable to disable codegen. If codegen is needed, one can always install the osqp wheels from PyPI in a conda environment.