Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 848495 - dev-cpp/range-v3-0.11.0: fails to build with with clang13 and libc++ (/usr/include/std/detail/associated_types.hpp:270:60: error: too many template arguments for class template '__iterator_traits' ...)
Summary: dev-cpp/range-v3-0.11.0: fails to build with with clang13 and libc++ (/usr/in...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexey
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: systemwide-clang systemwide-libcxx
  Show dependency tree
 
Reported: 2022-05-30 12:48 UTC by Frederik Pfautsch
Modified: 2022-06-01 08:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,22.44 KB, text/plain)
2022-06-01 07:53 UTC, Frederik Pfautsch
Details
failing net-im/telegram-3.6.1-r1 build.log (build.log,291.93 KB, text/plain)
2022-06-01 08:04 UTC, Frederik Pfautsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederik Pfautsch 2022-05-30 12:48:57 UTC
Compiling net-im/telegram-desktop with clang13 and libc++ gives the following error:

[121/1027] /usr/lib/llvm/13/bin/clang++ -DCRL_USE_COMMON_QUEUE -DDESKTOP_APP_DISABLE_CRASH_REPORTS -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION -DDESKTOP_APP_USE_PACKAGED -DQT_CORE_LIB -DQT_GUI_LIB -DQT_IMPLICIT_QCHAR_CONSTRUCTION -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_SVG_LIB -DQT_WIDGETS_LIB -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -I/var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/lib_base -I/var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/lib_rpl -I/var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/lib_crl -isystem /usr/include/qt5/QtCore/5.15.3 -isystem /usr/include/qt5/QtCore/5.15.3/QtCore -isystem /usr/include/qt5/QtGui/5.15.3 -isystem /usr/include/qt5/QtGui/5.15.3/QtGui -isystem /usr/include/qt5/QtWidgets/5.15.3 -isystem /usr/include/qt5/QtWidgets/5.15.3/QtWidgets -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtSvg -isystem /var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/ThirdParty/expected/include -isystem /usr/include/giomm-2.4 -isystem /usr/lib64/giomm-2.4/include -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/sysprof-4 -isystem /usr/lib64/libffi/include -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/glibmm-2.4 -isystem /usr/lib64/glibmm-2.4/include -isystem /usr/include/sigc++-2.0 -isystem /usr/lib64/sigc++-2.0/include -isystem /usr/include/gio-unix-2.0  -O2 -pipe -march=native -mtune=native -stdlib=libc++ -fstack-protector-all -fstack-clash-protection -fPIC -fno-strict-aliasing -pipe -Wall -Wextra -Wno-unused-parameter -Wno-switch -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated -pthread -std=gnu++20 -Winvalid-pch -fpch-instantiate-templates -Xclang -emit-pch -Xclang -include -Xclang /var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full_build/Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx -x c++-header -MD -MT Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.pch -MF Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.pch.d -o Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.pch -c /var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full_build/Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.cxx
FAILED: Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.pch 
/usr/lib/llvm/13/bin/clang++ -DCRL_USE_COMMON_QUEUE -DDESKTOP_APP_DISABLE_CRASH_REPORTS -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION -DDESKTOP_APP_USE_PACKAGED -DQT_CORE_LIB -DQT_GUI_LIB -DQT_IMPLICIT_QCHAR_CONSTRUCTION -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_SVG_LIB -DQT_WIDGETS_LIB -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -I/var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/lib_base -I/var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/lib_rpl -I/var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/lib_crl -isystem /usr/include/qt5/QtCore/5.15.3 -isystem /usr/include/qt5/QtCore/5.15.3/QtCore -isystem /usr/include/qt5/QtGui/5.15.3 -isystem /usr/include/qt5/QtGui/5.15.3/QtGui -isystem /usr/include/qt5/QtWidgets/5.15.3 -isystem /usr/include/qt5/QtWidgets/5.15.3/QtWidgets -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtSvg -isystem /var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/ThirdParty/expected/include -isystem /usr/include/giomm-2.4 -isystem /usr/lib64/giomm-2.4/include -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/sysprof-4 -isystem /usr/lib64/libffi/include -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/glibmm-2.4 -isystem /usr/lib64/glibmm-2.4/include -isystem /usr/include/sigc++-2.0 -isystem /usr/lib64/sigc++-2.0/include -isystem /usr/include/gio-unix-2.0  -O2 -pipe -march=native -mtune=native -stdlib=libc++ -fstack-protector-all -fstack-clash-protection -fPIC -fno-strict-aliasing -pipe -Wall -Wextra -Wno-unused-parameter -Wno-switch -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated -pthread -std=gnu++20 -Winvalid-pch -fpch-instantiate-templates -Xclang -emit-pch -Xclang -include -Xclang /var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full_build/Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx -x c++-header -MD -MT Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.pch -MF Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.pch.d -o Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.pch -c /var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full_build/Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.cxx
In file included from <built-in>:1:
In file included from /var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full_build/Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx:5:
In file included from /var/tmp/portage/net-im/telegram-desktop-3.6.1-r1/work/tdesktop-3.6.1-full/Telegram/lib_base/base/base_pch.h:23:
In file included from /usr/include/range/v3/all.hpp:17:
In file included from /usr/include/range/v3/action.hpp:17:
In file included from /usr/include/range/v3/action/action.hpp:23:
In file included from /usr/include/range/v3/action/concepts.hpp:23:
In file included from /usr/include/range/v3/range/concepts.hpp:37:
In file included from /usr/include/range/v3/iterator/concepts.hpp:30:
In file included from /usr/include/range/v3/iterator/access.hpp:22:
/usr/include/std/detail/associated_types.hpp:270:60: error: too many template arguments for class template '__iterator_traits'
            &is_std_iterator_traits_specialized_impl_(std::__iterator_traits<I, B> *))[2];
                                                           ^                    ~~
/usr/include/c++/v1/__iterator/iterator_traits.h:326:8: note: template is declared here
struct __iterator_traits {};
       ^
1 error generated.


Reproducible: Always




Upstream already provided a patch which worked for me: https://github.com/ericniebler/range-v3/commit/0487cca29e352e8f16bbd91fda38e76e39a0ed28
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-31 04:34:41 UTC
Please do include the full build.log and emerge --info.
Comment 2 Frederik Pfautsch 2022-06-01 07:53:40 UTC
Created attachment 781811 [details]
emerge --info
Comment 3 Frederik Pfautsch 2022-06-01 08:04:37 UTC
Created attachment 781814 [details]
failing net-im/telegram-3.6.1-r1 build.log
Comment 4 Frederik Pfautsch 2022-06-01 08:04:57 UTC
Oh, sorry, I forgot those two. I ran into more glibc-needing dependencies which I couldn't fix easily so I reverted back to compiling telegram still with clang, but with libstdc++ which works fine with and without the patch.