Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[halide:x64-linux] build failure #19635

Closed
ghost opened this issue Aug 18, 2021 · 7 comments
Closed

[halide:x64-linux] build failure #19635

ghost opened this issue Aug 18, 2021 · 7 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@ghost
Copy link

ghost commented Aug 18, 2021

Host Environment

  • OS: Ubuntu 20.04
  • Compiler: GNU 10.3.0

To Reproduce
Steps to reproduce the behavior:
./vcpkg install halide-x64-linux --editable

Failure logs
-Cut and past the appropriate build messages from the console output.

1:

./vcpkg install halide:x64-linux --editable
Computing installation plan...
The following packages will be built and installed:
    halide[core,jit,target-x86]:x64-linux -> 12.0.1#1
Starting package 1/1: halide:x64-linux
Building package halide[core,jit,target-x86]:x64-linux...
-- Note: halide only supports dynamic library linkage. Building dynamic library.
-- Downloading https://github.com/halide/Halide/archive/5dabcaa9effca1067f907f6c8ea212f3d2b1d99a.tar.gz -> halide-Halide-5dabcaa9effca1067f907f6c8ea212f3d2b1d99a.tar.gz...
-- Using source at /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/buildtrees/halide/src/f3d2b1d99a-64a65304e8
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/downloads/tools/cmake-3.21.1-linux/cmake-3.21.1-linux-x86_64/bin/cmake /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/buildtrees/halide/src/f3d2b1d99a-64a65304e8 -DTARGET_AARCH64=OFF -DTARGET_AMDGPU=OFF -DTARGET_ARM=OFF -DTARGET_D3D12COMPUTE=OFF -DTARGET_HEXAGON=OFF -DTARGET_METAL=OFF -DTARGET_MIPS=OFF -DTARGET_NVPTX=OFF -DTARGET_OPENCL=OFF -DTARGET_POWERPC=OFF -DTARGET_RISCV=OFF -DTARGET_X86=ON -DWITH_DOCS=NO -DWITH_PYTHON_BINDINGS=NO -DWITH_TESTS=NO -DWITH_TUTORIALS=NO -DWITH_UTILS=NO -DCMAKE_INSTALL_LIBDIR=bin -DCMAKE_INSTALL_DATADIR=share/halide -DHalide_INSTALL_CMAKEDIR=share/halide -DHalide_INSTALL_HELPERSDIR=share/HalideHelpers -DHalide_INSTALL_PLUGINDIR=bin -DCMAKE_MAKE_PROGRAM=/media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/downloads/tools/ninja-1.10.2-linux/ninja -DCMAKE_SYSTEM_NAME=Linux -DBUILD_SHARED_LIBS=ON -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/scripts/toolchains/linux.cmake -DVCPKG_TARGET_TRIPLET=x64-linux -DVCPKG_SET_CHARSET_FLAG=ON -DVCPKG_PLATFORM_TOOLSET=external -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_APPLOCAL_DEPS=OFF -DCMAKE_TOOLCHAIN_FILE=/media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON -DVCPKG_CXX_FLAGS= -DVCPKG_CXX_FLAGS_RELEASE= -DVCPKG_CXX_FLAGS_DEBUG= -DVCPKG_C_FLAGS= -DVCPKG_C_FLAGS_RELEASE= -DVCPKG_C_FLAGS_DEBUG= -DVCPKG_CRT_LINKAGE=dynamic -DVCPKG_LINKER_FLAGS= -DVCPKG_LINKER_FLAGS_RELEASE= -DVCPKG_LINKER_FLAGS_DEBUG= -DVCPKG_TARGET_ARCHITECTURE=x64 -DCMAKE_INSTALL_LIBDIR:STRING=lib -DCMAKE_INSTALL_BINDIR:STRING=bin -D_VCPKG_ROOT_DIR=/media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg -D_VCPKG_INSTALLED_DIR=/media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/installed -DVCPKG_MANIFEST_INSTALL=OFF -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/packages/halide_x64-linux
    Working Directory: /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/buildtrees/halide/x64-linux-rel
    Error code: 1
    See logs for more information:
      /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/buildtrees/halide/config-x64-linux-rel-out.log
      /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/buildtrees/halide/config-x64-linux-rel-err.log

Call Stack (most recent call first):
  installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:429 (vcpkg_execute_required_process)
  ports/halide/portfile.cmake:28 (vcpkg_cmake_configure)
  scripts/ports.cmake:140 (include)


Error: Building package halide:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `./vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: halide:x64-linux
  Vcpkg version: 2021-08-12-unknownhash

Additionally, attach any relevant sections from the log files above.

-Please attach any additional failure logs mentioned in the console output.

2:

cat ./vcpkg/buildtrees/halide/config-x64-linux-rel-out.log
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Halide 'host' platform triple:   x86-64-linux
-- Halide 'cmake' platform triple:  x86-64-linux
-- Halide default AOT target:       host
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found ZLIB: optimized;/media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/installed/x64-linux/lib/libz.a;debug;/media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/installed/x64-linux/debug/lib/libz.a (found version "1.2.11") 
-- Found LLVM 12.0.0
-- Using LLVMConfig.cmake in: /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/installed/x64-linux/debug/LLVM-12.0.0-Linux/share/llvm
-- Using ClangConfig.cmake in: /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/installed/x64-linux/debug/LLVM-12.0.0-Linux/share/clang
-- Disabling AArch64 backend
-- Disabling AMDGPU backend
-- Disabling ARM backend
-- Disabling Hexagon backend
-- Disabling Mips backend
-- Disabling NVPTX backend
-- Disabling PowerPC backend
-- Disabling RISCV backend
-- Disabling WebAssembly backend
-- Enabling X86 backend
-- Compiling Halide WITH RTTI.
-- Compiling Halide WITH exceptions.
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80") 
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.37") 
-- Performing Test LINKER_HAS_FLAG_VERSION_SCRIPT
-- Performing Test LINKER_HAS_FLAG_VERSION_SCRIPT - Success
-- Building autoschedulers enabled
-- Building tests disabled
-- Building Python bindings disabled
-- Building tutorials disabled
-- Building docs disabled
-- Building utils disabled
-- Configuring done
-- Generating done

3:

cat /media/teckern/1TBHDD/Projekte/Werkstatt/vcpkg/buildtrees/halide/config-x64-linux-rel-err.log
CMake Error in dependencies/llvm/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "clang" configuration
  "Release".


CMake Warning:
  Manually-specified variables were not used by the project:

    VCPKG_PLATFORM_TOOLSET
    VCPKG_SET_CHARSET_FLAG
    _VCPKG_ROOT_DIR


CMake Generate step failed.  Build files cannot be regenerated correctly.

Additional context
Add any other context about the problem here, such as what you have already tried to resolve the issue.
I tried to install without --editable , then pulled, updated, upgraded and bootstrapped vcpkg.
The I tried with --editable and the same error occured again.

@JackBoosY JackBoosY added the requires:repro The issue is not currently repro-able label Aug 19, 2021
@yurybura
Copy link
Contributor

Could you re-install llvm? Maybe only Debug configuration was installed.

./vcpkg remove llvm:x64-linux --recurse
./vcpkg install halide:x64-linux

@ghost
Copy link
Author

ghost commented Aug 23, 2021

Could you re-install llvm? Maybe only Debug configuration was installed.

./vcpkg remove llvm:x64-linux --recurse
./vcpkg install halide:x64-linux

I just tried that, but the same error occured again.

@yurybura
Copy link
Contributor

I've just tested on my WSL2 Ubuntu 20.04, GCC 9.3:

/mnt/d/libs/vcpkg$ ./vcpkg install halide:x64-linux
Computing installation plan...
The following packages will be built and installed:
    halide[core,jit,target-x86]:x64-linux -> 12.0.1#1
  * llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-linux -> 12.0.0#1
  * vcpkg-cmake[core]:x64-linux -> 2021-07-30
  * vcpkg-cmake-config[core]:x64-linux -> 2021-05-22#1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-linux...
Could not locate cached archive: /home/yurybura/.cache/vcpkg/archives/d3/d355ab0b29f0af9e9da3c5517eac2c35ebe2b70fb1df39c2b7ff4e4bf5e3ba84.zip
Could not locate cached archive: /home/yurybura/.cache/vcpkg/archives/0d/0da46d47007bdbeea45257348c48d2e8e7e55fd1eb3b4d4a0e4f5a2000e67371.zip
Could not locate cached archive: /home/yurybura/.cache/vcpkg/archives/59/59479880406791ab6ce164d6a144749e9836473e79f20f4f5a73a0d7691cca09.zip
Could not locate cached archive: /home/yurybura/.cache/vcpkg/archives/7d/7de0455fc3a079e090caa64665818d15e995cab99de9439a118bb051acf4569d.zip
Starting package 1/4: llvm:x64-linux
Building package llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-linux...
-- Downloading https://github.com/llvm/llvm-project/archive/llvmorg-12.0.0.tar.gz -> llvm-llvm-project-llvmorg-12.0.0.tar.gz...
-- Extracting source /mnt/d/libs/vcpkg/downloads/llvm-llvm-project-llvmorg-12.0.0.tar.gz
-- Applying patch 0002-fix-install-paths.patch
-- Applying patch 0003-fix-openmp-debug.patch
-- Applying patch 0004-fix-dr-1734.patch
-- Applying patch 0005-fix-tools-path.patch
-- Applying patch 0007-fix-compiler-rt-install-path.patch
-- Applying patch 0008-fix-libcxx-install.patch
-- Applying patch 0009-fix-tools-install-path.patch
-- Applying patch 0010-fix-libffi.patch
-- Applying patch 0011-fix-libxml2.patch
-- Using source at /mnt/d/libs/vcpkg/buildtrees/llvm/src/org-12.0.0-511e760473.clean
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- Installing: /mnt/d/libs/vcpkg/packages/llvm_x64-linux/share/llvm/copyright
-- Installing: /mnt/d/libs/vcpkg/packages/llvm_x64-linux/share/llvm/usage
-- Installing: /mnt/d/libs/vcpkg/packages/llvm_x64-linux/share/clang/copyright
-- Installing: /mnt/d/libs/vcpkg/packages/llvm_x64-linux/share/clang/usage
-- Installing: /mnt/d/libs/vcpkg/packages/llvm_x64-linux/share/lld/copyright
-- Installing: /mnt/d/libs/vcpkg/packages/llvm_x64-linux/share/lld/usage
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /home/yurybura/.cache/vcpkg/archives/d3/d355ab0b29f0af9e9da3c5517eac2c35ebe2b70fb1df39c2b7ff4e4bf5e3ba84.zip
Building package llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-linux... done
Installing package llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-linux...
Installing package llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-linux... done
Elapsed time for package llvm:x64-linux: 8.983 h
Starting package 2/4: vcpkg-cmake:x64-linux
Building package vcpkg-cmake[core]:x64-linux...
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg_cmake_configure.cmake
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg_cmake_get_vars.cmake
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/cmake_get_vars
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/cmake_get_vars/CMakeLists.txt
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg-port-config.cmake
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /home/yurybura/.cache/vcpkg/archives/0d/0da46d47007bdbeea45257348c48d2e8e7e55fd1eb3b4d4a0e4f5a2000e67371.zip
Building package vcpkg-cmake[core]:x64-linux... done
Installing package vcpkg-cmake[core]:x64-linux...
Installing package vcpkg-cmake[core]:x64-linux... done
Elapsed time for package vcpkg-cmake:x64-linux: 2.187 s
Starting package 3/4: vcpkg-cmake-config:x64-linux
Building package vcpkg-cmake-config[core]:x64-linux...
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake-config_x64-linux/share/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake-config_x64-linux/share/vcpkg-cmake-config/vcpkg-port-config.cmake
-- Installing: /mnt/d/libs/vcpkg/packages/vcpkg-cmake-config_x64-linux/share/vcpkg-cmake-config/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /home/yurybura/.cache/vcpkg/archives/59/59479880406791ab6ce164d6a144749e9836473e79f20f4f5a73a0d7691cca09.zip
Building package vcpkg-cmake-config[core]:x64-linux... done
Installing package vcpkg-cmake-config[core]:x64-linux...
Installing package vcpkg-cmake-config[core]:x64-linux... done
Elapsed time for package vcpkg-cmake-config:x64-linux: 1.546 s
Starting package 4/4: halide:x64-linux
Building package halide[core,jit,target-x86]:x64-linux...
-- Note: halide only supports dynamic library linkage. Building dynamic library.
-- Downloading https://github.com/halide/Halide/archive/5dabcaa9effca1067f907f6c8ea212f3d2b1d99a.tar.gz -> halide-Halide-5dabcaa9effca1067f907f6c8ea212f3d2b1d99a.tar.gz...
-- Extracting source /mnt/d/libs/vcpkg/downloads/halide-Halide-5dabcaa9effca1067f907f6c8ea212f3d2b1d99a.tar.gz
-- Using source at /mnt/d/libs/vcpkg/buildtrees/halide/src/f3d2b1d99a-64a65304e8.clean
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /home/yurybura/.cache/vcpkg/archives/7d/7de0455fc3a079e090caa64665818d15e995cab99de9439a118bb051acf4569d.zip
Building package halide[core,jit,target-x86]:x64-linux... done
Installing package halide[core,jit,target-x86]:x64-linux...
Installing package halide[core,jit,target-x86]:x64-linux... done
Elapsed time for package halide:x64-linux: 29.32 min

Total elapsed time: 9.476 h

The package halide provides CMake targets:

    find_package(Halide REQUIRED)

    # JIT mode:
    target_link_libraries(main PRIVATE Halide::Halide)

    # AOT mode:
    target_link_libraries(gen PRIVATE Halide::Generator)
    add_halide_library(filter FROM gen)
    target_link_libraries(main PRIVATE filter)

For more information see:
    https://github.com/halide/Halide/blob/v12.0.1/README_cmake.md

Dear @gebdadendo, could you provide all logs related to your failure?

@JackBoosY
Copy link
Contributor

cc @alexreinking.

@ghost
Copy link
Author

ghost commented Aug 27, 2021

I removed the vcpkg folder and installed everything from start. That solved the installation problem.

After I installed Halide that way, in my project, cmake find_package still failed:
The autoscheduler libraries were expected to be in the vcpkg/installed/x64-linux/tools/halide folder, which they weren't.
So I had to copy them by hand from the vcpkg/installed/x64-linux/lib folder to the expected place. But that's a different issue I guess.

Now everything works fine for me - Thanks a lot for your help!

@ghost ghost closed this as completed Aug 27, 2021
@alexreinking
Copy link
Contributor

alexreinking commented Aug 27, 2021

After I installed Halide that way, in my project, cmake find_package still failed:
The autoscheduler libraries were expected to be in the vcpkg/installed/x64-linux/tools/halide folder, which they weren't.
So I had to copy them by hand from the vcpkg/installed/x64-linux/lib folder to the expected place. But that's a different issue I guess.

@gebdadendo -- Please @ me in that issue as it's my responsibility to fix

@JackBoosY
Copy link
Contributor

@gebdadendo It seems like halide was fixed once or more on master branch, can you please open a new issue about the second issue?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

3 participants