csukuangfj / kaldifeat

Kaldi-compatible online & offline feature extraction with PyTorch, supporting CUDA, batch processing, chunk processing, and autograd - Provide C++ & Python API
https://csukuangfj.github.io/kaldifeat
Other
187 stars 35 forks source link

MacOS: `pip install kaldifeat` can't find MKL in a conda env (fix: set LDFLAGS) #10

Closed pzelasko closed 2 months ago

pzelasko commented 3 years ago

Issue: when running pip install kaldifeat, I'm getting the error that it can't find MKL libraries to link against.

    [ 50%] Linking CXX shared library ../../lib/libkaldifeat_core.dylib
    ld: library not found for -lmkl_intel_ilp64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[3]: *** [lib/libkaldifeat_core.dylib] Error 1
    make[2]: *** [kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/all] Error 2
    make[1]: *** [kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/rule] Error 2
    make: *** [_kaldifeat] Error 2

Solution: manually specify the linker argument in an env var.

# This works.
 LDFLAGS="-L/Users/pzelasko/miniconda3/envs/lhotse/lib" pip install kaldifeat

Perhaps this can be somehow fixed in CMake; but if that's too much hassle, I at least wanted to leave the solution here.

csukuangfj commented 3 years ago

Thanks, will look into it.

megazone87 commented 2 years ago

I encounter this problem on Windows too. And add the LDFLAGS works, but just to compile it. When I test it withpython3 -c "import kaldifeat; print(kaldifeat.__version__)". The MKL error still exists:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/meixu/mambaforge/envs/icefall/lib/python3.9/site-packages/kaldifeat/__init__.py", line 11, in <module>
    from _kaldifeat import (
ImportError: libmkl_intel_ilp64.so.2: cannot open shared object file: No such file or directory

I have to this to make it works. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/meixu/mambaforge/envs/icefall/lib

I think it may be due to lack of config that let cmakelist.txt find MKL of Conda.

csukuangfj commented 2 years ago

kaldifeat depends on PyTorch, which is using MKL.

kaldifeat does not use MKL directly, so there are no configurations for MKL in the CMakeLists.txt.

I think PyTorch does not configure MKL correctly.

csukuangfj commented 2 years ago

@songmeixu

What is the output of

readelf -d /home/meixu/mambaforge/envs/icefall/lib/python3.9/site-package/torch/_C.*.so

?

JaheimLee commented 2 years ago

I have the same problem in Ubuntu 20.04 using pip in my conda env. The log is:

Using pip 22.2.1 from /data/miniconda3/envs/k2/lib/python3.9/site-packages/pip (python 3.9)
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting kaldifeat
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/aa/9d/14a40b949c1f48d5ca1d25da2429f34f5f33193c3597d7680f1662160f98/kaldifeat-1.18.tar.gz (471 kB)
  Running command python setup.py egg_info
  running egg_info
  creating /tmp/pip-pip-egg-info-lmtm9s9y/kaldifeat.egg-info
  writing /tmp/pip-pip-egg-info-lmtm9s9y/kaldifeat.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-lmtm9s9y/kaldifeat.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-pip-egg-info-lmtm9s9y/kaldifeat.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-lmtm9s9y/kaldifeat.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-pip-egg-info-lmtm9s9y/kaldifeat.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files found matching 'pyproject.toml'
  adding license file 'LICENSE'
  writing manifest file '/tmp/pip-pip-egg-info-lmtm9s9y/kaldifeat.egg-info/SOURCES.txt'
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: kaldifeat
  Running command python setup.py bdist_wheel
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-39
  creating build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/plp.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/mfcc.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/offline_feature.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/__init__.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/spectrogram.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/fbank.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/online_feature.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  running build_ext
  Setting PYTHON_EXECUTABLE to /data/miniconda3/envs/k2/bin/python3.9
  For fast compilation, run:
  export KALDIFEAT_MAKE_ARGS="-j"; python setup.py install
  build command is:

                  cd build/temp.linux-x86_64-cpython-39

                  cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/data/miniconda3/envs/k2/bin/python3.9 -Dkaldifeat_BUILD_TESTS=OFF  -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/build/lib.linux-x86_64-cpython-39/kaldifeat  /tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398

                  make  _kaldifeat install

  -- The C compiler identification is GNU 7.5.0
  -- The CXX compiler identification is GNU 7.5.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
  -- C++ Standard version: 14
  -- Downloading pybind11
  -- pybind11 is downloaded to /tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/build/temp.linux-x86_64-cpython-39/_deps/pybind11-src
  -- pybind11 v2.9.2
  -- Found PythonInterp: /data/miniconda3/envs/k2/bin/python3.9 (found version "3.9.13")
  -- Found PythonLibs: /data/miniconda3/envs/k2/lib/libpython3.9.so
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- Python executable: /data/miniconda3/envs/k2/bin/python3.9
  -- TORCH_DIR: /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - found
  -- Found Threads: TRUE
  -- Found CUDA: /usr/local/cuda (found version "11.2")
  -- The CUDA compiler identification is NVIDIA 11.2.152
  -- 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
  -- Caffe2: CUDA detected: 11.2
  -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc
  -- Caffe2: CUDA toolkit directory: /usr/local/cuda
  -- Caffe2: Header version is: 11.2
  -- Found CUDNN: /usr/local/cuda/lib64/libcudnn.so
  -- Found cuDNN: v8.1.1  (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
  -- /usr/local/cuda/lib64/libnvrtc.so shorthash is 369df368
  -- Autodetected CUDA architecture(s):  8.6 8.6 8.6 8.6 8.6 8.6 8.6 8.6
  -- Added CUDA NVCC flags for: -gencode;arch=compute_86,code=sm_86
  -- MKL_ARCH: None, set to ` intel64` by default
  -- MKL_ROOT /data/miniconda3/envs/k2
  -- MKL_LINK: None, set to ` dynamic` by default
  -- MKL_INTERFACE_FULL: None, set to ` intel_ilp64` by default
  -- MKL_THREADING: None, set to ` intel_thread` by default
  -- MKL_MPI: None, set to ` intelmpi` by default
  CMake Warning at /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
    static library kineto_LIBRARY-NOTFOUND not found.
  Call Stack (most recent call first):
    /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
    cmake/torch.cmake:14 (find_package)
    CMakeLists.txt:55 (include)

  -- Found Torch: /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch.so
  -- PyTorch version: 1.11.0
  -- CMAKE_CXX_FLAGS:  -D_GLIBCXX_USE_CXX11_ABI=0
  -- CMAKE_INSTALL_PREFIX: /tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/build/lib.linux-x86_64-cpython-39/kaldifeat
  -- All headers: /tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/feature-common-inl.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/feature-common.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/feature-fbank.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/feature-functions.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/feature-mfcc.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/feature-plp.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/feature-spectrogram.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/feature-window.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/log.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/matrix-functions.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/mel-computations.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/online-feature-itf.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/online-feature.h;/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/kaldifeat/csrc/pitch-functions.h
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/build/temp.linux-x86_64-cpython-39
  [  5%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-fbank.cc.o
  [ 10%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-functions.cc.o
  [ 15%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-mfcc.cc.o
  [ 20%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-plp.cc.o
  [ 25%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-spectrogram.cc.o
  [ 30%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-window.cc.o
  [ 35%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/matrix-functions.cc.o
  [ 40%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/mel-computations.cc.o
  [ 45%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/online-feature.cc.o
  [ 50%] Linking CXX shared library ../../lib/libkaldifeat_core.so
  /usr/bin/ld: cannot find -lmkl_intel_ilp64
  /usr/bin/ld: cannot find -lmkl_core
  /usr/bin/ld: cannot find -lmkl_intel_thread
  collect2: error: ld returned 1 exit status
  kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:239: recipe for target 'lib/libkaldifeat_core.so' failed
  make[3]: *** [lib/libkaldifeat_core.so] Error 1
  CMakeFiles/Makefile2:163: recipe for target 'kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/all' failed
  make[2]: *** [kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/all] Error 2
  CMakeFiles/Makefile2:222: recipe for target 'kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/rule' failed
  make[1]: *** [kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/rule] Error 2
  Makefile:195: recipe for target '_kaldifeat' failed
  make: *** [_kaldifeat] Error 2
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/setup.py", line 32, in <module>
      setuptools.setup(
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
      self.run_command(cmd)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/build.py", line 24, in run
      super().run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
      self.build_extensions()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
      self._build_extensions_serial()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
      self.build_extension(ext)
    File "/tmp/pip-install-pw1_baer/kaldifeat_8c734324c5c8413cb33571905d852398/cmake/cmake_extension.py", line 122, in build_extension
      raise Exception(
  Exception:
  Build kaldifeat failed. Please check the error message.
  You can ask for help by creating an issue on GitHub.

And the output of readelf is:

Dynamic section at offset 0x2df0 contains 27 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libtorch_python.so]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN:$ORIGIN/lib:$ORIGIN/../../..]
 0x000000000000000c (INIT)               0x1000
 0x000000000000000d (FINI)               0x1138
 0x0000000000000019 (INIT_ARRAY)         0x3dd8
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x3de0
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x260
 0x0000000000000005 (STRTAB)             0x3c0
 0x0000000000000006 (SYMTAB)             0x2a0
 0x000000000000000a (STRSZ)              471 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x4000
 0x0000000000000002 (PLTRELSZ)           24 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x678
 0x0000000000000007 (RELA)               0x5d0
 0x0000000000000008 (RELASZ)             168 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x5b0
 0x000000006fffffff (VERNEEDNUM)         1
 0x000000006ffffff0 (VERSYM)             0x598
 0x000000006ffffff9 (RELACOUNT)          3
 0x0000000000000000 (NULL)               0x0
csukuangfj commented 2 years ago

Can you find the following files in your conda environment?

find /data/miniconda3/envs/k2 -name "libmkl_intel_ilp64*"
find /data/miniconda3/envs/k2 -name "libmkl_core*"
find /data/miniconda3/envs/k2 -name "libmkl_intel_thread*"

If yes, could you post the output ?

JaheimLee commented 2 years ago

By the way, I found a similar issue here. But I don't know how to manually set the link.

JaheimLee commented 2 years ago

find /data/miniconda3/envs/k2 -name "libmkl_intel_thread*"

The output is:

(k2) lijinghui@idc-op-dev-gpu-001:/data/lijinghui$ find /data/miniconda3/envs/k2 -name "libmkl_intel_ilp64*"
/data/miniconda3/envs/k2/lib/libmkl_intel_ilp64.so
/data/miniconda3/envs/k2/lib/libmkl_intel_ilp64.so.2
(k2) lijinghui@idc-op-dev-gpu-001:/data/lijinghui$ find /data/miniconda3/envs/k2 -name "libmkl_core*"
/data/miniconda3/envs/k2/lib/libmkl_core.so
/data/miniconda3/envs/k2/lib/libmkl_core.so.2
(k2) lijinghui@idc-op-dev-gpu-001:/data/lijinghui$ find /data/miniconda3/envs/k2 -name "libmkl_intel_thread*"
/data/miniconda3/envs/k2/lib/libmkl_intel_thread.so
/data/miniconda3/envs/k2/lib/libmkl_intel_thread.so.2
csukuangfj commented 2 years ago

Could you use

export LIBRARY_PATH=/data/miniconda3/envs/k2/lib:$LIBRARY_PATH

and run pip install --verbose kaldifeat again?

Caution: It is LIBRARY_PATH, not LD_LIBRARY_PATH.

csukuangfj commented 2 years ago

@JaheimLee Could you also show the output of

ldd /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/_C.*.so
JaheimLee commented 2 years ago

Could you use

export LIBRARY_PATH=/data/miniconda3/envs/k2/lib:$LIBRARY_PATH

and run pip install --verbose kaldifeat again?

Caution: It is LIBRARY_PATH, not LD_LIBRARY_PATH.

I met another error:

[ 54%] Linking CXX executable ../../bin/test_kaldifeat
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_bufferSize@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_createDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_analysis@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_destroyDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaGraphRetainUserObject@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_solve@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_createDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaUserObjectCreate@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaStreamUpdateCaptureDependencies@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaStreamGetCaptureInfo_v2@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_solve@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_destroyDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_analysis@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_bufferSize@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpMatSetAttribute@libcusparse.so.11'
  collect2: error: ld returned 1 exit status
  kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/build.make:110: recipe for target 'bin/test_kaldifeat' failed
  make[2]: *** [bin/test_kaldifeat] Error 1
  CMakeFiles/Makefile2:189: recipe for target 'kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/all' failed
  make[1]: *** [kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/all] Error 2
  Makefile:135: recipe for target 'all' failed
  make: *** [all] Error 2
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/setup.py", line 32, in <module>
      setuptools.setup(
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
      self.run_command(cmd)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
      return orig.install.run(self)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 698, in run
      self.run_command('build')
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/build.py", line 24, in run
      super().run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
      self.build_extensions()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
      self._build_extensions_serial()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
      self.build_extension(ext)
    File "/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/cmake/cmake_extension.py", line 122, in build_extension
      raise Exception(
  Exception:
  Build kaldifeat failed. Please check the error message.
  You can ask for help by creating an issue on GitHub.

And the output of ldd is:

        linux-vdso.so.1 (0x00007ffdfe581000)
        libtorch_python.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_python.so (0x00007fbbe1c3e000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbbe1a1f000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbbe162e000)
        libshm.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libshm.so (0x00007fbbe1427000)
        libtorch.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch.so (0x00007fbbe1225000)
        libtorch_cuda.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda.so (0x00007fbbe1011000)
        libtorch_cuda_cpp.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so (0x00007fbb9bc20000)
        libnvToolsExt.so.1 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libnvToolsExt.so.1 (0x00007fbb9ba16000)
        libtorch_cpu.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so (0x00007fbb90f48000)
        libc10_cuda.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libc10_cuda.so (0x00007fbb90cf8000)
        libcudart.so.11.0 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libcudart.so.11.0 (0x00007fbb90a5b000)
        libtorch_cuda_cu.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so (0x00007fbb5e679000)
        libc10.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libc10.so (0x00007fbb5e3ef000)
        libstdc++.so.6 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libstdc++.so.6 (0x00007fbbe29e9000)
        libgcc_s.so.1 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libgcc_s.so.1 (0x00007fbbe29d0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fbbe299b000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbb5e1e7000)
        libcusparse.so.11 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libcusparse.so.11 (0x00007fbb4fefb000)
        libcurand.so.10 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libcurand.so.10 (0x00007fbb4a76c000)
        libcusolver.so.11 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libcusolver.so.11 (0x00007fbb3d8a7000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbb3d6a3000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbb3d305000)
        libcufft.so.10 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libcufft.so.10 (0x00007fbb31b0a000)
        libcublas.so.11 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libcublas.so.11 (0x00007fbb2a4c7000)
        libgomp.so.1 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libgomp.so.1 (0x00007fbb2a3d0000)
        libmkl_intel_lp64.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libmkl_intel_lp64.so (0x00007fbb2951b000)
        libmkl_gnu_thread.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libmkl_gnu_thread.so (0x00007fbb27987000)
        libmkl_core.so => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libmkl_core.so (0x00007fbb235b1000)
        libcublasLt.so.11 => /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/../../../../libcublasLt.so.11 (0x00007fbb12ba1000)

My native cuda version is 11.2, but pytorch binding is cuda 11.3. Is that going to be a problem?

csukuangfj commented 2 years ago

Could you use pip install --verbose kaldifeat to get more verbose logs?

By the way, you can use conda install -c kaldifeat kaldifeat

csukuangfj commented 2 years ago

For the above link error, could you have a look at https://github.com/pytorch/pytorch/issues/33668

JaheimLee commented 2 years ago

Could you use pip install --verbose kaldifeat to get more verbose logs?

By the way, you can use conda install -c kaldifeat kaldifeat

Conda install works well. Here is all pip logs:

Using pip 22.2.1 from /data/miniconda3/envs/k2/lib/python3.9/site-packages/pip (python 3.9)
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting kaldifeat
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/aa/9d/14a40b949c1f48d5ca1d25da2429f34f5f33193c3597d7680f1662160f98/kaldifeat-1.18.tar.gz (471 kB)
  Running command python setup.py egg_info
  running egg_info
  creating /tmp/pip-pip-egg-info-sog1q0eo/kaldifeat.egg-info
  writing /tmp/pip-pip-egg-info-sog1q0eo/kaldifeat.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-sog1q0eo/kaldifeat.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-pip-egg-info-sog1q0eo/kaldifeat.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-sog1q0eo/kaldifeat.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-pip-egg-info-sog1q0eo/kaldifeat.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files found matching 'pyproject.toml'
  adding license file 'LICENSE'
  writing manifest file '/tmp/pip-pip-egg-info-sog1q0eo/kaldifeat.egg-info/SOURCES.txt'
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: kaldifeat
  Running command python setup.py bdist_wheel
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-39
  creating build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/plp.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/mfcc.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/offline_feature.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/__init__.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/spectrogram.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/fbank.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/online_feature.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  running build_ext
  Setting PYTHON_EXECUTABLE to /data/miniconda3/envs/k2/bin/python3.9
  For fast compilation, run:
  export KALDIFEAT_MAKE_ARGS="-j"; python setup.py install
  build command is:

                  cd build/temp.linux-x86_64-cpython-39

                  cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/data/miniconda3/envs/k2/bin/python3.9 -Dkaldifeat_BUILD_TESTS=OFF  -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/build/lib.linux-x86_64-cpython-39/kaldifeat  /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41

                  make  _kaldifeat install

  -- The C compiler identification is GNU 7.5.0
  -- The CXX compiler identification is GNU 7.5.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
  -- C++ Standard version: 14
  -- Downloading pybind11
  -- pybind11 is downloaded to /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/build/temp.linux-x86_64-cpython-39/_deps/pybind11-src
  -- pybind11 v2.9.2
  -- Found PythonInterp: /data/miniconda3/envs/k2/bin/python3.9 (found version "3.9.13")
  -- Found PythonLibs: /data/miniconda3/envs/k2/lib/libpython3.9.so
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- Python executable: /data/miniconda3/envs/k2/bin/python3.9
  -- TORCH_DIR: /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - found
  -- Found Threads: TRUE
  -- Found CUDA: /usr/local/cuda (found version "11.2")
  -- The CUDA compiler identification is NVIDIA 11.2.152
  -- 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
  -- Caffe2: CUDA detected: 11.2
  -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc
  -- Caffe2: CUDA toolkit directory: /usr/local/cuda
  -- Caffe2: Header version is: 11.2
  -- Found CUDNN: /usr/local/cuda/lib64/libcudnn.so
  -- Found cuDNN: v8.1.1  (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
  -- /usr/local/cuda/lib64/libnvrtc.so shorthash is 369df368
  -- Autodetected CUDA architecture(s):  8.6 8.6 8.6 8.6 8.6 8.6 8.6 8.6
  -- Added CUDA NVCC flags for: -gencode;arch=compute_86,code=sm_86
  -- MKL_ARCH: None, set to ` intel64` by default
  -- MKL_ROOT /data/miniconda3/envs/k2
  -- MKL_LINK: None, set to ` dynamic` by default
  -- MKL_INTERFACE_FULL: None, set to ` intel_ilp64` by default
  -- MKL_THREADING: None, set to ` intel_thread` by default
  -- MKL_MPI: None, set to ` intelmpi` by default
  CMake Warning at /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
    static library kineto_LIBRARY-NOTFOUND not found.
  Call Stack (most recent call first):
    /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
    cmake/torch.cmake:14 (find_package)
    CMakeLists.txt:55 (include)

  -- Found Torch: /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch.so
  -- PyTorch version: 1.11.0
  -- CMAKE_CXX_FLAGS:  -D_GLIBCXX_USE_CXX11_ABI=0
  -- CMAKE_INSTALL_PREFIX: /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/build/lib.linux-x86_64-cpython-39/kaldifeat
  -- All headers: /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-common-inl.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-common.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-fbank.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-functions.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-mfcc.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-plp.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-spectrogram.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-window.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/log.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/matrix-functions.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/mel-computations.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/online-feature-itf.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/online-feature.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/pitch-functions.h
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/build/temp.linux-x86_64-cpython-39
  [  5%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-fbank.cc.o
  [ 10%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-functions.cc.o
  [ 15%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-mfcc.cc.o
  [ 20%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-plp.cc.o
  [ 25%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-spectrogram.cc.o
  [ 30%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-window.cc.o
  [ 35%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/matrix-functions.cc.o
  [ 40%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/mel-computations.cc.o
  [ 45%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/online-feature.cc.o
  [ 50%] Linking CXX shared library ../../lib/libkaldifeat_core.so
  [ 50%] Built target kaldifeat_core
  [ 55%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-fbank.cc.o
  [ 60%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-mfcc.cc.o
  [ 65%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-plp.cc.o
  [ 70%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-spectrogram.cc.o
  [ 75%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-window.cc.o
  [ 80%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/kaldifeat.cc.o
  [ 85%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/mel-computations.cc.o
  [ 90%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/online-feature.cc.o
  [ 95%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/utils.cc.o
  [100%] Linking CXX shared module ../../../lib/_kaldifeat.cpython-39-x86_64-linux-gnu.so
  [100%] Built target _kaldifeat
  Consolidate compiler generated dependencies of target kaldifeat_core
  [ 45%] Built target kaldifeat_core
  [ 50%] Building CXX object kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/test_kaldifeat.cc.o
  [ 54%] Linking CXX executable ../../bin/test_kaldifeat
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_bufferSize@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_createDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_analysis@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_destroyDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaGraphRetainUserObject@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_solve@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_createDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaUserObjectCreate@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaStreamUpdateCaptureDependencies@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaStreamGetCaptureInfo_v2@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_solve@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_destroyDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_analysis@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_bufferSize@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpMatSetAttribute@libcusparse.so.11'
  collect2: error: ld returned 1 exit status
  kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/build.make:110: recipe for target 'bin/test_kaldifeat' failed
  make[2]: *** [bin/test_kaldifeat] Error 1
  CMakeFiles/Makefile2:189: recipe for target 'kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/all' failed
  make[1]: *** [kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/all] Error 2
  Makefile:135: recipe for target 'all' failed
  make: *** [all] Error 2
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/setup.py", line 32, in <module>
      setuptools.setup(
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
      self.run_command(cmd)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/build.py", line 24, in run
      super().run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
      self.build_extensions()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
      self._build_extensions_serial()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
      self.build_extension(ext)
    File "/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/cmake/cmake_extension.py", line 122, in build_extension
      raise Exception(
  Exception:
  Build kaldifeat failed. Please check the error message.
  You can ask for help by creating an issue on GitHub.

  Click:
        https://github.com/csukuangfj/kaldifeat/issues/new

  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /data/miniconda3/envs/k2/bin/python3.9 -u -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize

  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)

  __file__ = %r
  sys.argv[0] = __file__

  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"

  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /tmp/pip-wheel-in59raef
  cwd: /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/
  Building wheel for kaldifeat (setup.py) ... error
  ERROR: Failed building wheel for kaldifeat
  Running setup.py clean for kaldifeat
  Running command python setup.py clean
  running clean
  removing 'build/temp.linux-x86_64-cpython-39' (and everything under it)
  removing 'build/lib.linux-x86_64-cpython-39' (and everything under it)
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-3.9' does not exist -- can't clean it
  removing 'build'
Failed to build kaldifeat
Installing collected packages: kaldifeat
  Running command Running setup.py install for kaldifeat
  running install
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
    warnings.warn(
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-39
  creating build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/plp.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/mfcc.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/offline_feature.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/__init__.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/spectrogram.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/fbank.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/online_feature.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  copying kaldifeat/python/kaldifeat/torch_version.py -> build/lib.linux-x86_64-cpython-39/kaldifeat
  running build_ext
  Setting PYTHON_EXECUTABLE to /data/miniconda3/envs/k2/bin/python3.9
  For fast compilation, run:
  export KALDIFEAT_MAKE_ARGS="-j"; python setup.py install
  build command is:

                  cd build/temp.linux-x86_64-cpython-39

                  cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/data/miniconda3/envs/k2/bin/python3.9 -Dkaldifeat_BUILD_TESTS=OFF  -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/build/lib.linux-x86_64-cpython-39/kaldifeat  /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41

                  make  _kaldifeat install

  -- The C compiler identification is GNU 7.5.0
  -- The CXX compiler identification is GNU 7.5.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
  -- C++ Standard version: 14
  -- Downloading pybind11
  -- pybind11 is downloaded to /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/build/temp.linux-x86_64-cpython-39/_deps/pybind11-src
  -- pybind11 v2.9.2
  -- Found PythonInterp: /data/miniconda3/envs/k2/bin/python3.9 (found version "3.9.13")
  -- Found PythonLibs: /data/miniconda3/envs/k2/lib/libpython3.9.so
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- Python executable: /data/miniconda3/envs/k2/bin/python3.9
  -- TORCH_DIR: /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - found
  -- Found Threads: TRUE
  -- Found CUDA: /usr/local/cuda (found version "11.2")
  -- The CUDA compiler identification is NVIDIA 11.2.152
  -- 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
  -- Caffe2: CUDA detected: 11.2
  -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc
  -- Caffe2: CUDA toolkit directory: /usr/local/cuda
  -- Caffe2: Header version is: 11.2
  -- Found CUDNN: /usr/local/cuda/lib64/libcudnn.so
  -- Found cuDNN: v8.1.1  (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
  -- /usr/local/cuda/lib64/libnvrtc.so shorthash is 369df368
  -- Autodetected CUDA architecture(s):  8.6 8.6 8.6 8.6 8.6 8.6 8.6 8.6
  -- Added CUDA NVCC flags for: -gencode;arch=compute_86,code=sm_86
  -- MKL_ARCH: None, set to ` intel64` by default
  -- MKL_ROOT /data/miniconda3/envs/k2
  -- MKL_LINK: None, set to ` dynamic` by default
  -- MKL_INTERFACE_FULL: None, set to ` intel_ilp64` by default
  -- MKL_THREADING: None, set to ` intel_thread` by default
  -- MKL_MPI: None, set to ` intelmpi` by default
  CMake Warning at /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
    static library kineto_LIBRARY-NOTFOUND not found.
  Call Stack (most recent call first):
    /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
    cmake/torch.cmake:14 (find_package)
    CMakeLists.txt:55 (include)

  -- Found Torch: /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch.so
  -- PyTorch version: 1.11.0
  -- CMAKE_CXX_FLAGS:  -D_GLIBCXX_USE_CXX11_ABI=0
  -- CMAKE_INSTALL_PREFIX: /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/build/lib.linux-x86_64-cpython-39/kaldifeat
  -- All headers: /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-common-inl.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-common.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-fbank.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-functions.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-mfcc.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-plp.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-spectrogram.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/feature-window.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/log.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/matrix-functions.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/mel-computations.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/online-feature-itf.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/online-feature.h;/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/kaldifeat/csrc/pitch-functions.h
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/build/temp.linux-x86_64-cpython-39
  [  5%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-fbank.cc.o
  [ 10%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-functions.cc.o
  [ 15%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-mfcc.cc.o
  [ 20%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-plp.cc.o
  [ 25%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-spectrogram.cc.o
  [ 30%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-window.cc.o
  [ 35%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/matrix-functions.cc.o
  [ 40%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/mel-computations.cc.o
  [ 45%] Building CXX object kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/online-feature.cc.o
  [ 50%] Linking CXX shared library ../../lib/libkaldifeat_core.so
  [ 50%] Built target kaldifeat_core
  [ 55%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-fbank.cc.o
  [ 60%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-mfcc.cc.o
  [ 65%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-plp.cc.o
  [ 70%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-spectrogram.cc.o
  [ 75%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/feature-window.cc.o
  [ 80%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/kaldifeat.cc.o
  [ 85%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/mel-computations.cc.o
  [ 90%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/online-feature.cc.o
  [ 95%] Building CXX object kaldifeat/python/csrc/CMakeFiles/_kaldifeat.dir/utils.cc.o
  [100%] Linking CXX shared module ../../../lib/_kaldifeat.cpython-39-x86_64-linux-gnu.so
  [100%] Built target _kaldifeat
  Consolidate compiler generated dependencies of target kaldifeat_core
  [ 45%] Built target kaldifeat_core
  [ 50%] Building CXX object kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/test_kaldifeat.cc.o
  [ 54%] Linking CXX executable ../../bin/test_kaldifeat
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_bufferSize@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_createDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_analysis@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_destroyDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaGraphRetainUserObject@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_solve@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_createDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaUserObjectCreate@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaStreamUpdateCaptureDependencies@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaStreamGetCaptureInfo_v2@libcudart.so.11.0'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_solve@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_destroyDescr@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSV_analysis@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpSM_bufferSize@libcusparse.so.11'
  /data/miniconda3/envs/k2/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cu.so: undefined reference to `cusparseSpMatSetAttribute@libcusparse.so.11'
  collect2: error: ld returned 1 exit status
  kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/build.make:110: recipe for target 'bin/test_kaldifeat' failed
  make[2]: *** [bin/test_kaldifeat] Error 1
  CMakeFiles/Makefile2:189: recipe for target 'kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/all' failed
  make[1]: *** [kaldifeat/csrc/CMakeFiles/test_kaldifeat.dir/all] Error 2
  Makefile:135: recipe for target 'all' failed
  make: *** [all] Error 2
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/setup.py", line 32, in <module>
      setuptools.setup(
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
      self.run_command(cmd)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
      return orig.install.run(self)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 698, in run
      self.run_command('build')
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/build.py", line 24, in run
      super().run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
      self.build_extensions()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
      self._build_extensions_serial()
    File "/data/miniconda3/envs/k2/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
      self.build_extension(ext)
    File "/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/cmake/cmake_extension.py", line 122, in build_extension
      raise Exception(
  Exception:
  Build kaldifeat failed. Please check the error message.
  You can ask for help by creating an issue on GitHub.

  Click:
        https://github.com/csukuangfj/kaldifeat/issues/new

  error: subprocess-exited-with-error

  × Running setup.py install for kaldifeat did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /data/miniconda3/envs/k2/bin/python3.9 -u -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize

  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)

  __file__ = %r
  sys.argv[0] = __file__

  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"

  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' install --record /tmp/pip-record-xrvbx3eo/install-record.txt --single-version-externally-managed --compile --install-headers /data/miniconda3/envs/k2/include/python3.9/kaldifeat
  cwd: /tmp/pip-install-7w4r5jjq/kaldifeat_906724c9e488467184b1e3d389a1aa41/
  Running setup.py install for kaldifeat ... error
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> kaldifeat

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
csukuangfj commented 2 months ago

Please see https://csukuangfj.github.io/kaldifeat/installation/from_wheels.html