[llvm-dev] Compilation failure with on branch master in destroying_delete_t.pass.cpp

Chris Palmer via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 7 10:12:51 PST 2019


The patch "Update the docs for building libc++" gave me the info I needed
to get over this hurdle. Thanks. :)

On Mon, Nov 4, 2019 at 2:01 PM Chris Palmer <palmer at google.com> wrote:

> Hi all,
>
> I've been seeing this failure for a couple weeks. I assume I am doing
> something wrong, but I can't tell what. :)
>
> ```
> $ git pull --rebase
> ...
> $ git checkout master
> $ git diff origin/master
> → confirming no difference
> $ cd build
> $ ninja check-all
> ...
> GNU C++17 (Debian 8.3.0-6) version 8.3.0 (x86_64-linux-gnu)
>   compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version
> 4.0.2-rc1, MPC version 1.1.0, isl version isl-0.20-GMP
>
> warning: MPFR header version 4.0.2-rc1 differs from library version 4.0.2.
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> Compiler executable checksum: 5e2cda5349948e2d3e86e3d9186f42cf
> /usr/local/google/home/palmer/llvm-project/libcxx/test/std/language.support/support.dynamic/destroying_delete_t.pass.cpp:31:52:
> error: ‘operator delete’ takes type ‘void*’ as first parameter
>    void operator delete(A*, std::destroying_delete_t);
>                                                     ^
> /usr/local/google/home/palmer/llvm-project/libcxx/test/std/language.support/support.dynamic/destroying_delete_t.pass.cpp:50:55:
> error: ‘operator delete’ takes type ‘void*’ as first parameter
>  void A::operator delete(A* a, std::destroying_delete_t) {
>                                                        ^
> /usr/local/google/home/palmer/llvm-project/libcxx/test/std/language.support/support.dynamic/destroying_delete_t.pass.cpp:
> In function ‘int main()’:
> /usr/local/google/home/palmer/llvm-project/libcxx/test/std/language.support/support.dynamic/destroying_delete_t.pass.cpp:74:10:
> error: no suitable ‘operator delete’ for ‘A’
>    delete ap;
>           ^~
> ```
>
> I assume the problem is that I am using GNU C++17 to compile (as stated in
> the message), and the feature requires C++20 (as stated at the top of
> destroying_delete_t.pass.cpp
>
> I tried setting my CXX environment variable to clang++, but that didn't
> change the outcome. Following the docs <https://llvm.org/docs/CMake.html>,
> I also tried that, plus:
>
> ```
> $ cmake -G Ninja -DLLVM_CXX_STD=c++20 ../llvm
> CMake Warning:
>   Manually-specified variables were not used by the project:
>
>     LLVM_CXX_STD
> ```
>
> So I'm sure I'm doing something wrong, but I don't know what else to try.
> Any clues? Thanks. :)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191107/d3f61d6b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4843 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191107/d3f61d6b/attachment.bin>


More information about the llvm-dev mailing list