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

Action_msgs not findable, because of relocation from /ros_ws/install/action_msgs/share/action_msgs/rust to /ros_ws/install/share/action_msgs/rust/ #397

Open
Guelakais opened this issue May 2, 2024 · 3 comments

Comments

@Guelakais
Copy link
Contributor

Since this error is relatively new, I wanted to show it. So colcon tries to find the action_msgs when building my package and searches incorrectly.

--- stderr: simple_ros_rs                                                                                                                                                                                             
error: failed to load source for dependency `action_msgs`

Caused by:
  Unable to update /ros_ws/install/action_msgs/share/action_msgs/rust

Caused by:
  failed to read `/ros_ws/install/action_msgs/share/action_msgs/rust/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
---

As you can see, it looks for the library in the /ros_ws/install/action_msgs/share/action_msgs/rust path, where it can't find it. Actually, the library is in the path /ros_ws/install/share/action_msgs/rust/.
The comand, with whicht I'm building my packages is colcon build --continue-on-error --build-base /ros_ws/build --install-base /ros_ws/install --base-paths /ros_default /ros_ws /microros_ws --merge-install

@Guelakais
Copy link
Contributor Author

So actually the colcon flag --merge-install makes the dependencies appear in install/share/ folder instead of directly in /install folder, which leads to confusion when building. If I see this correctly, the whole thing is rather a bug of cargo-ament-build than of colcon directly.

@esteve
Copy link
Collaborator

esteve commented May 2, 2024

This is intended, Rust source files are installed into the share directory. Did you run this on a clean workspace or did you reuse an existing one?

@Guelakais
Copy link
Contributor Author

That was a clean installation. I know now how the --merge-install flag works. I just didn't realise that -cargo-ament-build couldn't handle it.

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