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't build on Ubuntu 20.04 with latest libplacebo #222

Closed
lcksk opened this issue Sep 15, 2023 · 1 comment
Closed

Can't build on Ubuntu 20.04 with latest libplacebo #222

lcksk opened this issue Sep 15, 2023 · 1 comment

Comments

@lcksk
Copy link

lcksk commented Sep 15, 2023

The default GCC compiler version 9.4.0 in Ubuntu 20.04 does not support C++20 features perfectly, the latest version of libplacebo on Ubuntu 20.04 encounters the following errors during compilation:

FAILED: src/libplacebo.a.p/convert.cc.o 
ccache c++ -Isrc/libplacebo.a.p -Isrc -I../src -Isrc/include -I../src/include -I../3rdparty/Vulkan-Headers/include -I../3rdparty/fast_float/include -Isrc/opengl/include -I../src/opengl/include -Isrc/shaders -Isrc/vulkan -Isrc/opengl/include/glad -I/usr/include/x86_64-linux-gnu -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++2a -O2 -g -Wundef -Wshadow -Wparentheses -Wpointer-arith -fPIC -pthread -DPL_HAVE_PTHREAD -DPTHREAD_HAS_SETCLOCK -MD -MQ src/libplacebo.a.p/convert.cc.o -MF src/libplacebo.a.p/convert.cc.o.d -o src/libplacebo.a.p/convert.cc.o -c ../src/convert.cc
../src/convert.cc:34:1: error: 'concept' does not name a type
   34 | concept has_std_to_chars = requires(char *begin, char *end, T &n)
      | ^~~~~~~
../src/convert.cc:34:1: note: 'concept' only available with '-fconcepts'
../src/convert.cc: In function 'int {anonymous}::to_chars(char*, size_t, T, Args ...)':
../src/convert.cc:42:19: error: 'has_std_to_chars' was not declared in this scope
   42 |     if constexpr (has_std_to_chars<T>) {
      |                   ^~~~~~~~~~~~~~~~
../src/convert.cc:42:37: error: expected primary-expression before '>' token
   42 |     if constexpr (has_std_to_chars<T>) {
      |                                     ^
../src/convert.cc:42:38: error: expected primary-expression before ')' token
   42 |     if constexpr (has_std_to_chars<T>) {
      |                                      ^
../src/convert.cc: At global scope:
../src/convert.cc:56:1: error: 'concept' does not name a type
   56 | concept has_std_from_chars = requires(const char *begin, const char *end, T &n)
      | ^~~~~~~
../src/convert.cc:56:1: note: 'concept' only available with '-fconcepts'
../src/convert.cc: In function 'bool {anonymous}::from_chars(pl_str, T&, Args ...)':
../src/convert.cc:64:19: error: 'has_std_from_chars' was not declared in this scope
   64 |     if constexpr (has_std_from_chars<T>) {
      |                   ^~~~~~~~~~~~~~~~~~
../src/convert.cc:64:39: error: expected primary-expression before '>' token
   64 |     if constexpr (has_std_from_chars<T>) {
      |                                       ^
../src/convert.cc:64:40: error: expected primary-expression before ')' token
   64 |     if constexpr (has_std_from_chars<T>) {
      |                                        ^
../src/convert.cc: In instantiation of 'int {anonymous}::to_chars(char*, size_t, T, Args ...) [with T = short unsigned int; Args = {int}; size_t = long unsigned int]':
../src/convert.cc:99:1:   required from here
../src/convert.cc:46:48: error: static assertion failed: Not implemented!
   46 |         static_assert(std::is_same_v<float, T> || std::is_same_v<double, T>,
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/convert.cc: In instantiation of 'bool {anonymous}::from_chars(pl_str, T&, Args ...) [with T = short unsigned int; Args = {int}; pl_str = pl_str]':
../src/convert.cc:99:1:   required from here
../src/convert.cc:71:23: error: static assertion failed: Not implemented!
   71 |         static_assert(is_fp, "Not implemented!");
      |                       ^~~~~
../src/convert.cc:79:48: error: no matching function for call to 'from_chars(const char*, const char*, short unsigned int&, int&)'
   79 |         auto [ptr, ec] = fast_float::from_chars((const char *) str.buf,
      |                          ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
   80 |                                                 (const char *) str.buf + str.len,
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   81 |                                                 n, args...);
      |                                                 ~~~~~~~~~~~
In file included from ../3rdparty/fast_float/include/fast_float/fast_float.h:41,

build.log

@kasper93
Copy link
Contributor

Duplicate of haasn/libplacebo#199

@haasn haasn closed this as completed Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants