Skip to content

[C++] Compilation error xsimd/xsimd.hpp no such file or directory #50222

Closed

Description

@semen-nazarenko83

Describe the bug, including details regarding any error messages, version, and platform.

When included into another project via FetchContent_Declare() Apache Arrow produces error:
xsimd/xsimd.hpp: No such file or directory
Investigation showed that xsimd dependency in Apache Arrow is processed incorrectly. Here is the patch which fixes the error:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bcbf2e4645..c837899400 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2834,7 +2834,8 @@ macro(build_xsimd)
                       URL_HASH "SHA256=${ARROW_XSIMD_BUILD_SHA256_CHECKSUM}"
                       CMAKE_ARGS ${XSIMD_CMAKE_ARGS})
 
-  set(XSIMD_INCLUDE_DIR "${XSIMD_PREFIX}/include")
+  ExternalProject_Get_Property(xsimd_ep SOURCE_DIR)
+  set(XSIMD_INCLUDE_DIR "${SOURCE_DIR}/include")
   # The include directory must exist before it is referenced by a target.
   file(MAKE_DIRECTORY "${XSIMD_INCLUDE_DIR}")

Component(s)

C++

Activity

  1. kou commented on Jun 19, 2026

    @kou
    Member

    Let's migrate to FetchContent from ExternalProject.

  2. added a commit that references this issue on Jul 6, 2026
  3. added this to the 26.0.0 milestone on Jul 6, 2026
  4. raulcd commented on Jul 6, 2026

    @raulcd
    Member

    Issue resolved by pull request 50303
    #50303

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions