wuxxin / aur-packages

archlinux AUR packages i maintain
1 stars 0 forks source link

Cmake error when installing python-torchvision-rocm #10

Closed JulianWogersien closed 6 months ago

JulianWogersien commented 7 months ago

Heres the entire log:

yay -S python-torchvision-rocm               
AUR Explicit (1): python-torchvision-rocm-0.17.1-1
:: PKGBUILD up to date, skipping download: python-torchvision-rocm
  1 python-torchvision-rocm          (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
  1 python-torchvision-rocm          (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
==> Making package: python-torchvision-rocm 0.17.1-1 (Sat Apr  6 17:51:32 2024)
==> Retrieving sources...
  -> Found vision-0.17.1.tar.gz
  -> Found pytorch-vision-8096.patch
  -> Found pytorch-vision-8112.patch
  -> Found torchvision-0_17_1-fix-build.patch
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
    vision-0.17.1.tar.gz ... Passed
    pytorch-vision-8096.patch ... Skipped
    pytorch-vision-8112.patch ... Skipped
    torchvision-0_17_1-fix-build.patch ... Skipped
:: (1/1) Parsing SRCINFO: python-torchvision-rocm
==> Making package: python-torchvision-rocm 0.17.1-1 (Sat Apr  6 17:51:33 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found vision-0.17.1.tar.gz
  -> Found pytorch-vision-8096.patch
  -> Found pytorch-vision-8112.patch
  -> Found torchvision-0_17_1-fix-build.patch
==> Validating source files with sha256sums...
    vision-0.17.1.tar.gz ... Passed
    pytorch-vision-8096.patch ... Skipped
    pytorch-vision-8112.patch ... Skipped
    torchvision-0_17_1-fix-build.patch ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting vision-0.17.1.tar.gz with bsdtar
bsdtar: Failed to set default locale
==> Starting prepare()...
patching file torchvision/csrc/io/decoder/stream.cpp
patching file setup.py
==> Sources are ready.
==> Making package: python-torchvision-rocm 0.17.1-1 (Sat Apr  6 17:51:36 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
building for PYTORCH_ROCM_ARCH=gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- 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
-- Caffe2: Found gflags with new-style gflags target.
-- Caffe2: Found glog with new-style glog target.
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")
-- Caffe2: Found protobuf with new-style protobuf targets.
-- Caffe2: Protobuf version 25.3.0
Building PyTorch for GPU arch: gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "",
        LC_MONETARY = "en_DE.UTF-8",
        LC_MEASUREMENT = "en_DE.UTF-8",
        LC_TIME = "en_DE.UTF-8",
        LC_MESSAGES = "",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "",
        LC_MONETARY = "en_DE.UTF-8",
        LC_MEASUREMENT = "en_DE.UTF-8",
        LC_TIME = "en_DE.UTF-8",
        LC_MESSAGES = "",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "",
        LC_MONETARY = "en_DE.UTF-8",
        LC_MEASUREMENT = "en_DE.UTF-8",
        LC_TIME = "en_DE.UTF-8",
        LC_MESSAGES = "",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "",
        LC_MONETARY = "en_DE.UTF-8",
        LC_MEASUREMENT = "en_DE.UTF-8",
        LC_TIME = "en_DE.UTF-8",
        LC_MESSAGES = "",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "",
        LC_MONETARY = "en_DE.UTF-8",
        LC_MEASUREMENT = "en_DE.UTF-8",
        LC_TIME = "en_DE.UTF-8",
        LC_MESSAGES = "",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "",
        LC_MONETARY = "en_DE.UTF-8",
        LC_MEASUREMENT = "en_DE.UTF-8",
        LC_TIME = "en_DE.UTF-8",
        LC_MESSAGES = "",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
-- Could NOT find HIP: Found unsuitable version "0.0.0", but required is at least "1.0" (found /opt/rocm)
HIP VERSION: 0.0.0
CMake Warning at /usr/lib/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /usr/lib/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:24 (find_package)

-- Found Torch: /usr/lib/libtorch.so
-- Found PNG: /usr/lib/libpng.so (found version "1.6.43")
-- Found JPEG: /usr/lib/libjpeg.so (found version "80")
-- Configuring done (0.8s)
CMake Error at /usr/lib/cmake/Caffe2/Caffe2Targets.cmake:107 (set_target_properties):
  The link interface of target "torch_hip_library" contains:

    roc::hipblas

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /usr/lib/cmake/Caffe2/Caffe2Config.cmake:113 (include)
  /usr/lib/cmake/Torch/TorchConfig.cmake:68 (find_package)
  CMakeLists.txt:24 (find_package)

-- Generating done (0.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: python-torchvision-rocm-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-torchvision-rocm - exit status 4

rocm is installed in /opt/rocm and setting ROCM_HOME to that does not change the result The output of the issue template thing is

  Name:                    AMD Ryzen 5 3600 6-Core Processor  
  Marketing Name:          AMD Ryzen 5 3600 6-Core Processor  
  Vendor Name:             CPU                                
  Chip ID:                 0(0x0)                             
  BDFID:                   0                                  
  Internal Node ID:        0                                  
  Name:                    gfx1100                            
  Marketing Name:          AMD Radeon RX 7900 XTX             
  Vendor Name:             AMD                                
  Chip ID:                 29772(0x744c)                      
  BDFID:                   10240                              
  Internal Node ID:        1                                  
      Name:                    amdgcn-amd-amdhsa--gfx1100         
torch: 39901f229520a5256505ec24782f716ee7ddc843
rocm: 6.0.32831-

pytorch with rocm support is installed with python-pytorch-rocm

wuxxin commented 6 months ago

Could NOT find HIP: Found unsuitable version "0.0.0", but required is at least "1.0" (found /opt/rocm) HIP VERSION: 0.0.0

could be something with rocm, i updated the package to 17.2, it builds on my machine, you could try to build it again, ymmv

JulianWogersien commented 6 months ago

another package i installed had the same issue in that package i fixed it by editing the cmake which caused another error which then caused me to just use virtual envs instead of system wide installation so i hereby close this issue as its not needed anymore