Skip to content

Call to 'vec_popcntu' is ambiguous #15411

@kuzi117

Description

@kuzi117
System information (version)
  • OpenCV => master, 834c992
  • Operating System / Platform => Ubuntu 18.04, Power 9
  • Compiler => clang version 10.0.0 (git@github.com:llvm/llvm-project.git 2f51a43f8c2b117e69a45eae6a7c849e035a793b)
Detailed description

On compilation, clang fails to compile due to an ambiguous call to vec_popcntu. Cut down error message follows but I can prepare a longer dump if need be:

In file included from .../opencv/modules/core/src/algorithm.cpp:43:
In file included from .../opencv/modules/core/src/precomp.hpp:85:
In file included from .../opencv/modules/core/include/opencv2/core/hal/intrin.hpp:186:
.../opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:841:21: error: call to 'vec_popcntu' is ambiguous     
{ return v_uint64x2(vec_popcntu(a.val)); }        
                    ^~~~~~~~~~~

.../opencv/modules/core/include/opencv2/core/vsx_utils.hpp:363:1: note: candidate function
                                           ^
In file included from .../opencv/modules/core/src/algorithm.cpp:43:
In file included from .../opencv/modules/core/src/precomp.hpp:85:
In file included from .../opencv/modules/core/include/opencv2/core/hal/intrin.hpp:186:
.../opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:843:21: error: call to 'vec_popcntu' is ambiguous
{ return v_uint64x2(vec_popcntu(a.val)); }

I've prepared a solution, pull request to follow.

Steps to reproduce
  1. Checkout opencv.
  2. Make build directory.
  3. cmake <path to source> -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
  4. make -j###
  5. Receive above error message.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions