Skip to content

fix(autoware_osqp_interface, autoware_qp_interface): drop the plain osqp name from osqp_vendor_TARGETS - #1570

Open
xmfcx wants to merge 3 commits into
mainfrom
fix/osqp-vendor-plain-target
Open

xmfcx wants to merge 3 commits into
mainfrom
fix/osqp-vendor-plain-target

Conversation

@xmfcx

@xmfcx xmfcx commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

osqp_vendor appends the plain name osqp to osqp_vendor_TARGETS, but no target with this name exists. On ROS 2 Lyrical, ament_cmake_auto links every entry of the list, so both packages fail to link:

/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find -losqp: No such file or directory

Both packages already link osqp::osqp, so they now remove the entry right after autoware_package(). On Humble and Jazzy nothing changes, because ament_target_dependencies() already skips entries that are not targets. The upstream fix is in the osqp_vendor PR below. We remove these lines when it reaches Lyrical.

Related links

How was this PR tested?

See the Verification block below.

Notes for reviewers

Lyrical also needs the OSQP 1.x API change from issue 1569, which comes in a separate PR. Without it, Lyrical stops earlier at osqp/glob_opts.h.

Interface changes

None.

Effects on system behavior

None.

AI usage

AI usage: Written with Claude Code from issue 1569 and a local Lyrical build. A clean-context agent compared this change with other options before the PR.

Self-review: A clean-context agent read the diff, issue 1569, moveit/osqp_vendor PR 4 and the ament_cmake_auto and autoware_cmake macros, in one review round. It built and tested both packages on Humble and Jazzy against a main baseline, with identical link lines, flags and exports, and it confirmed the Lyrical results. It found no code defect. Its four corrections to this body and its clearer code comment are applied.

Verification: Built and tested both packages from this branch on Humble and Jazzy, with 0 test failures. On Lyrical, the same line fixes the -losqp link error on top of the local Lyrical sources.

Humble (Ubuntu 22.04, Docker, this branch)

  • colcon build of both packages: 2 packages finished.
  • autoware_osqp_interface: 29 tests, 0 errors, 0 failures, 7 skipped.
  • autoware_qp_interface: 47 tests, 0 errors, 0 failures, 12 skipped.
  • Link lines with libosqp.so: 4. Link lines with -losqp: 0.

Jazzy (Ubuntu 24.04, host, this branch)

  • colcon build of both packages: 2 packages finished.
  • autoware_osqp_interface: 29 tests, 0 errors, 0 failures, 7 skipped.
  • autoware_qp_interface: 47 tests, 0 errors, 0 failures, 12 skipped.
  • The 4 link lines that use OSQP hold /opt/ros/jazzy/lib/libosqp.so.

Lyrical (Ubuntu 26.04, Docker, no LIBRARY_PATH)

main does not build on Lyrical without the OSQP 1.x API change, so the same line was applied on top of the local Lyrical sources. These sources also have the OSQP 1.x API change and the CMake target export of autowarefoundation/autoware issue 7412, so the test count of autoware_qp_interface differs from Jazzy.

  • Before: cannot find -losqp: No such file or directory in autoware_osqp_interface.
  • After, colcon build of both packages: 2 packages finished.
  • autoware_osqp_interface: 29 tests, 0 errors, 0 failures, 7 skipped.
  • autoware_qp_interface: 49 tests, 0 errors, 0 failures, 12 skipped.
  • autoware_velocity_smoother built on top of both: 1 package finished.
  • -losqp link files in these builds: 0.
  • Not run: this branch on Lyrical with only the OSQP 1.x API PR, without the other local changes.

…sqp name from osqp_vendor_TARGETS

osqp_vendor appends the plain name osqp to osqp_vendor_TARGETS, but no target with this name exists. On Lyrical, ament_cmake_auto links every entry of the list, so the build passes -losqp to the linker without a library path and fails with "cannot find -losqp".

Both packages already link osqp::osqp, so they now remove the entry right after autoware_package(). On Humble and Jazzy nothing changes, because ament_target_dependencies() already skips entries that are not targets. Remove the line when the fixed osqp_vendor reaches Lyrical.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx self-assigned this Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

…_vendor_TARGETS workaround

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 1, 2026
…k error without the linker flag

The spell check does not know the word in the linker flag, so the comment names the error in words.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx
xmfcx requested a review from mitsudome-r December 1, 2026 14:59
@xmfcx
xmfcx marked this pull request as ready for review December 1, 2026 14:59
@xmfcx
xmfcx requested review from a team, maxime-clem, rej55 and takayuki5168 as code owners December 1, 2026 14:59
@codecov

codecov Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.34%. Comparing base (29db97d) to head (f268e0c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1570   +/-   ##
=======================================
  Coverage   82.34%   82.34%           
=======================================
  Files         421      421           
  Lines       23903    23903           
  Branches      147      147           
=======================================
  Hits        19683    19683           
  Misses       4190     4190           
  Partials       30       30           
Flag Coverage Δ *Carryforward flag
full-suite 82.34% <ø> (ø) Carriedforward from 29db97d

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants