Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X86平台下编译报错 #199

Open
JPChen2000 opened this issue May 9, 2023 · 1 comment
Open

X86平台下编译报错 #199

JPChen2000 opened this issue May 9, 2023 · 1 comment

Comments

@JPChen2000
Copy link

JPChen2000 commented May 9, 2023

编译分支:v1.2.0
编译环境: X86 Linux
编译器:gcc (GCC) 7.4.0

使用指令:
cmake
-DBUILD_TEST=OFF
-DBUILD_BENCHMARK=OFF
-DCMAKE_INSTALL_PREFIX=${build_dir}/install
-DWITH_LIB_PNG=ON
-DWITH_LIB_JPEG_TURBO=ON
-DCMAKE_BUILD_TYPE=Release
-DENABLE_AVX=ON
..
make -j32
编译报错:
/world/FlyCV/modules/core/base/include/common_avx.h: In member function ‘void fcv::Vld3_F32x8_Avx::load(const float*, __m256i*, __m256i*, __m256i*)’:
/home/chenjunpin/world/FlyCV/modules/core/base/include/common_avx.h:366:25: error: ‘_mm256_loadu2_m128i’ was not declared in this scope
__m256i bgr_0 = _mm256_loadu2_m128i((__m128i const*)(src_f32 + 12), (__m128i const*)(src_f32 + 0));
^~~~~~~~~~~~~~~~~~~
/world/FlyCV/modules/core/base/include/common_avx.h:366:25: note: suggested alternative: ‘_mm256_loadu_si256’
__m256i bgr_0 = _mm256_loadu2_m128i((__m128i const*)(src_f32 + 12), (__m128i const*)(src_f32 + 0));

1、使用 gcc -march=native -E -v - </dev/null 2>&1 | grep avx 查看GCC支持,确认编译器支持-mavx -mavx2
2、请问是否是因为GCC版本不一致的原因导致报错?

@JPChen2000
Copy link
Author

cmake/linux/linux.cmake:line 18 取消注释add_definitions((-DELDER_COMPILER)) 解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant