Opened 3 years ago
Last modified 3 years ago
#68592 new defect
gcc13 does not work with Macports-installed libc++: error: expected identifier before '__is_convertible'
| Reported by: | barracuda156 | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.9.1 |
| Keywords: | Cc: | ||
| Port: | gcc13, gcc-devel |
Description
To be clear, this is a standard setup using libc++ on x86_64 with Xcode 4.2.
:info:build In file included from /opt/local/libexec/gcc13/libc++/include/c++/v1/algorithm:640,
:info:build from /opt/local/libexec/gcc13/libc++/include/c++/v1/__string:57,
:info:build from /opt/local/libexec/gcc13/libc++/include/c++/v1/string_view:175,
:info:build from /opt/local/libexec/gcc13/libc++/include/c++/v1/string:506,
:info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libical/libical/work/libical-3.0.17/src/libical/icalparameter_cxx.h:32,
:info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libical/libical/work/libical-3.0.17/src/libical/icalparameter_cxx.cpp:20:
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1780:8: error: expected identifier before '__is_convertible'
:info:build 1780 | struct __is_convertible
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1780:8: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1786:40: error: expected identifier before '__is_convertible'
:info:build 1786 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 1> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1786:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1787:40: error: expected identifier before '__is_convertible'
:info:build 1787 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 1> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1787:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1788:40: error: expected identifier before '__is_convertible'
:info:build 1788 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 1> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1788:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1789:40: error: expected identifier before '__is_convertible'
:info:build 1789 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 1> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1789:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1791:40: error: expected identifier before '__is_convertible'
:info:build 1791 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 2> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1791:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1792:40: error: expected identifier before '__is_convertible'
:info:build 1792 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 2> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1792:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1793:40: error: expected identifier before '__is_convertible'
:info:build 1793 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 2> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1793:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1794:40: error: expected identifier before '__is_convertible'
:info:build 1794 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 2> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1794:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1796:40: error: expected identifier before '__is_convertible'
:info:build 1796 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 3> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1796:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1797:40: error: expected identifier before '__is_convertible'
:info:build 1797 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 3> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1797:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1798:40: error: expected identifier before '__is_convertible'
:info:build 1798 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 3> : public false_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1798:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1799:40: error: expected identifier before '__is_convertible'
:info:build 1799 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 3> : public true_type {};
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1799:40: error: expected unqualified-id before '__is_convertible'
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1802:14: error: expected class-name before '__is_convertible'
:info:build 1802 | : public __is_convertible<_T1, _T2>
:info:build | ^~~~~~~~~~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1802:14: error: expected '{' before '__is_convertible'
:info:build In file included from /opt/local/libexec/gcc13/libc++/include/c++/v1/__threading_support:14,
:info:build from /opt/local/libexec/gcc13/libc++/include/c++/v1/atomic:571,
:info:build from /opt/local/libexec/gcc13/libc++/include/c++/v1/memory:681,
:info:build from /opt/local/libexec/gcc13/libc++/include/c++/v1/algorithm:643:
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono: In static member function 'static std::__1::__fs::filesystem::_FilesystemClock::time_point std::__1::__fs::filesystem::_FilesystemClock::from_time_t(time_t)':
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono:2958:35: error: no matching function for call to 'std::__1::chrono::duration<__int128>::duration(time_t&)'
:info:build 2958 | return time_point(__secs(__t));
:info:build | ^
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono:1085:9: note: candidate: 'template<class _Rep2, class _Period2> constexpr std::__1::chrono::duration<_Rep, _Period>::duration(const std::__1::chrono::duration<_Rep2, _Period2>&, typename std::__1::enable_if<(__no_overflow<_Period2, typename _Period::type>::value && (std::__1::chrono::treat_as_floating_point<_Rep>::value || ((typename __no_overflow<_Period2, typename _Period::type>::type::den == 1) && (! std::__1::chrono::treat_as_floating_point<_Rep2>::value))))>::type*) [with _Period2 = _Rep2; _Rep = __int128; _Period = std::__1::ratio<1>]'
:info:build 1085 | duration(const duration<_Rep2, _Period2>& __d,
:info:build | ^~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono:1085:9: note: template argument deduction/substitution failed:
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono:2958:35: note: mismatched types 'const std::__1::chrono::duration<_Rep, _Period>' and 'time_t' {aka 'long int'}
:info:build 2958 | return time_point(__secs(__t));
:info:build | ^
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono:1073:18: note: candidate: 'template<class _Rep2> constexpr std::__1::chrono::duration<_Rep, _Period>::duration(const _Rep2&, typename std::__1::enable_if<(std::__1::is_convertible<_U1, _T1>::value && (std::__1::chrono::treat_as_floating_point<_Rep>::value || (! std::__1::chrono::treat_as_floating_point<_Rep2>::value)))>::type*) [with _Rep = __int128; _Period = std::__1::ratio<1>]'
:info:build 1073 | explicit duration(const _Rep2& __r,
:info:build | ^~~~~~~~
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono:1073:18: note: template argument deduction/substitution failed:
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono: In substitution of 'template<class _Rep2> constexpr std::__1::chrono::duration<__int128>::duration(const _Rep2&, typename std::__1::enable_if<(std::__1::is_convertible<_U1, __int128>::value && (std::__1::chrono::treat_as_floating_point<__int128>::value || (! std::__1::chrono::treat_as_floating_point<_Rep>::value))), void>::type*) [with _Rep2 = long int]':
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono:2958:35: required from here
:info:build /opt/local/libexec/gcc13/libc++/include/c++/v1/chrono:1076:44: error: incomplete type 'std::__1::is_convertible<long int, __int128>' used in nested name specifier
Attachments (1)
Change History (7)
Changed 3 years ago by barracuda156
| Attachment: | libical_10.6.8_x86_64_gcc13.txt added |
|---|
comment:1 Changed 3 years ago by barracuda156
comment:2 Changed 3 years ago by barracuda156
Here is the answer: https://github.com/iains/gcc-13-branch/issues/12
It is indeed broken at the moment, regardless of arch.
comment:3 Changed 3 years ago by barracuda156
| Keywords: | snowleopard x86_64 removed |
|---|---|
| Port: | gcc13 gcc-devel added; libical removed |
| Summary: | libical fails to build with gcc on 10.6.8 x86_64: error: expected identifier before '__is_convertible' → gcc13 does not work with Macports-installed libc++: error: expected identifier before '__is_convertible' |
comment:4 Changed 3 years ago by lepus2589 (Tim Kaune)
This is an issue in the GCC stdlibc++ headers and has been fixed upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113241
Should be fixed with GCC v13.3
Can we update the gcc-devel port to a fixed snapshot in the meantime? The earliest fixed snapshot should be 14-20240107. It is at 14-20231001, ATM.
comment:5 Changed 3 years ago by barracuda156
Macports is set up wrong now: gcc13 should never be used with libc++ until this bug is fixed, but it is chosen be default.
This is what happens when someone commits directly to the master without testing.
Forget PowerPC, it is not working on Intel either:
/opt/local/bin/g++-mp-13 -DHYPRLANG_INTERNAL -Dhyprlang_EXPORTS -I/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_devel_hyprlang/hyprlang/work/hyprlang-0.5.0/./include -I/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_devel_hyprlang/hyprlang/work/hyprlang-0.5.0/./src -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -mmacosx-version-min=12.0 -fPIC -O3 -std=gnu++23 -MD -MT CMakeFiles/hyprlang.dir/src/common.cpp.o -MF CMakeFiles/hyprlang.dir/src/common.cpp.o.d -o CMakeFiles/hyprlang.dir/src/common.cpp.o -c /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_devel_hyprlang/hyprlang/work/hyprlang-0.5.0/src/common.cpp
In file included from /opt/local/libexec/gcc13/libc++/include/c++/v1/new:96,
from /opt/local/libexec/gcc13/libc++/include/c++/v1/__memory/construct_at.h:23,
from /opt/local/libexec/gcc13/libc++/include/c++/v1/__memory/allocator_traits.h:14,
from /opt/local/libexec/gcc13/libc++/include/c++/v1/__memory/allocate_at_least.h:13,
from /opt/local/libexec/gcc13/libc++/include/c++/v1/__memory/allocator.h:14,
from /opt/local/libexec/gcc13/libc++/include/c++/v1/any:86,
from /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_devel_hyprlang/hyprlang/work/hyprlang-0.5.0/src/../include/hyprlang.hpp:6,
from /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_devel_hyprlang/hyprlang/work/hyprlang-0.5.0/src/public.hpp:2,
from /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_devel_hyprlang/hyprlang/work/hyprlang-0.5.0/src/common.cpp:1:
/opt/local/libexec/gcc13/libc++/include/c++/v1/cstdlib:144:9: error: 'at_quick_exit' has not been declared in '::'
144 | using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
| ^~~~~~~~~~~~~
/opt/local/libexec/gcc13/libc++/include/c++/v1/cstdlib:145:9: error: 'quick_exit' has not been declared in '::'
145 | using ::quick_exit _LIBCPP_USING_IF_EXISTS;
| ^~~~~~~~~~
In file included from /opt/local/libexec/gcc13/libc++/include/c++/v1/exception:86,
from /opt/local/libexec/gcc13/libc++/include/c++/v1/new:97:
/opt/local/libexec/gcc13/libc++/include/c++/v1/__type_traits/is_convertible.h:71:8: error: expected identifier before '__is_convertible'
71 | struct __is_convertible
| ^~~~~~~~~~~~~~~~
comment:6 Changed 3 years ago by barracuda156
| Version: | 2.8.1 → 2.9.1 |
|---|

Any idea what causes this? I just got it on PowerPC with
libc++:In file included from /opt/local/libexec/gcc13/libc++/include/c++/v1/exception:83, from /opt/local/libexec/gcc13/libc++/include/c++/v1/new:91, from os.hpp:15, from rar.hpp:6, from rar.cpp:1: /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1501:8: error: expected identifier before '__is_convertible' 1501 | struct __is_convertible | ^~~~~~~~~~~~~~~~ /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1501:8: error: expected unqualified-id before '__is_convertible' /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1515:40: error: expected identifier before '__is_convertible' 1515 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 1> : public false_type {}; | ^~~~~~~~~~~~~~~~ /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1515:40: error: expected unqualified-id before '__is_convertible' /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1516:40: error: expected identifier before '__is_convertible' 1516 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 1> : public false_type {}; | ^~~~~~~~~~~~~~~~ /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1516:40: error: expected unqualified-id before '__is_convertible' /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1517:40: error: expected identifier before '__is_convertible' 1517 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 1> : public false_type {}; | ^~~~~~~~~~~~~~~~ /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1517:40: error: expected unqualified-id before '__is_convertible' /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1518:40: error: expected identifier before '__is_convertible' 1518 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 1> : public false_type {}; | ^~~~~~~~~~~~~~~~ /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1518:40: error: expected unqualified-id before '__is_convertible' /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1520:40: error: expected identifier before '__is_convertible' 1520 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 2> : public false_type {}; | ^~~~~~~~~~~~~~~~ /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1520:40: error: expected unqualified-id before '__is_convertible' /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1521:40: error: expected identifier before '__is_convertible' 1521 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 2> : public false_type {}; | ^~~~~~~~~~~~~~~~ /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1521:40: error: expected unqualified-id before '__is_convertible' /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1522:40: error: expected identifier before '__is_convertible' 1522 | template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 2> : public false_type {}; | ^~~~~~~~~~~~~~~~ . . . /opt/local/libexec/gcc13/libc++/include/c++/v1/type_traits:1531:14: error: expected '{' before '__is_convertible' make: *** [rar.o] Error 1Came here to look for related tickets, and here we go, same error on 10.6.8 Intel.
UPD. At least on PowerPC this only happens with gcc13, but not gcc12.