Skip to content

CMake build fails without Vulkan. #1778

Closed

Description

@phoenix-meadowlark

The cmake build as described in the getting started doc fails to build without having Vulkan installed:

-- Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR) 
CMake Error at build_tools/third_party/dear_imgui/CMakeLists.txt:60 (message):
  Vulkan library was not found


-- Configuring incomplete, errors occurred!
See also "/usr/src/git/iree/build/CMakeFiles/CMakeOutput.log".
See also "/usr/src/git/iree/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.

This error is thrown in build_tools/third_party/dear_imgui/CMakeLists.txt and in iree/samples/vulkan/CMakeLists.txt.

Activity

  1. added
    documentation
    infrastructure
    on May 4, 2020
  2. ScottTodd commented on May 5, 2020

    @ScottTodd
    Member

    For most targets, FindVulkan is not necessary. It should just be needed for the Vulkan GUI sample (and Dear ImGUI, which is only used by that sample). Here's how this is handled on the Bazel side:

    Empty rule is created for @vulkan_sdk//:sdk:

    https://github.com/google/iree/blob/f5c64fabdab88bf96aa4dfe7100a628304327ebe/build_tools/third_party/vulkan_sdk/repo.bzl#L15-L21

    Target is marked manual so wildcard builds won't attempt to build:

    https://github.com/google/iree/blob/f5c64fabdab88bf96aa4dfe7100a628304327ebe/iree/samples/vulkan/BUILD#L34-L47

    As a simple fix, we can omit those targets in CMake if the FindVulkan check fails.

  3. self-assigned this
    on May 5, 2020
  4. ScottTodd commented on May 5, 2020

    @ScottTodd
    Member

    Removed spirv_tools in #1792. I'm curious to see if the core parts of IREE (as described in the getting started docs) build with just python2.

    If it's easy enough for you to iterate on builds, could you try removing ${IREE_BUILD_COMPILER} from https://github.com/google/iree/blob/d0d81a26221e3c56e2b999f98238f60db7f85b73/CMakeLists.txt#L107-L116

    to confirm if there's some other dependency in there?

    Here's some of LLVM's use: https://github.com/llvm/llvm-project/search?q=pythoninterp&unscoped_q=pythoninterp

    (Installing python3 is good, but keeping the docs simple is better, if possible :D)

  5. phoenix-meadowlark commented on May 5, 2020

    @phoenix-meadowlark
    ContributorAuthor

    I'll look into it after I confirm that I have a working CMake build after #1794!

  6. phoenix-meadowlark commented on May 6, 2020

    @phoenix-meadowlark
    ContributorAuthor

    Removed spirv_tools in #1792. I'm curious to see if the core parts of IREE (as described in the getting started docs) build with just python2.

    If it's easy enough for you to iterate on builds, could you try removing ${IREE_BUILD_COMPILER} from

    https://github.com/google/iree/blob/d0d81a26221e3c56e2b999f98238f60db7f85b73/CMakeLists.txt#L107-L116

    to confirm if there's some other dependency in there?

    Here's some of LLVM's use: https://github.com/llvm/llvm-project/search?q=pythoninterp&unscoped_q=pythoninterp

    (Installing python3 is good, but keeping the docs simple is better, if possible :D)

    Removing ${IREE_BUILD_COMPILER} allows the getting started build to successfully complete without python3.

  7. ScottTodd commented on May 6, 2020

    @ScottTodd
    Member

    Oh, this comment thread should have been on #1779 >_>

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

Metadata

Metadata

Assignees

Labels

documentationinfrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions