-
Notifications
You must be signed in to change notification settings - Fork 100
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
Missing includes when building sdformat with clang #256
Comments
We do, through our OSX CI. From time to time I also build things using clang 6 on Ubuntu and haven't had a problem yet. I haven't tried clang 9.
You may be interested in gazebosim/gz-physics#41 (@mxgrey 's work), which drastically reduces |
That's cool, thanks for sharing. I haven't yet had the chance to try it, I am looking forward to it. I hope that compiling performances will get close to those of clang 9, that for some reason is already blazing fast on the current codebase. Said that, I also look forward to a possible fix to make sdformat compatible with clang 9. Reproducing the error is quite easy:
Given the exported environment variables, CMake will automatically select clang 9 as default compiler and no CMake option has to be passed to colcon. This is the easiest way to change on-the-fly the compiler of a CMake project I found (note that you need a fresh build folder since CMake does not allow to change the compiler after being configured once). |
I've solved this before by removing the |
When compiling sdformat with the clang compiler (I tried with clang9), some standard headers like
#include <limits>
are not found.I don't know if you officially support clang, though sdformat is the only project part of the colcon configuration to build Ignition Gazebo that does not work with this compiler.
As a side note, a huge advantage of clang >= 9 is that the compilation of the Physics system of Ignition Gazebo is orders of magnitude faster than gcc 8 and gcc 9. It would be great if an entire colcon workspace could be configured to use clang as default compiler.
OS: ubuntu 18.04
Compiler: clang 9 installed from the official PPA
The compiler was enabled by setting:
before the first call to CMake in a fresh build folder.
The text was updated successfully, but these errors were encountered: