Skip to content

CMake build fails without IREE_BUILD_COMPILER #1142

Closed

Description

@phoenix-meadowlark

Running cmake -DIREE_BUILD_COMPILER=OFF -DIREE_BUILD_TESTS=ON -DIREE_BUILD_SAMPLES=OFF -DIREE_BUILD_DEBUGGER=OFF .. in the build/ directory on MacOS fails to find several targets, e.g. iree_compiler_Dialect_Modules_Strings_strings-translate:

-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- The C compiler identification is AppleClang 11.0.0.11000033
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/clang++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- No CMAKE_CXX_STANDARD set, assuming 11
-- No build type selected, default to Release
-- Found PythonInterp: /Users/phoenix/.pyenv/shims/python (found version "3.6.10") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- No CMAKE_CXX_STANDARD set, assuming 11
-- Looking for strtof_l
-- Looking for strtof_l - not found
-- Looking for strtoull_l
-- Looking for strtoull_l - not found
-- Vulkan-ExtensionLayer: Using Vulkan headers from Vulkan::Headers target
-- The ASM compiler identification is Clang
-- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc
-- clang project is disabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- debuginfo-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is enabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- Could NOT find Z3: Found unsuitable version "0.0.0", but required is at least "4.7.1" (found Z3_LIBRARIES-NOTFOUND)
-- Found libtool - /Library/Developer/CommandLineTools/usr/bin/libtool
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - found
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Performing Test HAVE_CRASHREPORTER_INFO
-- Performing Test HAVE_CRASHREPORTER_INFO - Success
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_getspecific in pthread
-- Looking for pthread_getspecific in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for pthread_mutex_lock in pthread
-- Looking for pthread_mutex_lock in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Looking for pfm_initialize in pfm
-- Looking for pfm_initialize in pfm - not found
-- Looking for compress2 in z
-- Looking for compress2 in z - found
-- Looking for el_init in edit
-- Looking for el_init in edit - found
-- Looking for setupterm in terminfo
-- Looking for setupterm in terminfo - not found
-- Looking for setupterm in tinfo
-- Looking for setupterm in tinfo - not found
-- Looking for setupterm in curses
-- Looking for setupterm in curses - found
-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.4") 
-- Looking for xar_open in xar
-- Looking for xar_open in xar - found
-- Looking for arc4random
-- Looking for arc4random - found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include  
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - found
-- Looking for getpagesize
-- Looking for getpagesize - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for futimens
-- Looking for futimens - found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for posix_fallocate
-- Looking for posix_fallocate - not found
-- Looking for lseek64
-- Looking for lseek64 - not found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - found
-- Looking for getrlimit
-- Looking for getrlimit - found
-- Looking for posix_spawn
-- Looking for posix_spawn - found
-- Looking for pread
-- Looking for pread - found
-- Looking for sbrk
-- Looking for sbrk - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - not found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for dladdr
-- Looking for dladdr - found
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Success
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Failed
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Looking for sched_getaffinity
-- Looking for sched_getaffinity - not found
-- Looking for CPU_COUNT
-- Looking for CPU_COUNT - not found
-- Looking for pthread_getname_np
-- Looking for pthread_getname_np - found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - found
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Success
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Success
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Found ld64 - /Library/Developer/CommandLineTools/usr/bin/ld
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM host triple: x86_64-apple-darwin19.3.0
-- LLVM default target triple: x86_64-apple-darwin19.3.0
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Failed
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success
-- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
-- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR - Success
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - found
-- Performing Test macos_signposts_usable
-- Performing Test macos_signposts_usable - Success
-- Constructing LLVMBuild project information
-- Found Git: /usr/local/bin/git (found version "2.16.2") 
-- Linker detection: ld64
-- Targeting WebAssembly
-- Targeting X86
-- Failed to find LLVM FileCheck
-- git Version: v1.5.0-309de598
-- Version: 1.5.0
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring done
CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_compiler_Dialect_Modules_Strings_strings-translate>

  No target "iree_compiler_Dialect_Modules_Strings_strings-translate"
Call Stack (most recent call first):
  iree/modules/strings/CMakeLists.txt:64 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_compiler_Dialect_Modules_TensorList_tensorlist-translate>

  No target "iree_compiler_Dialect_Modules_TensorList_tensorlist-translate"
Call Stack (most recent call first):
  iree/modules/tensorlist/CMakeLists.txt:17 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  iree/vm/CMakeLists.txt:34 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  iree/vm/CMakeLists.txt:91 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_lit_test.cmake:60 (add_test):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_compiler_Dialect_Modules_Check_check-translate>

  No target "iree_compiler_Dialect_Modules_Check_check-translate"
