Closed kabe-gh closed 9 months ago
Interesting. test_vec.c
actually isn't supposed to be included in the build unless there is SSE/AVX. From src/CMakeLists.txt
:
if(
(${SSE} AND (${SSE_PRESENT} OR ${SSE_PRESENT} GREATER 0)) OR
(${AVX} AND (${AVX_PRESENT} OR ${AVX_PRESENT} GREATER 0)) OR
(${AVX2} AND (${AVX2_PRESENT} OR ${AVX2_PRESENT} GREATER 0)) OR
(${NEON} AND (${NEON_PRESENT} OR ${NEON_PRESENT} GREATER 0)) OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
add_executable(test_vec test_vec.c)
target_link_libraries(test_vec m)
if(LPCNET_C_PROC_FLAGS)
set_source_files_properties(test_vec.c PROPERTIES COMPILE_FLAGS ${LPCNET_C_PROC_FLAGS})
endif(LPCNET_C_PROC_FLAGS)
else()
message(WARNING "No SSE/AVX/AVX2 CPU flags identified, not building test_vec.")
endif()
How are you calling cmake
? And can you provide your CMake output here?
This was my fault. LPCNet was not to blame.
I had been disabling SSE by "-DAVX=FALSE -DSSE=FALSE", not "-DAVX=FALSE" "-DSSE=FALSE" . Properly passing "-DSSE=FALSE" made the patch unneeded.
It emits confusing error when "-DAVX=FALSE -DSSE=FALSE" is passed though.
Good to hear that it's working! I'll go ahead and close this out.
With no SSE, no AVX, no NEON, compile fails:
patch-no-sse.patch Above patch seems to fix this. #include "vec.h" was missing.