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

Can't compile custom driver with clang, runtime error #325

Open
Ewoodss opened this issue Oct 2, 2024 · 1 comment
Open

Can't compile custom driver with clang, runtime error #325

Ewoodss opened this issue Oct 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Ewoodss
Copy link

Ewoodss commented Oct 2, 2024

Bug description
When creating a custom driver, and trying too compile with clang++ the following error happens.

To Reproduce
Compile a driver component with clang++
CC=clang CXX=clang++ colcon build

Expected behavior
The compilation should be succes full

Logs
/opt/ros/humble/include/canopen_core/node_interfaces/node_canopen_driver.hpp:198:43: error: use 'template' keyword to treat 'as' as a dependent template name auto path = this->config_["dcf_path"].as<std::string>();
/opt/ros/humble/include/canopen_core/node_interfaces/node_canopen_driver.hpp:199:37: error: use 'template' keyword to treat 'as' as a dependent template name auto dcf = this->config_["dcf"].as<std::string>();

Setup:

  • Device: Jetson AGX Orin 32gb
  • OS: ubuntu 22.04
  • ROS-Distro: Humble
  • Branch/Commit: humble

Additional context
Compiling the humble branch itself with clang/clang++ also seems to be broken, but this isn't a issue when getting it using rosdep. and only creating a custom driver.

@Ewoodss Ewoodss added the bug Something isn't working label Oct 2, 2024
@Ewoodss Ewoodss changed the title Can't compile custom driver with clang Can't compile custom driver with clang, runtime error Oct 4, 2024
@Ewoodss
Copy link
Author

Ewoodss commented Oct 4, 2024

So there also seems to be a issue with linking too the dynamic symbol for is_canopen_basic.

it shoud link too
std::enable_if<lely::canopen::is_canopen_basic<signed char, signed char>::value, void>::type lely::canopen::Device::TpdoWrite<signed char>(unsigned char, unsigned short, unsigned char, signed char) std::enable_if<lely::canopen::is_canopen_basic<int, int>::value, void>::type lely::canopen::Device::TpdoWrite<int>(unsigned char, unsigned short, unsigned char, int) std::enable_if<lely::canopen::is_canopen_basic<unsigned short, unsigned short>::value, void>::type lely::canopen::Device::TpdoWrite<unsigned short>(unsigned char, unsigned short, unsigned char, unsigned short)

but links too
std::enable_if<is_canopen_basic<signed char, signed char>::value, void>::type lely::canopen::Device::TpdoWrite<signed char>(unsigned char, unsigned short, unsigned char, signed char) std::enable_if<is_canopen_basic<int, int>::value, void>::type lely::canopen::Device::TpdoWrite<int>(unsigned char, unsigned short, unsigned char, int) std::enable_if<is_canopen_basic<unsigned short, unsigned short>::value, void>::type lely::canopen::Device::TpdoWrite<unsigned short>(unsigned char, unsigned short, unsigned char, unsigned short)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant