iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.85k stars 614 forks source link

Build fails because of a specific path #16056

Open haifenghan opened 10 months ago

haifenghan commented 10 months ago

If I put IREE under a path including "haifeng.han", such as /home/haifeng.han/iree, it will fail to build IREE with some errors. However, it works fine under /tmp/iree or other paths without "haifeng.han".

os: ubuntu 22.04 clang version 14.0.0 LLD 14.0.0 (compatible with GNU linkers) ccache version 4.9 cmake version 3.22.1 Ninja version 1.11.1 IREE branch: commit 67111559fed20bee384d251e88bddc5859f9efd0 (HEAD -> latest-snapshot, tag: candidate-20240104.760, origin/latest-snapshot)

build command:

BUILD_DIR=../iree-build/
cmake -G Ninja -B $BUILD_DIR -S . \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DIREE_ENABLE_ASSERTIONS=ON \
    -DIREE_ENABLE_SPLIT_DWARF=ON \
    -DIREE_ENABLE_THIN_ARCHIVES=ON \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
    -DIREE_BUILD_COMPILER=ON \
    -DCMAKE_C_COMPILER_LAUNCHER=ccache \
    -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
    -DIREE_ENABLE_LLD=ON

cmake --build $BUILD_DIR -j
ScottTodd commented 10 months ago

Can you post the error messages here? (Ideally the full CMake configure output and build output)

haifenghan commented 10 months ago

Thanks for the reply! @ScottTodd

The main error comes from the configuration of CMake with the command:

cmake -G Ninja -B $BUILD_DIR -S . \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DIREE_ENABLE_ASSERTIONS=ON \
    -DIREE_ENABLE_SPLIT_DWARF=ON \
    -DIREE_ENABLE_THIN_ARCHIVES=ON \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
    -DIREE_BUILD_COMPILER=ON \
    -DCMAKE_C_COMPILER_LAUNCHER=ccache \
    -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
    -DIREE_ENABLE_LLD=ON

After this, there will be 7267 commands to be executed when the path is /tmp/iree. On the contrary, there will only be 7109 commands when the path is /home/haifeng.han/iree. The log with errors is:

-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /usr/bin/clang
-- The C compiler identification is Clang 14.0.0
-- The CXX compiler identification is Clang 14.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDAToolkit: /usr/local/cuda/include (found version "12.3.52")
-- 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
-- IREE HAL drivers:
--   - cuda
--   - local-sync
--   - local-task
--   - vulkan
-- IREE HAL local executable library loaders:
--   - embedded-elf
--   - system-library
--   - vmvx-module
-- IREE HAL local executable plugin mechanisms:
--   - embedded-elf
--   - system-library
-- IREE compiler input dialects:
--   - StableHLO
--   - Torch MLIR
--   - TOSA
-- IREE compiler output formats:
--   - 'vm-c': textual C source module
--   - 'vm-bytecode': VM bytecode
--   - 'vm-asm': VM MLIR assembly
-- IREE_ENABLE_ASSERTIONS force disabled NDEBUG for CMAKE_CXX_FLAGS_RELWITHDEBINFO: '-O2 -g -DNDEBUG' -> '-O2 -g '
-- IREE_ENABLE_ASSERTIONS force disabled NDEBUG for CMAKE_C_FLAGS_RELWITHDEBINFO: '-O2 -g -DNDEBUG' -> '-O2 -g '
-- Looking for dlopen
-- Looking for dlopen - found
-- Performing Test IREE_SUPPORTS_VISIBILITY_DEFAULT
-- Performing Test IREE_SUPPORTS_VISIBILITY_DEFAULT - Success
-- Performing Test CXX_SUPPORTS_CUSTOM_LINKER
-- Performing Test CXX_SUPPORTS_CUSTOM_LINKER - Success
-- Performing Test CC_SUPPORTS_CUSTOM_LINKER
-- Performing Test CC_SUPPORTS_CUSTOM_LINKER - Success
-- Performing Test IREE_SUPPORTS_SPLIT_DWARF
-- Performing Test IREE_SUPPORTS_SPLIT_DWARF - Success
-- Performing Test IREE_SUPPORTS_GDB_INDEX
-- Performing Test IREE_SUPPORTS_GDB_INDEX - Success
-- Enabling gdb-index (binaries with debug info are not relocatable)
-- Enabling thin archives (static libraries will not be relocatable)
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
-- Found Python: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
-- Looking for PyYAML - found
-- Found Git: /usr/bin/git (found version "2.34.1")
-- Using found CUDA toolkit: /usr/local/cuda
-- Using CUDA libdevice: /usr/local/cuda/bin/../nvvm/libdevice/libdevice.10.bc
-- Using CUDA INCLUDE_DIRS from found SDK: /usr/local/cuda/include
-- Adding bundled LLVM source dependency
-- IREE compiler target backends:
--   - cuda
--   - llvm-cpu
--   - llvm-cpu (wasm)
--   - metal-spirv
--   - rocm
--   - vulkan-spirv
--   - vmvx
-- Configuring third_party/llvm-project
--   bolt project is disabled
--   clang project is enabled
--   clang-tools-extra project is disabled
--   compiler-rt project is disabled
--   cross-project-tests project is disabled
--   libc project is disabled
--   libclc project is disabled
--   lld project is enabled
--   lldb project is disabled
--   mlir project is enabled
--   openmp project is disabled
--   polly project is disabled
--   pstl project is disabled
--   flang project is disabled
--   Found Python3: /usr/bin/python3.10 (found suitable version "3.10.12", minimum required is "3.0") found components: Interpreter
--   Performing Test LLVM_LIBSTDCXX_MIN
--   Performing Test LLVM_LIBSTDCXX_MIN - Success
--   Performing Test LLVM_LIBSTDCXX_SOFT_ERROR
--   Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success
--   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 - found
--   Looking for malloc/malloc.h
--   Looking for malloc/malloc.h - not 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 sysexits.h
--   Looking for sysexits.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 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
--   Performing Test HAVE_BUILTIN_THREAD_POINTER
--   Performing Test HAVE_BUILTIN_THREAD_POINTER - Success
--   Looking for mach/mach.h
--   Looking for mach/mach.h - not found
--   Looking for CrashReporterClient.h
--   Looking for CrashReporterClient.h - not found
--   Looking for linux/magic.h
--   Looking for linux/magic.h - found
--   Looking for pthread_create in pthread
--   Looking for pthread_create 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 - found
--   Looking for pfm_initialize in pfm
--   Looking for pfm_initialize in pfm - not found
--   Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
--   Looking for compress2
--   Looking for compress2 - found
--   Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.13")
--   Looking for xmlReadMemory
--   Looking for xmlReadMemory - found
--   Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
--   Performing Test Terminfo_LINKABLE
--   Performing Test Terminfo_LINKABLE - Success
--   Found Terminfo: /usr/lib/x86_64-linux-gnu/libtinfo.so
--   Looking for arc4random
--   Looking for arc4random - not found
--   Looking for backtrace
--   Looking for backtrace - found
--   backtrace facility detected in default set of libraries
--   Found Backtrace: /usr/include
--   Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
--   Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
--   Looking for __register_frame
--   Looking for __register_frame - found
--   Looking for __deregister_frame
--   Looking for __deregister_frame - found
--   Looking for __unw_add_dynamic_fde
--   Looking for __unw_add_dynamic_fde - not found
--   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 sigaltstack
--   Looking for sigaltstack - found
--   Looking for mallctl
--   Looking for mallctl - not found
--   Looking for mallinfo
--   Looking for mallinfo - found
--   Looking for mallinfo2
--   Looking for mallinfo2 - found
--   Looking for malloc_zone_statistics
--   Looking for malloc_zone_statistics - not 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_r
--   Looking for strerror_r - found
--   Looking for strerror_s
--   Looking for strerror_s - not found
--   Looking for setenv
--   Looking for setenv - found
--   Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
--   Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Failed
--   Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
--   Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Success
--   Looking for __GLIBC__
--   Looking for __GLIBC__ - found
--   Looking for pthread_getname_np
--   Looking for pthread_getname_np - found
--   Looking for pthread_setname_np
--   Looking for pthread_setname_np - found
--   Looking for dlopen
--   Looking for dlopen - found
--   Looking for dladdr
--   Looking for dladdr - found
--   Looking for proc_pid_rusage
--   Looking for proc_pid_rusage - not found
--   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
--   LLVM host triple: x86_64-unknown-linux-gnu
--   Native target architecture is X86
--   Threads enabled.
--   Doxygen disabled.
--   Ninja version: 1.11.1
--   Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
--   OCaml bindings disabled.
--   Found Python module pygments
--   Found Python module pygments.lexers.c_cpp
--   Found Python module yaml
--   LLVM default target triple: x86_64-unknown-linux-gnu
--   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 C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
--   Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Success
--   Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
--   Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Success
--   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 C_SUPPORTS_CMAKE_CXX_FLAGS
--   Performing Test C_SUPPORTS_CMAKE_CXX_FLAGS - Failed
--   Performing Test CXX_SUPPORTS_CMAKE_CXX_FLAGS
--   Performing Test CXX_SUPPORTS_CMAKE_CXX_FLAGS - Failed
--   Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS
--   Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Success
--   Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS
--   Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS - Success
--   Performing Test C_SUPPORTS_FFUNCTION_SECTIONS
--   Performing Test C_SUPPORTS_FFUNCTION_SECTIONS - Success
--   Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS
--   Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS - Success
--   Performing Test C_SUPPORTS_FDATA_SECTIONS
--   Performing Test C_SUPPORTS_FDATA_SECTIONS - Success
--   Performing Test CXX_SUPPORTS_FDATA_SECTIONS
--   Performing Test CXX_SUPPORTS_FDATA_SECTIONS - Success
--   Looking for os_signpost_interval_begin
--   Looking for os_signpost_interval_begin - not found
--   Linker detection: unknown
--   Performing Test HAS_WERROR_GLOBAL_CTORS
--   Performing Test HAS_WERROR_GLOBAL_CTORS - Success
--   Performing Test LLVM_HAS_NOGLOBAL_CTOR_MUTEX
--   Performing Test LLVM_HAS_NOGLOBAL_CTOR_MUTEX - Success
--   Looking for __x86_64__
--   Looking for __x86_64__ - found
--   Targeting NVPTX
--   Targeting X86
--   Targeting ARM
--   Targeting AArch64
--   Targeting RISCV
--   Targeting WebAssembly
--   Targeting AMDGPU
--   Looking for sys/resource.h
--   Looking for sys/resource.h - found
--   Clang version: 18.0.0git
--   Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
--   Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Success
--   Looking for include file sys/inotify.h
--   Looking for include file sys/inotify.h - found
--   LLD version: 18.0.0
--   Performing Test C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION
--   Performing Test C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION - Success
--   Performing Test C_SUPPORTS_WERROR_MISMATCHED_TAGS
--   Performing Test C_SUPPORTS_WERROR_MISMATCHED_TAGS - Success
--   Performing Test C_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR
--   Performing Test C_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR - Success
--   Performing Test CXX_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR
--   Performing Test CXX_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR - Success
--   Performing Test COMPILER_SUPPORTS_WARNING_WEAK_VTABLES
--   Performing Test COMPILER_SUPPORTS_WARNING_WEAK_VTABLES - Success
-- Configuring llvm-external-projects/mlir-iree-dialects
--   Adding LLVM external project mlir-iree-dialects -> /home/haifeng.han/iree/llvm-external-projects/iree-dialects
--   Building iree-dialects project at /home/haifeng.han/iree/llvm-external-projects/iree-dialects (into /home/haifeng.han/iree-build/llvm-external-projects/mlir-iree-dialects)
-- Configuring third_party/stablehlo
--   Adding LLVM external project stablehlo -> /home/haifeng.han/iree/third_party/stablehlo
--   Building StableHLO as an external LLVM project
--   Building with -fPIC
-- Failed to find LLVM FileCheck
-- git version: v1.8.3-24-g1e96bb0a normalized to 1.8.3.24
-- Google Benchmark version: 1.8.3.24
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- 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_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST
-- Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE - 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
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/home/haifeng.han/iree/third_party/benchmark/include
-- Compiling and running to test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- success
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Compiling and running to test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Compiling and running to test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Compiling and running to test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Compiling and running to test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Compiling and running to test HAVE_PTHREAD_AFFINITY
-- Performing Test HAVE_PTHREAD_AFFINITY -- success
-- SPIRV-Cross: Finding Git version for SPIRV-Cross.
-- SPIRV-Cross: Git hash: 7c335edc
-- Configuring IREE compiler plugins
-- Registering static linked compiler plugin 'input_stablehlo' (stablehlo-iree::registration)
-- Registering static linked compiler plugin 'input_torch' (torch-iree::registration)
-- Registering static linked compiler plugin 'input_tosa' (tosa-iree::registration)
-- Registering static linked compiler plugin 'hal_target_cuda' (iree::compiler::plugins::target::CUDA::CUDA)
-- Registering static linked compiler plugin 'hal_target_metal_spirv' (iree::compiler::plugins::target::MetalSPIRV::MetalSPIRV)
-- Registering static linked compiler plugin 'hal_target_rocm' (iree::compiler::plugins::target::ROCM::ROCM)
-- Downloading AMD Device bitcode from http://10.101.4.17:8080/iree/amdgpu-device-libs-llvm-6086c272a3a59eb0b6b79dcbe00486bf4461856a.tgz to /home/haifeng.han/iree-build/compiler/plugins/target/ROCM/_fetch_device_libs
-- Registering static linked compiler plugin 'hal_target_vmvx' (iree::compiler::plugins::target::VMVX::VMVX)
-- Registering static linked compiler plugin 'example' (iree::samples::compiler_plugins::example::registration)
-- Registering static linked compiler plugin 'simple_io_sample' (iree::samples::compiler_plugins::simple_io_sample::registration)
-- Configuring IREE runtime plugins
-- Runtime tracing disabled
-- Performing Test IREE_UK_BUILD_X86_64_AVX2_FMA
-- Performing Test IREE_UK_BUILD_X86_64_AVX2_FMA - Success
-- Performing Test IREE_UK_BUILD_X86_64_AVX512_BASE
-- Performing Test IREE_UK_BUILD_X86_64_AVX512_BASE - Success
-- Performing Test IREE_UK_BUILD_X86_64_AVX512_VNNI
-- Performing Test IREE_UK_BUILD_X86_64_AVX512_VNNI - Success
-- Performing Test IREE_UK_BUILD_X86_64_AVX512_BF16
-- Performing Test IREE_UK_BUILD_X86_64_AVX512_BF16 - Success
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - /usr/local/cuda/bin/nvcc
-- The CUDA compiler identification is NVIDIA 12.3.52
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- IREE custom_dispatch/vulkan/shaders ignored -- glslc not found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/haifeng.han/iree-build
[0/2] Re-checking globbed directories...
[863/7109] Building CXX object samples/emitc_modules/CMakeFiles/iree_samples_emitc_modules_add_module_test.dir/add_module_test.cc.o

FAILED: samples/emitc_modules/CMakeFiles/iree_samples_emitc_modules_import_module_test.dir/import_module_test.cc.o
ccache /usr/bin/clang++  -I/home/haifeng.han/iree-build/samples/emitc_modules -I/home/haifeng.han/iree/runtime/src -I/home/haifeng.han/iree-build/runtime/src -isystem /home/haifeng.han/iree -isystem /home/haifeng.han/iree-build -isystem /home/haifeng.han/iree/third_party/googletest/googlemock/include -isystem /home/haifeng.han/iree/third_party/googletest/googlemock -isystem /home/haifeng.han/iree/third_party/googletest/googletest/include -isystem /home/haifeng.han/iree/third_party/googletest/googletest -O2 -g   -gsplit-dwarf -ggnu-pubnames -fPIE -fvisibility=hidden -fno-rtti -fno-exceptions -Werror -Wall -Wno-error=deprecated-declarations -Wno-ambiguous-member-template -Wno-char-subscripts -Wno-extern-c-compat -Wno-gnu-alignof-expression -Wno-gnu-variable-sized-type-not-at-end -Wno-ignored-optimization-argument -Wno-invalid-offsetof -Wno-invalid-source-encoding -Wno-mismatched-tags -Wno-pointer-sign -Wno-reserved-user-defined-literal -Wno-return-type-c-linkage -Wno-self-assign-overloaded -Wno-sign-compare -Wno-signed-unsigned-wchar -Wno-strict-overflow -Wno-trigraphs -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-unused-command-line-argument -Wno-unused-const-variable -Wno-unused-function -Wno-unused-local-typedef -Wno-unused-private-field -Wno-user-defined-warnings -Wno-missing-braces -Wc++20-extensions -Wctad-maybe-unsupported -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wformat-security -Wgnu-redeclared-enum -Wimplicit-fallthrough -Winfinite-recursion -Wliteral-conversion -Wnon-virtual-dtor -Woverloaded-virtual -Wpointer-arith -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety -Wthread-safety-beta -Wunused-comparison -Wvla -fno-lax-vector-conversions -fno-omit-frame-pointer -fmacro-prefix-map=/home/haifeng.han/iree=iree -std=gnu++17 -MD -MT samples/emitc_modules/CMakeFiles/iree_samples_emitc_modules_import_module_test.dir/import_module_test.cc.o -MF samples/emitc_modules/CMakeFiles/iree_samples_emitc_modules_import_module_test.dir/import_module_test.cc.o.d -o samples/emitc_modules/CMakeFiles/iree_samples_emitc_modules_import_module_test.dir/import_module_test.cc.o -c /home/haifeng.han/iree/samples/emitc_modules/import_module_test.cc
/home/haifeng.han/iree/samples/emitc_modules/import_module_test.cc:11:10: fatal error: 'samples/emitc_modules/import_module_a.h' file not found
#include "samples/emitc_modules/import_module_a.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

........
.......

FAILED: runtime/src/iree/vm/test/emitc/CMakeFiles/iree_vm_test_emitc_module_test.dir/module_test.cc.o
ccache /usr/bin/clang++  -I/home/haifeng.han/iree/runtime/src -I/home/haifeng.han/iree-build/runtime/src -I/home/haifeng.han/iree-build/runtime/src/iree/vm/test/emitc -isystem /home/haifeng.han/iree -isystem /home/haifeng.han/iree-build -isystem /home/haifeng.han/iree/third_party/googletest/googlemock/include -isystem /home/haifeng.han/iree/third_party/googletest/googlemock -isystem /home/haifeng.han/iree/third_party/googletest/googletest/include -isystem /home/haifeng.han/iree/third_party/googletest/googletest -O2 -g   -gsplit-dwarf -ggnu-pubnames -fPIE -fvisibility=hidden -fno-rtti -fno-exceptions -Werror -Wall -Wno-error=deprecated-declarations -Wno-ambiguous-member-template -Wno-char-subscripts -Wno-extern-c-compat -Wno-gnu-alignof-expression -Wno-gnu-variable-sized-type-not-at-end -Wno-ignored-optimization-argument -Wno-invalid-offsetof -Wno-invalid-source-encoding -Wno-mismatched-tags -Wno-pointer-sign -Wno-reserved-user-defined-literal -Wno-return-type-c-linkage -Wno-self-assign-overloaded -Wno-sign-compare -Wno-signed-unsigned-wchar -Wno-strict-overflow -Wno-trigraphs -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-unused-command-line-argument -Wno-unused-const-variable -Wno-unused-function -Wno-unused-local-typedef -Wno-unused-private-field -Wno-user-defined-warnings -Wno-missing-braces -Wc++20-extensions -Wctad-maybe-unsupported -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wformat-security -Wgnu-redeclared-enum -Wimplicit-fallthrough -Winfinite-recursion -Wliteral-conversion -Wnon-virtual-dtor -Woverloaded-virtual -Wpointer-arith -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety -Wthread-safety-beta -Wunused-comparison -Wvla -fno-lax-vector-conversions -fno-omit-frame-pointer -fmacro-prefix-map=/home/haifeng.han/iree=iree -std=gnu++17 -MD -MT runtime/src/iree/vm/test/emitc/CMakeFiles/iree_vm_test_emitc_module_test.dir/module_test.cc.o -MF runtime/src/iree/vm/test/emitc/CMakeFiles/iree_vm_test_emitc_module_test.dir/module_test.cc.o.d -o runtime/src/iree/vm/test/emitc/CMakeFiles/iree_vm_test_emitc_module_test.dir/module_test.cc.o -c /home/haifeng.han/iree/runtime/src/iree/vm/test/emitc/module_test.cc
/home/haifeng.han/iree/runtime/src/iree/vm/test/emitc/module_test.cc:18:10: fatal error: 'iree/vm/test/emitc/arithmetic_ops.h' file not found
#include "iree/vm/test/emitc/arithmetic_ops.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /home/haifeng.han/iree/runtime/src/iree/hal/drivers/vulkan/util/intrusive_list_unique_ptr_test.cc:9:
/home/haifeng.han/iree/runtime/src/iree/hal/drivers/vulkan/util/intrusive_list.h:210:19: warning: 'iterator<std::input_iterator_tag, int>' is deprecated [-Wdeprecated-declarations]
    : public std::iterator<std::input_iterator_tag, int> {
                  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_iterator_base_types.h:127:12: note: 'iterator<std::input_iterator_tag, int>' has been explicitly marked deprecated here
    struct _GLIBCXX17_DEPRECATED iterator
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/c++config.h:119:34: note: expanded from macro '_GLIBCXX17_DEPRECATED'
# define _GLIBCXX17_DEPRECATED [[__deprecated__]]
                                 ^
1 warning generated.
In file included from /home/haifeng.han/iree/runtime/src/iree/hal/drivers/vulkan/util/intrusive_list_test.cc:7:
/home/haifeng.han/iree/runtime/src/iree/hal/drivers/vulkan/util/intrusive_list.h:210:19: warning: 'iterator<std::input_iterator_tag, int>' is deprecated [-Wdeprecated-declarations]
    : public std::iterator<std::input_iterator_tag, int> {
                  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_iterator_base_types.h:127:12: note: 'iterator<std::input_iterator_tag, int>' has been explicitly marked deprecated here
    struct _GLIBCXX17_DEPRECATED iterator
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/c++config.h:119:34: note: expanded from macro '_GLIBCXX17_DEPRECATED'
# define _GLIBCXX17_DEPRECATED [[__deprecated__]]
                                 ^
1 warning generated.
ninja: build stopped: subcommand failed.
gglin001 commented 10 months ago

@haifenghan

~this error may comes from here~

https://github.com/openxla/iree/blob/863d302bf066996c9f953e348b0256998a33105e/build_tools/cmake/iree_c_module.cmake#L79

your name here haifeng.han contains .h, LOL


update: seems no problem here according to https://cmake.org/cmake/help/latest/command/string.html#replace

just ignore this comment

ScottTodd commented 10 months ago

Well, it wouldn't hurt to change that replace command to only replace the file extension 🤔 (regex $ to match end of input)

haifenghan commented 9 months ago

Hi @ScottTodd , can you reproduce this issue?

ScottTodd commented 9 months ago

Hi @ScottTodd , can you reproduce this issue?

Just tried on Windows with MSVC and had no issues building when the source or build directory contained the . character. Might be Linux/clang-specific.

haifenghan commented 9 months ago

We have tested "haifeng.han" and "jie.han" and they both have the same issue. However, "jie.luo" has no problem. Therefore, the "." character is not the main cause. Could you try the source directory containing the ".han"?

haifenghan commented 9 months ago

@ScottTodd

Hi @ScottTodd , can you reproduce this issue?

Just tried on Windows with MSVC and had no issues building when the source or build directory contained the . character. Might be Linux/clang-specific.

The issue comes from the configuration of CMake See here, and I don't believe it's a Linux/clang-specific issue. Could you try the source directory containing the "haifeng.han" or "jie.han" or similar strings?