-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
error: redefinition of 'cache' [related to the recently added library dragonbox.h] #1334
Comments
Can you paste the error instead of a screenshot? |
Yeah of course! [ 10%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/fptostring.cpp.o
In file included from /prjxray/third_party/yaml-cpp/src/fptostring.cpp:2:
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:1392:52: error: redefinition of 'cache' with a different type: 'const array<[...], detail::stdr::size_t(max_k - min_k + 1) aka 78>' vs 'const array<[...], detail::stdr::size_t(max_k - min_k + 1)>'
cache_holder<ieee754_binary32, Dummy>::cache;
^
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:1346:17: note: previous declaration is here
cache JKJ_STATIC_DATA_SECTION = {
^
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:2028:52: error: redefinition of 'cache' with a different type: 'const array<[...], detail::stdr::size_t(max_k - min_k + 1) aka 619>' vs 'const array<[...], detail::stdr::size_t(max_k - min_k + 1)>'
cache_holder<ieee754_binary64, Dummy>::cache;
^
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:1402:17: note: previous declaration is here
cache JKJ_STATIC_DATA_SECTION = {
^
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4026:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4028:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4033:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4035:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4040:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4042:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4047:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4049:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4054:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4056:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4061:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4063:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
12 warnings and 2 errors generated.
make[3]: *** [third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/build.make:251: third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/fptostring.cpp.o] Error 1
make[3]: Leaving directory '/prjxray/build'
make[2]: *** [CMakeFiles/Makefile2:5004: third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/all] Error 2
make[2]: Leaving directory '/prjxray/build'
make[1]: *** [Makefile:149: all] Error 2
make[1]: Leaving directory '/prjxray/build'
make: *** [Makefile:44: build] Error 2 Thanks for the quick response! 😃 |
@SGSSGene could you take a look? |
Hi @Unlike267
If possible, I would like to keep away from supporting c++14 on clang 11. |
Hi @SGSSGene! Wow, thank you very much for your quick response! ❤️ Great reasoning! It makes a lot of sense. I’ll apply your suggestion! PS: I like the play on “unlike,” but it’s actually “Unike” (a combination of my name, Unai, and the Nike brand) hahah. Cheers! |
According to @SGSSGene to solve the issue f4pga/prjxray#2472 Clang must be updated, in this case from 11 to 14 See jbeder/yaml-cpp#1334 for more info Thanks to Simon Gene Gottlieb
Thank you very much, @SGSSGene, the issue is solved! 🥳 It is true that it now gives the following warnings: [ 10%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/fptostring.cpp.o
In file included from /prjxray/third_party/yaml-cpp/src/fptostring.cpp:2:
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4026:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4028:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4033:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4035:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4040:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4042:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4047:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4049:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4054:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4056:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4061:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(...) noexcept { return false; }
^
const
/prjxray/third_party/yaml-cpp/src/contrib/dragonbox.h:4063:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr bool operator()(dummy<Policy>) noexcept {
^
const
12 warnings generated. But don't worry about that, container building works fine! Workflow: https://github.com/Unike267/Containers/actions/runs/12485132318/job/34843498856 And container works fine! Cheers! |
Hi there!
While building a container that uses yaml-cpp, I encountered the following error:
This container builds, among other things, prjxray, which relies on this project.
The build worked perfectly four days ago:
However, it is now failing:
I see that the problem is related to a recently added library called
dragonbox.h
.Does anyone have any tips or insights on how to resolve this issues?
Cheers!
The text was updated successfully, but these errors were encountered: