Skip to content

Build failure on ppc64le related to VSX with gcc10 #16448

Closed

Description

@kwizart
System information (version)
  • OpenCV => 4.2
  • Operating System / Platform => GNU/Linux (Fedora 32)
  • Compiler => gcc10
Detailed description

Full build.log from Fedora infra task:
https://koji.fedoraproject.org/koji/taskinfo?taskID=41111238

/builddir/build/BUILD/opencv-4.2.0/modules/core/include/opencv2/core/vsx_utils.hpp: In function 'void cv::hal::cpu_baseline::scalar_loop(const T1*, size_t, T1*, size_t, int, int, const T2*) [with OP = cv::hal::cpu_baseline::op_recip; T1 = int; T2 = float; Tvec = cv::hal_baseline::v_int32x4]':
/builddir/build/BUILD/opencv-4.2.0/modules/core/include/opencv2/core/vsx_utils.hpp:115:10: error: impossible constraint in 'asm'
  115 | { rt rs; __asm__ __volatile__(#opc" %x0,%x1" : "="#rto (rs) : #rgo (a)); return rs; }
      |          ^~~~~~~
/builddir/build/BUILD/opencv-4.2.0/modules/core/include/opencv2/core/vsx_utils.hpp:270:1: note: in expansion of macro 'VSX_IMPL_1RG'
  270 | VSX_IMPL_1RG(vec_float4, wf, vec_int4,    wa, xvcvsxwsp, vec_ctf)
      | ^~~~~~~~~~~~
/builddir/build/BUILD/opencv-4.2.0/modules/core/include/opencv2/core/vsx_utils.hpp:115:10: error: impossible constraint in 'asm'
  115 | { rt rs; __asm__ __volatile__(#opc" %x0,%x1" : "="#rto (rs) : #rgo (a)); return rs; }
Steps to reproduce

Build OpenCV 4.2 on ppc64le with VSX as baseline and Dispatched code generation: VSX3

The build uses -DCV_COMPILER_VSX_BROKEN_ASM

Activity

  1. alalek commented on Jan 28, 2020

    @alalek
    Member
  2. sharkcz commented on Jan 28, 2020

    @sharkcz

    preprocessed source arithm.dispatch.cpp.i.gz is compiled using
    /usr/bin/c++ -DCVAPI_EXPORTS -DVK_NO_PROTOTYPES -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/builddir/build/BUILD/opencv-4.2.0/build -I/usr/include/vulkan -I/builddir/build/BUILD/opencv-4.2.0/modules/core/include -I/builddir/build/BUILD/opencv-4.2.0/build/modules/core -I/usr/include/CL -isystem /usr/include/gdal -isystem /usr/include/eigen3 -isystem /usr/include/coin -isystem /usr/include/openblas -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -Wl,--as-needed -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -mcpu=power8 -fvisibility=hidden -fvisibility-inlines-hidden -DCV_COMPILER_VSX_BROKEN_ASM -fopenmp -fPIC -std=c++11 -o CMakeFiles/opencv_core.dir/src/arithm.dispatch.cpp.o -c /builddir/build/BUILD/opencv-4.2.0/modules/core/src/arithm.dispatch.cpp

  3. seiko2plus commented on Jan 28, 2020

    @seiko2plus
    Contributor

    @sharkcz, @kwizart, #16453 should resolves this issue, @alalek my bad, just misunderstood of how PowerPC constraints work, using constraint wa will be good enough not sure yet about the benefits of using other constraints such as we(VSX3), wr etc, I still need to dive more inside gcc, since I didn't realize any changes on the generated instructions.

  4. kwizart commented on Jan 29, 2020

    @kwizart
    Author

    I confirm that the build has succeeded.
    Thx for the quick fix.

  5. kwizart commented on Jan 29, 2020

    @kwizart
    Author

    Well, technically the PR isn't merged, so you might want to keep open.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions