Skip to content

Build fails with clang-19: ambiguous partial specializations of 'rebind_container<long, xt::svector<unsigned long>>', and other errors #3183

Closed

Description

@yurivict
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:8:
In file included from /usr/local/include/xtensor/xtensor.hpp:19:
In file included from /usr/local/include/xtensor/xbuffer_adaptor.hpp:21:
In file included from /usr/local/include/xtensor/xstorage.hpp:23:
In file included from /usr/local/include/xtensor/xtensor_simd.hpp:17:
/usr/local/include/xtensor/xutils.hpp:896:31: error: ambiguous partial specializations of 'rebind_container<long, xt::svector<unsigned long>>'
  896 |         using type = typename rebind_container<std::ptrdiff_t, S>::type;
      |                               ^
/usr/local/include/xtensor/xutils.hpp:924:5: note: in instantiation of template class 'xt::get_strides_type<xt::svector<unsigned long>>' requested here
  924 |     using get_strides_t = typename get_strides_type<C>::type;
      |     ^
/usr/local/include/xtensor/xarray.hpp:53:30: note: in instantiation of template type alias 'get_strides_t' requested here
   53 |         using strides_type = get_strides_t<shape_type>;
      |                              ^
/usr/local/include/xtensor/xcontainer.hpp:36:43: note: in instantiation of template class 'xt::xcontainer_inner_types<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
   36 |         using inner_shape_type = typename xcontainer_inner_types<D>::inner_shape_type;
      |                                           ^
/usr/local/include/xtensor/xarray.hpp:64:11: note: in instantiation of template class 'xt::xcontainer_iterable_types<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
   64 |         : xcontainer_iterable_types<xarray_container<EC, L, SC, Tag>>
      |           ^
/usr/local/include/xtensor/xiterable.hpp:43:43: note: in instantiation of template class 'xt::xiterable_inner_types<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
   43 |         using inner_shape_type = typename iterable_types::inner_shape_type;
      |                                           ^
/usr/local/include/xtensor/xiterable.hpp:151:30: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  151 |     class xiterable : public xconst_iterable<D>
      |                              ^
/usr/local/include/xtensor/xiterable.hpp:311:42: note: in instantiation of template class 'xt::xiterable<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
  311 |     class xcontiguous_iterable : private xiterable<D>
      |                                          ^
/usr/local/include/xtensor/xcontainer.hpp:71:31: note: in instantiation of template class 'xt::xcontiguous_iterable<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
   71 |     class xcontainer : public xcontiguous_iterable<D>,
      |                               ^
/usr/local/include/xtensor/xcontainer.hpp:260:39: note: in instantiation of template class 'xt::xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
  260 |     class xstrided_container : public xcontainer<D>
      |                                       ^
/usr/local/include/xtensor/xarray.hpp:82:37: note: in instantiation of template class 'xt::xstrided_container<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
   82 |     class xarray_container : public xstrided_container<xarray_container<EC, L, SC, Tag>>,
      |                                     ^
/wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:90:22: note: in instantiation of template class 'xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>' requested here
   90 |   xt::xarray<double> cnt {cnt_shape, 0.0};
      |                      ^
/usr/local/include/xtensor/xutils.hpp:883:12: note: partial specialization matches [with X = long, C = xt::svector, T = unsigned long, N = 4]
  883 |     struct rebind_container<X, C<T, N>>
      |            ^
/usr/local/include/xtensor/xstorage.hpp:1415:12: note: partial specialization matches [with X = long, T = unsigned long, N = 4, A = std::allocator<unsigned long>, B = true]
 1415 |     struct rebind_container<X, svector<T, N, A, B>>
      |            ^
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:8:
In file included from /usr/local/include/xtensor/xtensor.hpp:20:
In file included from /usr/local/include/xtensor/xcontainer.hpp:23:
/usr/local/include/xtensor/xiterable.hpp:45:50: error: no type named 'stepper' in 'xt::xiterable_inner_types<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
   45 |         using stepper = typename iterable_types::stepper;
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/local/include/xtensor/xiterable.hpp:151:30: note: in instantiation of template class 'xt::xconst_iterable<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
  151 |     class xiterable : public xconst_iterable<D>
      |                              ^
/usr/local/include/xtensor/xiterable.hpp:311:42: note: in instantiation of template class 'xt::xiterable<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
  311 |     class xcontiguous_iterable : private xiterable<D>
      |                                          ^
/usr/local/include/xtensor/xcontainer.hpp:71:31: note: in instantiation of template class 'xt::xcontiguous_iterable<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
   71 |     class xcontainer : public xcontiguous_iterable<D>,
      |                               ^
/usr/local/include/xtensor/xcontainer.hpp:260:39: note: in instantiation of template class 'xt::xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
  260 |     class xstrided_container : public xcontainer<D>
      |                                       ^
/usr/local/include/xtensor/xarray.hpp:82:37: note: in instantiation of template class 'xt::xstrided_container<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
   82 |     class xarray_container : public xstrided_container<xarray_container<EC, L, SC, Tag>>,
      |                                     ^
/wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:90:22: note: in instantiation of template class 'xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>' requested here
   90 |   xt::xarray<double> cnt {cnt_shape, 0.0};
      |                      ^
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:8:
In file included from /usr/local/include/xtensor/xtensor.hpp:20:
In file included from /usr/local/include/xtensor/xcontainer.hpp:23:
/usr/local/include/xtensor/xiterable.hpp:46:56: error: no type named 'const_stepper' in 'xt::xiterable_inner_types<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
   46 |         using const_stepper = typename iterable_types::const_stepper;
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:8:
In file included from /usr/local/include/xtensor/xtensor.hpp:20:
/usr/local/include/xtensor/xcontainer.hpp:140:15: error: using declaration refers into 'accessible_base::', which is not a base class of 'xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
  140 |         using accessible_base::at;
      |               ^~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xcontainer.hpp:260:39: note: in instantiation of template class 'xt::xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
  260 |     class xstrided_container : public xcontainer<D>
      |                                       ^
/usr/local/include/xtensor/xarray.hpp:82:37: note: in instantiation of template class 'xt::xstrided_container<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>' requested here
   82 |     class xarray_container : public xstrided_container<xarray_container<EC, L, SC, Tag>>,
      |                                     ^
/wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:90:22: note: in instantiation of template class 'xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>' requested here
   90 |   xt::xarray<double> cnt {cnt_shape, 0.0};
      |                      ^
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:8:
In file included from /usr/local/include/xtensor/xtensor.hpp:20:
/usr/local/include/xtensor/xcontainer.hpp:141:15: error: using declaration refers into 'accessible_base::', which is not a base class of 'xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
  141 |         using accessible_base::shape;
      |               ^~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xcontainer.hpp:142:15: error: using declaration refers into 'accessible_base::', which is not a base class of 'xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
  142 |         using accessible_base::operator[];
      |               ^~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xcontainer.hpp:143:15: error: using declaration refers into 'accessible_base::', which is not a base class of 'xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
  143 |         using accessible_base::back;
      |               ^~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xcontainer.hpp:144:15: error: using declaration refers into 'accessible_base::', which is not a base class of 'xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
  144 |         using accessible_base::front;
      |               ^~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xcontainer.hpp:145:15: error: using declaration refers into 'accessible_base::', which is not a base class of 'xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
  145 |         using accessible_base::in_bounds;
      |               ^~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xcontainer.hpp:146:15: error: using declaration refers into 'accessible_base::', which is not a base class of 'xcontainer<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
  146 |         using accessible_base::periodic;
      |               ^~~~~~~~~~~~~~~~~
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:14:
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/include/openmc/mesh.h:19:
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/include/openmc/xml_interface.h:9:
In file included from /usr/local/include/xtensor/xadapt.hpp:20:
/usr/local/include/xtensor/xarray.hpp:93:52: error: no type named 'allocator_type' in 'xt::xstrided_container<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
   93 |         using allocator_type = typename base_type::allocator_type;
      |                                ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:90:22: note: in instantiation of template class 'xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>' requested here
   90 |   xt::xarray<double> cnt {cnt_shape, 0.0};
      |                      ^
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:14:
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/include/openmc/mesh.h:19:
In file included from /wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/include/openmc/xml_interface.h:9:
In file included from /usr/local/include/xtensor/xadapt.hpp:20:
/usr/local/include/xtensor/xarray.hpp:102:54: error: no type named 'backstrides_type' in 'xt::xstrided_container<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long>>>'
  102 |         using backstrides_type = typename base_type::backstrides_type;
      |                                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/science/openmc/work/openmc-0.15.0/src/cmfd_solver.cpp:139:10: error: no viable conversion from returned value of type 'xt::xarray<double>' (aka 'xarray_container<uvector<double, std::allocator<double>>, (xt::layout_type)1, svector<unsigned long, 4, std::allocator<unsigned long>, true>>') to function return type 'xt::xtensor<double, 1>' (aka 'xtensor_container<uvector<double, allocator<double>>, 1UL, (xt::layout_type)1>')
  139 |   return counts;
      |          ^~~~~~
/usr/local/include/xtensor/xtensor.hpp:111:9: note: candidate constructor not viable: no known conversion from 'xt::xarray<double>' (aka 'xarray_container<uvector<double, std::allocator<double>>, (xt::layout_type)1, svector<unsigned long, 4, std::allocator<unsigned long>, true>>') to 'nested_initializer_list_t<value_type, 1UL>' (aka 'initializer_list<double>') for 1st argument
  111 |         xtensor_container(nested_initializer_list_t<value_type, N> t);
      |         ^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xtensor.hpp:123:9: note: candidate constructor not viable: no known conversion from 'xt::xarray<double>' (aka 'xarray_container<uvector<double, std::allocator<double>>, (xt::layout_type)1, svector<unsigned long, 4, std::allocator<unsigned long>, true>>') to 'const xtensor_container<uvector<double>, 1, xt::layout_type::row_major> &' for 1st argument
  123 |         xtensor_container(const xtensor_container&) = default;
      |         ^                 ~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xtensor.hpp:126:9: note: candidate constructor not viable: no known conversion from 'xt::xarray<double>' (aka 'xarray_container<uvector<double, std::allocator<double>>, (xt::layout_type)1, svector<unsigned long, 4, std::allocator<unsigned long>, true>>') to 'xtensor_container<uvector<double>, 1, xt::layout_type::row_major> &&' for 1st argument
  126 |         xtensor_container(xtensor_container&&) = default;
      |         ^                 ~~~~~~~~~~~~~~~~~~~
/usr/local/include/xtensor/xtensor.hpp:135:9: note: candidate template ignored: could not match 'xexpression' against 'xt::xarray_container'
  135 |         xtensor_container(const xexpression<E>& e);
      |         ^
/usr/local/include/xtensor/xtensor.hpp:112:18: note: explicit constructor is not a candidate
  112 |         explicit xtensor_container(const shape_type& shape, layout_type l = L);
      |                  ^
/usr/local/include/xtensor/xtensor.hpp:130:18: note: explicit constructor is not a candidate
  130 |         explicit xtensor_container(xarray_container<EC, L, SC, Tag>&&);
      |                  ^
13 errors generated.

log

Activity

  1. paulromano commented on Nov 13, 2024

    @paulromano
    Contributor

    Cross referencing exasmr#52

  2. jtramm commented on Jan 31, 2025

    @jtramm
    Contributor

    Once this PR (xtensor-stack/xtensor#2821) gets merged into xtensor, I think we should be able to just update the xtensor version in OpenMC to get it working again with LLVM 19.

  3. halserach commented on Apr 19, 2025

    @halserach

    They've merged the patch. Have we updated the xtensor version in OpenMC?

    xtensor-stack/xtensor#2821 (comment)

  4. GuySten commented on Feb 17, 2026

    @GuySten
    Contributor

    Fixed by #3805.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions