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

added explicit call to ParameterValue() to avoid clang error #277

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

tudoroancea
Copy link
Contributor

Public-Facing Changes

None

Description

Fixed bug

on macOS, when using clang++ as compiler, we get the following error message:

~/Developer/foxtest via πŸ…’ foxtest took 19s ➜
colcon build
Starting >>> foxglove_bridge
[Processing: foxglove_bridge]
--- stderr: foxglove_bridge
ld: warning: -pie being ignored. It is only used when linking a main executable
/Users/tudoroancea/Developer/foxtest/src/ros-foxglove-bridge/ros2_foxglove_bridge/src/parameter_interface.cpp:97:16: error: no matching member function for call to 'push_back'
      paramVec.push_back(value);
      ~~~~~~~~~^~~~~~~~~
/Users/tudoroancea/miniforge3/envs/ihm2/bin/../include/c++/v1/vector:591:62: note: candidate function not viable: no known conversion from 'const std::__bit_iterator<std::vector<bool>, true, 0>::reference' (aka 'const std::__bit_const_reference<std::vector<bool>>') to 'const std::vector<foxglove::ParameterValue>::value_type' (aka 'const foxglove::ParameterValue') for 1st argument
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
                                                             ^
/Users/tudoroancea/miniforge3/envs/ihm2/bin/../include/c++/v1/vector:593:62: note: candidate function not viable: no known conversion from 'const std::__bit_iterator<std::vector<bool>, true, 0>::reference' (aka 'const std::__bit_const_reference<std::vector<bool>>') to 'std::vector<foxglove::ParameterValue>::value_type' (aka 'foxglove::ParameterValue') for 1st argument
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);
                                                             ^
1 error generated.
make[2]: *** [CMakeFiles/foxglove_bridge_component.dir/build.make:118: CMakeFiles/foxglove_bridge_component.dir/ros2_foxglove_bridge/src/parameter_interface.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:193: CMakeFiles/foxglove_bridge_component.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
---
Failed   <<< foxglove_bridge [38.4s, exited with code 2]

Summary: 0 packages finished [38.8s]
  1 package failed: foxglove_bridge
  1 package had stderr output: foxglove_bridge

How I fixed it

just explicitly called the constructor foxglove::ParameterValue()

Copy link
Collaborator

@achim-k achim-k left a comment

Choose a reason for hiding this comment

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

We will just have to wait until the CI problem is resolved (see #276 (comment))

@achim-k achim-k merged commit 9789715 into foxglove:main Dec 12, 2023
11 checks passed
@tudoroancea tudoroancea deleted the ted/param_implicit_constructor branch December 12, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants