Skip to content

Build error with gcc10.x, missing _mm256_cvtsi256_si32 #832

@junluan

Description

@junluan

Hi.

I find a problem to build simdutf because of missing _mm256_cvtsi256_si32 symbol when using gcc10.x

/usr/bin/c++  -I/tmp/vcpkg/buildtrees/simdutf/src/v7.3.6-4ab8b74fab.clean/src -I/tmp/vcpkg/buildtrees/simdutf/src/v7.3.6-4ab8b74fab.clean/include -fPIC -g -std=c++11 -fPIC -Wall -Wextra -Weffc++ -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion -Wunused-function -Wfatal-errors -fdiagnostics-color=always -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store -MD -MT src/CMakeFiles/simdutf.dir/simdutf.cpp.o -MF src/CMakeFiles/simdutf.dir/simdutf.cpp.o.d -o src/CMakeFiles/simdutf.dir/simdutf.cpp.o -c /tmp/vcpkg/buildtrees/simdutf/src/v7.3.6-4ab8b74fab.clean/src/simdutf.cpp
In file included from /tmp/vcpkg/buildtrees/simdutf/src/v7.3.6-4ab8b74fab.clean/src/haswell/implementation.cpp:38,
                 from /tmp/vcpkg/buildtrees/simdutf/src/v7.3.6-4ab8b74fab.clean/src/simdutf.cpp:138:
/tmp/vcpkg/buildtrees/simdutf/src/v7.3.6-4ab8b74fab.clean/src/haswell/avx2_utf16fix.cpp: In function ‘void simdutf::haswell::{anonymous}::utf16fix_block(char16_t*, const char16_t*)’:
/tmp/vcpkg/buildtrees/simdutf/src/v7.3.6-4ab8b74fab.clean/src/haswell/avx2_utf16fix.cpp:43:10: error: there are no arguments to ‘_mm256_cvtsi256_si32’ that depend on a template parameter, so a declaration of ‘_mm256_cvtsi256_si32’ must be available [-fpermissive]
   43 |     lb = _mm256_cvtsi256_si32(lb_illseq);
      |          ^~~~~~~~~~~~~~~~~~~~

This _mm256_cvtsi256_si32 function is added in gcc11.x. Can we make it compatible with gcc before 11?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions