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 compilation in Kinetic #112

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

facontidavide
Copy link
Contributor

No description provided.

@svwilliams
Copy link
Contributor

There is a build server running that tests Xenial/Kinetic builds, but I believe that build server has a set of default compile flags that get added. So these errors slipped through the cracks. So thanks for this PR.

I am going to attempt to fix this the "correct" way by specifying the needed target_compile_features(). If I can work it out, I'll post a link to an alternate PR for you to try in a day or two. And if I can't, I'll get this merged.

@efernandez
Copy link
Collaborator

This looks more like it's trying to disable gnu extensions, which it's something I encountered trying to use Ceres 2.0, although I'm not using it at the moment: https://cmake.org/cmake/help/v3.15/variable/CMAKE_CXX_STANDARD.html, https://cmake.org/cmake/help/v3.15/prop_tgt/CXX_STANDARD.html#prop_tgt:CXX_STANDARD, https://cmake.org/cmake/help/v3.15/prop_tgt/CXX_EXTENSIONS.html#prop_tgt:CXX_EXTENSIONS

If that's the intention, we should do set(CMAKE_CXX_EXTENSIONS OFF), as it's already done in fuse_constraints and fuse_core.

👍 for using target_compile_features. IIRC only newer versions of CMake propagate this stuff properly though. FYI I'm using version 3.5.1 in my system. I wonder which version are you guys using.

@svwilliams
Copy link
Contributor

@facontidavide Can I get some more details about the compilation issue you are experiencing?

I created a virtual machine running Ubuntu 16.04 + ROS Kinetic, made a workspace containing the fuse packages and tf2_2d, and installed all dependencies using rosdep. Everything compiled without error, and all of the unit tests passed.

I want to make sure I can reproduce the issue, so that I know any compilation changes I make will fix it.

@efernandez target_compile_features was introduced in Cmake 3.1. Ubuntu 16.04's default version of CMake is 3.5.1. I feel safe increasing the required cmake version to 3.1.

@facontidavide
Copy link
Contributor Author

For some reason it was complaining about variadic lambdas. But this happened only on one of my two laptops, so it might be hard to reproduce

@svwilliams
Copy link
Contributor

My attempt at using target_compile_features() was not particularly successful. I am reverting to the suggestion here to set CMAKE_CXX_STANDARD instead. I have a test branch, if you have time to give it a try. It starts with your PR and cleans up some additional compile flags. If that works for you, I'll add my changes to this PR and get it merged in.

@svwilliams svwilliams requested review from svwilliams and ayrton04 and removed request for svwilliams November 19, 2019 23:22
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

4 participants