[llvm-bugs] [Bug 51359] New: trunk libcxx does not build with g++ 9.3.0
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 5 08:26:10 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51359
Bug ID: 51359
Summary: trunk libcxx does not build with g++ 9.3.0
Product: libc++
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: brian.sumner at amd.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
Trying a build of a recent monorepo commit with DLLVM_ENABLE_PROJECTS including
libcxx with the standard compiler on my Ubuntu 20.04 system:
$ /usr/bin/c++ --version
c++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
results in a build failure. This appears to be a g++ bug, because the build
sets -std=c++2a, but g++ is complaining that a destructor cannot be constexpr.
However, if LLVM is supposed to build with gcc > 5.1.0, then libcxx may need to
be fixed.
Here is the build output with the failure:
make[2]: Entering directory '/git/build-llvm'
[ 42%] Building CXX object
projects/libcxx/src/CMakeFiles/cxx_static.dir/optional.cpp.o
cd /git/build-llvm/projects/libcxx/src && /usr/bin/c++ -DNDEBUG -D_DEBUG
-D_GNU_SOURCE -D_LIBCPP_BUILDING_LIBRARY
-D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/git/build-llvm/projects/libcxx/src -I/git/llvm-monorepo/libcxx/src
-I/git/build-llvm/include -I/git/llvm-monorepo/llvm/include
-I/git/build-llvm/projects/libcxx/include/c++build -fPIC
-fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall
-Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -Wno-long-long -Wimplicit-fallthrough
-Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor
-Wsuggest-override -Wno-comment -Wmisleading-indentation -g -fPIC
-DLIBCXX_BUILDING_LIBCXXABI -nostdinc++ -fvisibility-inlines-hidden -Wall
-Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long
-Werror=return-type -Wextra-semi -Wundef -Wno-literal-suffix -Wno-c++14-compat
-Wno-noexcept-type -Wno-suggest-override -Wno-error
-I/git/build-llvm/include/c++/v1 -std=c++2a -o
CMakeFiles/cxx_static.dir/optional.cpp.o -c
/git/llvm-monorepo/libcxx/src/optional.cpp
In file included from /git/build-llvm/include/c++/v1/__memory/shared_ptr.h:25,
from
/git/build-llvm/include/c++/v1/__functional/function.h:20,
from /git/build-llvm/include/c++/v1/functional:500,
from /git/build-llvm/include/c++/v1/optional:154,
from /git/llvm-monorepo/libcxx/src/optional.cpp:9:
/git/build-llvm/include/c++/v1/__memory/unique_ptr.h:746:50: warning: type
attributes ignored after type is already defined [-Wattributes]
746 | template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
| ^~~~
In file included from
/git/build-llvm/include/c++/v1/__functional/function.h:20,
from /git/build-llvm/include/c++/v1/functional:500,
from /git/build-llvm/include/c++/v1/optional:154,
from /git/llvm-monorepo/libcxx/src/optional.cpp:9:
/git/build-llvm/include/c++/v1/__memory/shared_ptr.h:1710:50: warning: type
attributes ignored after type is already defined [-Wattributes]
1710 | template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
| ^~~~
In file included from /git/build-llvm/include/c++/v1/__availability:13,
from /git/build-llvm/include/c++/v1/optional:149,
from /git/llvm-monorepo/libcxx/src/optional.cpp:9:
/git/build-llvm/include/c++/v1/__config:1054:41: error: a destructor cannot be
'constexpr'
1054 | # define _LIBCPP_CONSTEXPR_AFTER_CXX17 constexpr
| ^~~~~~~~~
/git/build-llvm/include/c++/v1/optional:224:5: note: in expansion of macro
'_LIBCPP_CONSTEXPR_AFTER_CXX17'
224 | _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__optional_destruct_base()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210805/afd75f40/attachment-0001.html>
More information about the llvm-bugs
mailing list