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

Fix compile error due to the user-defined string literals feature #1010

Merged
merged 1 commit into from
May 24, 2016
Merged

Fix compile error due to the user-defined string literals feature #1010

merged 1 commit into from
May 24, 2016

Conversation

kartikmohta
Copy link
Contributor

While compiling rviz from source on Arch with gcc 6.1.1, got errors like the following:

In file included from /opt/ros/kinetic/include/tf/transform_datatypes.h:44:0,
                 from /opt/ros/kinetic/include/tf/time_cache.h:38,
                 from /opt/ros/kinetic/include/tf/tf.h:43,
                 from /opt/ros/kinetic/include/tf/transform_listener.h:38,
                 from [..]/src/rviz/src/rviz/default_plugin/effort_display.cpp:4:
[..]/src/rviz/src/rviz/default_plugin/effort_display.h: In destructor ‘virtual tf::MessageFilterJointState::~MessageFilterJointState()’:
[..]/src/rviz/src/rviz/default_plugin/effort_display.h:39:37: error: unable to find string literal operator ‘operator""fmt’ with ‘const char [28]’, ‘long unsigned int’ arguments
   ROS_DEBUG_NAMED("message_filter", "MessageFilter [target=%s]: "fmt, getTargetFramesString().c_str(), __VA_ARGS__)
                                     ^

With the new C++11 user-defined string literals feature, there has to be a space between string concatenations like the ones used here. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51282.

@de-vri-es
Copy link
Contributor

One more time then:

Note that GCC 6 compiles with C++11 support enabled by default, so this is required to compile rviz from source on for example Arch Linux. Since this is also true for the inidigo version, I think it is a good idea to backport it to indigo-devel.

@bchretien
Copy link
Contributor

👍 I added the patch to the PKGBUILD for now.

bchretien added a commit to bchretien/arch-ros-stacks that referenced this pull request May 22, 2016
bchretien added a commit to bchretien/arch-ros-stacks that referenced this pull request May 22, 2016
@wjwwood wjwwood merged commit 311fd94 into ros-visualization:kinetic-devel May 24, 2016
@kartikmohta kartikmohta deleted the fix/string-literals branch May 24, 2016 22:58
130s pushed a commit to 130s/rviz that referenced this pull request Aug 21, 2024
* Added Effort plugin

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
(cherry picked from commit e3b56ed7058502d94fe3d1c27948d4f4e9be58a8)

Co-authored-by: Alejandro Hernández Cordero <alejandro@openrobotics.org>
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.

4 participants