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

can not build with gcc 8.5 #95

Closed
druidfund opened this issue May 16, 2024 · 3 comments
Closed

can not build with gcc 8.5 #95

druidfund opened this issue May 16, 2024 · 3 comments
Labels
compatibility Compiler compatibility concerns resolved in next release

Comments

@druidfund
Copy link

druidfund commented May 16, 2024

can not build with gcc 8.5:

/opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/tokenizer.cpp: In lambda function:
/opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/tokenizer.cpp:47:10: error: no matching function for call to ‘to_array<std::string_view>(<brace-enclosed initializer list>)’
         });
          ^
In file included from /opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/tokenizer.hpp:8,
                 from /opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/tokenizer.cpp:1:
/opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/utils.hpp:117:50: note: candidate: ‘template<class T, long unsigned int N> constexpr std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N> libassert::detail::to_array(T (&&)[N])’
     constexpr std::array<std::remove_cv_t<T>, N> to_array(T(&&a)[N]) {
                                                  ^~~~~~~~
/opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/utils.hpp:117:50: note:   template argument deduction/substitution failed:
/opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/tokenizer.cpp:47:10: note:   mismatched types ‘std::basic_string_view<char>’ and ‘const char*’
         });
          ^
/opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/tokenizer.cpp:49:16: error: unable to deduce lambda return type from ‘arr’
         return arr;
                ^~~
/opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/tokenizer.cpp: At global scope:
/opt/vcpkg/buildtrees/libassert/src/v2.0.2-d0c1f55be9.clean/src/tokenizer.cpp:50:8: error: class template argument deduction failed:
     } ();

is there any suggestion to fix this build error?

@druidfund druidfund changed the title gcc 8.5 can not build with gcc 8.5 May 16, 2024
@jeremy-rifkin
Copy link
Owner

jeremy-rifkin commented May 16, 2024

Hi, gcc 8 is pretty old. I'm guessing it doesn't support some of the c++17 features that part of the code relies on. The quickest workaround would be to update to gcc 9 or newer https://godbolt.org/z/vEeoaE9Wo, but I'll look to see if there's any way to make this work in gcc 8.

@druidfund
Copy link
Author

Hi, gcc 8 is pretty old. I'm guessing it doesn't support some of the c++17 features that part of the code relies on. The quickest workaround would be to update to gcc 9 or newer https://godbolt.org/z/vEeoaE9Wo, but I'll look to see if there's any way to make this work in gcc 8.

for some reason, i can not upgrade gcc, looking forward progress on workaround in gcc8, thanks a lot

@jeremy-rifkin
Copy link
Owner

It turns out it was just one part of the code that gcc 8 struggled with so I went ahead and changed it. Gcc 8 is now supported on dev, however, since it's so old I can't promise it will stay supported in future versions and I would still recommend upgrading gcc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compiler compatibility concerns resolved in next release
Projects
None yet
Development

No branches or pull requests

2 participants