Call Stack (most recent call first):
  build_tools/cmake/iree_lit_test.cmake:112 (iree_lit_test)
  iree/modules/check/test/CMakeLists.txt:18 (iree_lit_test_suite)


CMake Error at build_tools/cmake/iree_lit_test.cmake:60 (add_test):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_compiler_Dialect_Modules_Check_check-translate>

  No target "iree_compiler_Dialect_Modules_Check_check-translate"
Call Stack (most recent call first):
  build_tools/cmake/iree_lit_test.cmake:112 (iree_lit_test)
  iree/modules/check/test/CMakeLists.txt:18 (iree_lit_test_suite)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_compiler_Dialect_Modules_Strings_strings-translate>

  No target "iree_compiler_Dialect_Modules_Strings_strings-translate"
Call Stack (most recent call first):
  iree/modules/strings/CMakeLists.txt:64 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_compiler_Dialect_Modules_Strings_strings-translate>

  No target "iree_compiler_Dialect_Modules_Strings_strings-translate"
Call Stack (most recent call first):
  iree/modules/strings/CMakeLists.txt:64 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_compiler_Dialect_Modules_TensorList_tensorlist-translate>

  No target "iree_compiler_Dialect_Modules_TensorList_tensorlist-translate"
Call Stack (most recent call first):
  iree/modules/tensorlist/CMakeLists.txt:17 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_compiler_Dialect_Modules_TensorList_tensorlist-translate>

  No target "iree_compiler_Dialect_Modules_TensorList_tensorlist-translate"
Call Stack (most recent call first):
  iree/modules/tensorlist/CMakeLists.txt:17 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  iree/vm/CMakeLists.txt:34 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  iree/vm/CMakeLists.txt:34 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  iree/vm/CMakeLists.txt:91 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_bytecode_module.cmake:67 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  iree/vm/CMakeLists.txt:91 (iree_bytecode_module)


CMake Error at build_tools/cmake/iree_lit_test.cmake:60 (add_test):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-run-mlir>

  No target "iree_tools_iree-run-mlir"
Call Stack (most recent call first):
  build_tools/cmake/iree_lit_test.cmake:112 (iree_lit_test)
  iree/tools/test/CMakeLists.txt:18 (iree_lit_test_suite)


CMake Error at build_tools/cmake/iree_lit_test.cmake:60 (add_test):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  build_tools/cmake/iree_lit_test.cmake:112 (iree_lit_test)
  iree/tools/test/CMakeLists.txt:18 (iree_lit_test_suite)


CMake Error at build_tools/cmake/iree_lit_test.cmake:60 (add_test):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-run-mlir>

  No target "iree_tools_iree-run-mlir"
Call Stack (most recent call first):
  build_tools/cmake/iree_lit_test.cmake:112 (iree_lit_test)
  iree/tools/test/CMakeLists.txt:18 (iree_lit_test_suite)


CMake Error at build_tools/cmake/iree_lit_test.cmake:60 (add_test):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  build_tools/cmake/iree_lit_test.cmake:112 (iree_lit_test)
  iree/tools/test/CMakeLists.txt:18 (iree_lit_test_suite)


CMake Error at build_tools/cmake/iree_lit_test.cmake:60 (add_test):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-run-mlir>

  No target "iree_tools_iree-run-mlir"
Call Stack (most recent call first):
  build_tools/cmake/iree_lit_test.cmake:112 (iree_lit_test)
  iree/tools/test/CMakeLists.txt:18 (iree_lit_test_suite)


CMake Error at build_tools/cmake/iree_lit_test.cmake:60 (add_test):
  Error evaluating generator expression:

    $<TARGET_FILE:iree_tools_iree-translate>

  No target "iree_tools_iree-translate"
Call Stack (most recent call first):
  build_tools/cmake/iree_lit_test.cmake:112 (iree_lit_test)
  iree/tools/test/CMakeLists.txt:18 (iree_lit_test_suite)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Activity

  1. marbre commented on Mar 19, 2020

    @marbre
    Member

    Well that is not to be Mac specific issue, it's the same with my Linux here. We might need to clean up some dependencies between the targets. iree-translate is currently only build if the compiler is build. So please build with -DIREE_BUILD_COMPILER=ON.

  2. GMNGeoffrey commented on Mar 19, 2020

    @GMNGeoffrey
    Member

    Yep I asked Phoenix to post this bug for tracking so that we can clean things up. I had the same conclusion that this is deps sneaking in between compiler and "non-compiler" part. I think maybe the right fix here is to have tests that rely on the compiler be conditioned on IREE_BUILD_COMPILER. Either way we should have a CI build that doesn't build the compiler

  3. changed the title [-]CMake generation step fails to find targets on MacOS.[/-] [+]CMake build fails without IREE_BUILD_COMPILER on[/+] on Mar 19, 2020
  4. changed the title [-]CMake build fails without IREE_BUILD_COMPILER on[/-] [+]CMake build fails without IREE_BUILD_COMPILER[/+] on Mar 19, 2020
  5. GMNGeoffrey commented on Mar 19, 2020

    @GMNGeoffrey
    Member

    Whatever we do it should be supported by bazel_to_cmake. Let's not add a bunch more manual work to maintaining the cmake builds. Also in the meantime we should update the getting started docs to use IREE_BUIILD_COMPILER=ON and link to this issue.

  6. marbre commented on Mar 24, 2020

    @marbre
    Member

    Any suggestion how we can rid of the IREE_BUIILD_COMPILER check in iree/tools/CMakeLists.txt?

  7. GMNGeoffrey commented on Mar 24, 2020

    @GMNGeoffrey
    Member

    Any suggestion how we can rid of the IREE_BUIILD_COMPILER check in iree/tools/CMakeLists.txt?

    Not sure I follow. That would build the compiler, so I think the check makes sense. I think maybe we should turn off all non-compiler tests when IREE_BUILD_COMPILER is off (so basically tag compiler tests). Another option is just to update the instructions to indicate what tests to run. CMake has the option to add labels to tests which can then be filtered by CTest. We can make those mirror bazel tags.

  8. marbre commented on Mar 24, 2020

    @marbre
    Member

    Not sure I follow. That would build the compiler, so I think the check makes sense. I think maybe we should turn off all non-compiler tests when IREE_BUILD_COMPILER is off (so basically tag compiler tests). Another option is just to update the instructions to indicate what tests to run. CMake has the option to add labels to tests which can then be filtered by CTest. We can make those mirror bazel tags.

    Yeah, that was misleading. At the moment we still have some checks in iree/tools/CMakeLists.txt that prevent us to run bazel_to_cmake on it. Indeed these tools can only be build if the compiler is build and these tools are required in some tests. So yes, this tests should be tagged/labeled somehow. However, if we still want to push bazel_to_cmake further, we need to find a solution for the branching in iree/tools/CMakeLists.txt. I messed those two issues a little, sorry.

  9. GMNGeoffrey commented on Mar 24, 2020

    @GMNGeoffrey
    Member

    However, if we still want to push bazel_to_cmakefurther, we need to find a solution for the branching iniree/tools/CMakeLists.txt`. I messed those two issues a little, sorry.

    Ah yes, agreed! I think some kind of tags in bazel that get custom interperpreted in cmake would be good (similar to testonly). We could even make all our tests in bazel go through a custom macro is requires_compiler is a proper argument. We could also do some kind of dependency analysis, although I think I prefer explicit because then we can enforce dependencies based on intent.

  10. marbre commented on Mar 24, 2020

    @marbre
    Member

    However, if we still want to push bazel_to_cmakefurther, we need to find a solution for the branching iniree/tools/CMakeLists.txt`. I messed those two issues a little, sorry.

    Ah yes, agreed! I think some kind of tags in bazel that get custom interperpreted in cmake would be good (similar to testonly). We could even make all our tests in bazel go through a custom macro is requires_compiler is a proper argument. We could also do some kind of dependency analysis, although I think I prefer explicit because then we can enforce dependencies based on intent.

    No, please let's go with an explicit solution! Tagging like with testonly sounds good.

  11. added this to the Infrastructure Fixit milestone on Apr 15, 2020
  12. benvanik commented on Apr 15, 2020

    @benvanik
    Collaborator

    I think this is working now (looking at the cmake files) as tblgen is still built when ENABLE_COMPILER is off. #357 is tracking generating this file in a way that can be used in the runtime without building the compiler by making it part of the compiler install.

  13. GMNGeoffrey commented on Apr 16, 2020

    @GMNGeoffrey
    Member

    Looks like there's more work needed here.

  14. GMNGeoffrey commented on Apr 16, 2020

    @GMNGeoffrey
    Member

    Confirmed that this does not work at HEAD

  15. benvanik commented on Nov 22, 2020

    @benvanik
    Collaborator

    Dupe of #357 (we should not require the compiler to build as part of a runtime build).

  16. added
    infrastructure
    on May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructure

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions