Skip to content

Add in a fix for older compilers.#2075

Merged
clalancette merged 2 commits intorollingfrom
clalancette/fix-older-compilers
Jan 4, 2023
Merged

Add in a fix for older compilers.#2075
clalancette merged 2 commits intorollingfrom
clalancette/fix-older-compilers

Conversation

@clalancette
Copy link
Contributor

The addition of the NodeInterfaces class made it stop compiling with older compilers (such as gcc 9.4.0 on Ubuntu 20.04). The error has to do with calling the copy constructor on rclcpp::Node, which is deleted. Work around this by just getting rid of the nullptr check; it isn't actually needed, I don't think.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

I'm honestly not sure that this is the best solution, but it definitely fixes the build on Ubuntu 20.04, and will likely fix the CI failures we are seeing in https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_release/1370/ . I could use further feedback from @methylDragon and @wjwwood .

The addition of the NodeInterfaces class made it stop compiling
with older compilers (such as gcc 9.4.0 on Ubuntu 20.04).
The error has to do with calling the copy constructor on
rclcpp::Node, which is deleted.  Work around this by just
getting rid of the nullptr check; it isn't actually needed,
I don't think.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@methylDragon
Copy link
Contributor

The addition of the NodeInterfaces class made it stop compiling with older compilers (such as gcc 9.4.0 on Ubuntu 20.04). The error has to do with calling the copy constructor on rclcpp::Node, which is deleted. Work around this by just getting rid of the nullptr check; it isn't actually needed, I don't think.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

I'm honestly not sure that this is the best solution, but it definitely fixes the build on Ubuntu 20.04, and will likely fix the CI failures we are seeing in https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_release/1370/ . I could use further feedback from @methylDragon and @wjwwood .

It isn't necessary and was only good to have. Let's merge this

@clalancette

I'm wondering why the error didn't show up on ci runs, sorry for the trouble! 🙇

@methylDragon
Copy link
Contributor

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor Author

clalancette commented Jan 3, 2023

The yellow builds are all due to PEP257, and will be fixed separately by ament/ament_lint#428 . Otherwise this looks clean.

And here is RHEL: * RHEL Build Status

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

lgtm with green CI

@clalancette
Copy link
Contributor Author

I have an approval, and green CI (modulo problems unrelated to this). I'm going to go ahead and merge this to unbreak RHEL; please leave any follow-up comments and I'll address them in a separate PR.

@clalancette clalancette merged commit 1bbb033 into rolling Jan 4, 2023
@clalancette clalancette deleted the clalancette/fix-older-compilers branch January 4, 2023 13:50
fabianhirmann added a commit to ARTI-Robots/rclcpp that referenced this pull request Dec 12, 2025
fabianhirmann added a commit to ARTI-Robots/rclcpp that referenced this pull request Dec 12, 2025
…g changes from ros2#2075

Signed-off-by: Fabian Hirmann <f.hirmann@arti-robots.com>
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.

5 participants