Comments (7)
Here is a very minimal reproduction excluding everything ignition-related: https://github.com/mjcarroll/clang6-inline-namespace
from gz-utils.
Hope this is not going to be a problem for other downstream dependencies of ignition-fortress ?
This is a pretty common pattern throughout the stack, so I would expect that clang-6 may have issues on all the other packages.
I think at the very least, we will make a note indicating that there are known issues with that compiler.
from gz-utils.
Thanks for reporting, I can reproduce on Ubuntu focal
with clang-6.0
.
My suspicion is that there is something incorrect with how name mangling works with inline namespace
in clang-6.
When built with clang-6
the functions don't get the v1
namespace:
$ nm -a lib/libignition-utils1.so | c++filt | grep ignition::utils
00000000000011d0 T ignition::utils::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)
0000000000001290 T ignition::utils::setenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
00000000000012b0 T ignition::utils::unsetenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Versus building with something newer (clang-12
in this case):
00000000000011d0 T ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)
0000000000001280 T ignition::utils::v1::setenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
00000000000012a0 T ignition::utils::v1::unsetenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
The inline namespace
pattern is pretty heavily used throughout the ignition stack, so if clang-6 doesn't correctly support it (or a workaround), we will likely have to note it as unsupported. I can't find any evidence that this wouldn't be supported as clang-6 should fully support the c++17 standard.
from gz-utils.
@mjcarroll thanks for updates and moving the issue to development. Hope to see this working soon. Also I cannot edit the labels, if it is valid, then can you add edifice lable to the issue ?
from gz-utils.
Hope to see this working soon
After chatting with some colleagues, I'm inclined to say it's either a compiler bug or a weird edge case. I don't know that there will be anything on our side that we can do to handle it.
In the meantime, is there any way that you can use a newer compiler? I see that clang-7
is available via bionic-updates
: https://packages.ubuntu.com/bionic-updates/clang-7
from gz-utils.
yes we can work with other compilers. The compilation error was detected when CI did an automatic build of the conan recipe with multiple compilers and clang-6.0 was one of them. We need only gcc compiler at the moment. To create the conan recipe, we have to simply disable ign-uitls 1.2.0 from the recipe. Hope this is not going to be a problem for other downstream dependencies of ignition-fortress ?
from gz-utils.
@ggulgulia Can you check if #39 fixes the problem for you?
from gz-utils.
Related Issues (8)
- cli: add custom formatter for help strings
- Migrate environment variable functions to utils
- fatal error: gz/utils/Export.hh: No such file or directory HOT 1
- IgnitionFormatter.hpp renamed to GzFormatter.hpp HOT 1
- Require DCO HOT 1
- Feature request: add macros for arm64 and armhf in ExtraTestMacros.hh
- Warning suppression macros conflict with those provided by ign-cmake HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gz-utils.