Repository navigation
Closed
Description
manx@gutemine:~/tmp$ cat test.cpp
#include <utility>
using std::cmp_equal;
using std::cmp_greater;
using std::cmp_greater_equal;
using std::cmp_less;
using std::cmp_less_equal;
using std::cmp_not_equal;
manx@gutemine:~/tmp$ em++ -std=c++20 -Wall -Wextra -Wpedantic -c test.cpp
test.cpp:2:12: error: no member named 'cmp_equal' in namespace 'std'
using std::cmp_equal;
~~~~~^
test.cpp:3:12: error: no member named 'cmp_greater' in namespace 'std'
using std::cmp_greater;
~~~~~^
test.cpp:4:12: error: no member named 'cmp_greater_equal' in namespace 'std'
using std::cmp_greater_equal;
~~~~~^
test.cpp:5:12: error: no member named 'cmp_less' in namespace 'std'
using std::cmp_less;
~~~~~^
test.cpp:6:12: error: no member named 'cmp_less_equal' in namespace 'std'
using std::cmp_less_equal;
~~~~~^
test.cpp:7:12: error: no member named 'cmp_not_equal' in namespace 'std'
using std::cmp_not_equal;
~~~~~^
6 errors generated.
em++: error: '/home/manx/opt/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=3 -D__EMSCRIPTEN_minor__=1 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/home/manx/opt/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -std=c++20 -Wall -Wextra -Wpedantic -c test.cpp -o test.o' failed (returned 1)
manx@gutemine:~/tmp$ em++ --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.0 (8e1e305519e1027726a48861a1fec5662f7e18a2)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
manx@gutemine:~/tmp$ /home/manx/opt/emsdk/upstream/bin/clang++ --version
clang version 14.0.0 (https://github.com/llvm/llvm-project 1a929525e86a20d0b3455a400d0dbed40b325a13)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/manx/opt/emsdk/upstream/bin
_LIBCPP_VERSION is also 14000 in my Emscripten, and regular clang supports these templates as of version 13 (see https://godbolt.org/z/11MYzq9eb), so I am not really sure what's going wrong here.
Metadata
Metadata
Assignees
Labels
No labels
Activity
[Fix/Reg] build: Makefile: Emscripten: Disable C++20 for now because …
sbc100 commentedon Dec 28, 2021
I imagine this is because the libc++ and libc++abi libraries that we ship in emscripten are from 12.0.0 and this was not supported in that version of those libraries.
Hopefully this will be fixed if we address #15396.
manxorist commentedon Dec 28, 2021
Well, that of course makes sense. It looks like I looked at the wrong libc++ headers in emsdk:
./upstream/include/c++/v1/__configis 14.0while
./upstream/emscripten/system/lib/libcxx/include/__configis 12.0I agree, this issue should be fixed automatically once #15396 gets fixed.
Update libc++ to llvm 13.0.0
Update libc++ to llvm 13.0.0 (#15901)
manxorist commentedon Jan 12, 2022
Works in 3.1.1, as expected.
Closing this issue, as it has been fixed.