Skip to content

集成到openwrt-24.10的时候编译出错 #1811

@devbzwlyukfkz5t

Description

@devbzwlyukfkz5t

编译平台:ubuntu-22.04
错误连接:https://github.com/devbzwlyukfkz5t/openwrt_cc/actions/runs/18626563051/job/53105406123

FAILED: src/gn/rust_project_writer.o
clang++ -MMD -MF src/gn/rust_project_writer.o.d -I../src -I. -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++20 -Wrange-loop-analysis -Wextra-semi-stmt -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-redundant-move -Wno-unused-variable -Wno-format -Wno-strict-aliasing -Wno-cast-function-type -c ../src/gn/rust_project_writer.cc -o src/gn/rust_project_writer.o
In file included from ../src/gn/rust_project_writer.cc:5:
In file included from ../src/gn/rust_project_writer.h:8:
In file included from ../src/gn/err.h:8:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory:64:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_construct.h:61:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/iterator_concepts.h:999:13: error: no matching function for call to '__begin'
= decltype(ranges::__cust_access::__begin(std::declval<_Tp&>()));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_base.h:595:5: note: in instantiation of template type alias '__range_iter_t' requested here
using iterator_t = std::__detail::__range_iter_t<_Tp>;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_util.h:121:36: note: in instantiation of template type alias 'iterator_t' requested here
requires contiguous_iterator<iterator_t<_Derived>>
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_util.h:228:29: note: in instantiation of template class 'std::ranges::view_interface<std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>>' requested here
class subrange : public view_interface<subrange<_It, _Sent, _Kind>>
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_algo.h:1179:7: note: in instantiation of template class 'std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>' requested here
operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const
^
../src/gn/rust_project_writer.cc:221:41: note: in instantiation of function template specialization 'std::ranges::__unique_fn::operator()<std::vector &, std::identity, std::ranges::equal_to>' requested here
include_dirs.erase(std::ranges::unique(include_dirs).begin(),
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/iterator_concepts.h:983:7: note: candidate template ignored: constraints not satisfied [with _Tp = std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>]
__begin(_Tp& __t)
^
^
In file included from ../src/gn/rust_project_writer.cc:5:
In file included from ../src/gn/rust_project_writer.h:8:
In file included from ../src/gn/err.h:12:
In file included from ../src/gn/label.h:13:
In file included from ../src/gn/source_dir.h:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/algorithm:63:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_algo.h:36:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_util.h:133:24: error: constraints not satisfied for alias template 'sentinel_t' [with _Range = std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>]
&& sized_sentinel_for<sentinel_t<_Derived>, iterator_t<_Derived>>
^~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_util.h:228:29: note: in instantiation of template class 'std::ranges::view_interface<std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>>' requested here
class subrange : public view_interface<subrange<_It, _Sent, _Kind>>
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_algo.h:1179:7: note: in instantiation of template class 'std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>' requested here
operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const
^
../src/gn/rust_project_writer.cc:221:41: note: in instantiation of function template specialization 'std::ranges::__unique_fn::operator()<std::vector &, std::identity, std::ranges::equal_to>' requested here
include_dirs.erase(std::ranges::unique(include_dirs).begin(),
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_base.h:597:12: note: because 'std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>' does not satisfy 'range'
template
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_base.h:585:2: note: because 'ranges::begin(__t)' would be invalid: no matching function for call to object of type 'const __cust_access::_Begin'
ranges::begin(__t);
^
In file included from ../src/gn/rust_project_writer.cc:5:
In file included from ../src/gn/rust_project_writer.h:8:
In file included from ../src/gn/err.h:12:
In file included from ../src/gn/label.h:13:
In file included from ../src/gn/source_dir.h:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/algorithm:63:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_algo.h:36:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_util.h:139:24: error: constraints not satisfied for alias template 'sentinel_t' [with _Range = const std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>]
&& sized_sentinel_for<sentinel_t,
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_base.h:597:12: note: because 'const std::ranges::subrange<__gnu_cxx::__normal_iterator<SourceDir *, std::vector>, __gnu_cxx::__normal_iterator<SourceDir *, std::vector>, std::ranges::subrange_kind::sized>' does not satisfy 'range'
template
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ranges_base.h:585:2: note: because 'ranges::begin(__t)' would be invalid: no matching function for call to object of type 'const __cust_access::_Begin'
ranges::begin(__t);
^
4 errors generated.
ninja: build stopped: subcommand failed.
make[3]: *** [Makefile:59: /home/runner/work/openwrt_cc/openwrt_cc/openwrt/build_dir/hostpkg/gn-2025.09.18~81b24e01/.built] Error 1
make[2]: *** [package/Makefile:174: package/helloworld/gn/host/compile] Error 1
make[1]: *** [package/Makefile:170: /home/runner/work/openwrt_cc/openwrt_cc/openwrt/staging_dir/target-aarch64_cortex-a72_musl/stamp/.package_compile] Error 2
make: *** [/home/runner/work/openwrt_cc/openwrt_cc/openwrt/include/toplevel.mk:233: world] Error 2
make[3]: Leaving directory '/home/runner/work/openwrt_cc/openwrt_cc/openwrt/package/helloworld/gn'
time: package/helloworld/gn/host-compile#1.26#0.14#1.40
ERROR: package/helloworld/gn [host] failed to build.
make[2]: Leaving directory '/home/runner/work/openwrt_cc/openwrt_cc/openwrt'
make[1]: Leaving directory '/home/runner/work/openwrt_cc/openwrt_cc/openwrt'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions