Giter Site home page Giter Site logo

Comments (7)

mjcarroll avatar mjcarroll commented on June 23, 2024 2

Here is a very minimal reproduction excluding everything ignition-related: https://github.com/mjcarroll/clang6-inline-namespace

from gz-utils.

mjcarroll avatar mjcarroll commented on June 23, 2024 1

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.

mjcarroll avatar mjcarroll commented on June 23, 2024

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.

ggulgulia avatar ggulgulia commented on June 23, 2024

@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.

mjcarroll avatar mjcarroll commented on June 23, 2024

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.

ggulgulia avatar ggulgulia commented on June 23, 2024

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.

azeey avatar azeey commented on June 23, 2024

@ggulgulia Can you check if #39 fixes the problem for you?

from gz-utils.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.