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

make -j error while building from source #1325

Closed
Coll1ns-cult opened this issue Feb 6, 2025 · 9 comments
Closed

make -j error while building from source #1325

Coll1ns-cult opened this issue Feb 6, 2025 · 9 comments

Comments

@Coll1ns-cult
Copy link

Coll1ns-cult commented Feb 6, 2025

Hello when I try to build the debug version, I encountered errors.
Docker Environment:
OS : ubuntu 22.04
cuda: 12.1
torch: 2.5.0cu121
Logs:
cmake -DCMAKE_BUILD_TYPE=Debug .. log

-- CMAKE_VERSION: 3.22.1
-- Enabled languages: CXX;CUDA
-- The CXX compiler identification is GNU 11.4.0
-- The CUDA compiler identification is NVIDIA 12.1.105
-- 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
-- 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
-- K2_OS: 
-- Found Git: /usr/bin/git (found version "2.34.1") 
-- C++ Standard version: 14
-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - found
-- Looking for C++ include execinfo.h
-- Looking for C++ include execinfo.h - found
-- Performing Test K2_COMPILER_SUPPORTS_CXX14
-- Performing Test K2_COMPILER_SUPPORTS_CXX14 - Success
-- Autodetected CUDA architecture(s):  7.5 7.5 7.5 7.5
-- K2_COMPUTE_ARCH_FLAGS: -gencode;arch=compute_75,code=sm_75
-- K2_COMPUTE_ARCH_CANDIDATES 50;60;61;70;75;80;86;90
-- Skipping arch 50
-- Skipping arch 60
-- Skipping arch 61
-- Skipping arch 70
-- Adding arch 75
-- Skipping arch 80
-- Skipping arch 86
-- Skipping arch 90
-- K2_COMPUTE_ARCHS: 75
-- Could NOT find Valgrind (missing: Valgrind_INCLUDE_DIR Valgrind_EXECUTABLE) 
-- Downloading pybind11 from https://github.com/pybind/pybind11/archive/5bc0943ed96836f46489f53961f6c438d2935357.zip
-- pybind11 is downloaded to /home/k2/build_debug/_deps/pybind11-src
-- pybind11 v2.11.0 dev1
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.10.12", minimum required is "3.6") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Python executable: /usr/bin/python3
-- Found CUDA: /usr/local/cuda (found version "12.1") 
-- Found CUDAToolkit: /usr/local/cuda/include (found version "12.1.105") 
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Caffe2: CUDA detected: 12.1
-- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda
-- Caffe2: Header version is: 12.1
-- Found Python: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter 
CMake Warning at /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Caffe2/public/cuda.cmake:140 (message):
  Failed to compute shorthash for libnvrtc.so
Call Stack (most recent call first):
  /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:86 (include)
  /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  cmake/torch.cmake:15 (find_package)
  CMakeLists.txt:309 (include)


CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (nvtx3) does
  not match the name of the calling package (Caffe2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Caffe2/public/cuda.cmake:174 (find_package_handle_standard_args)
  /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:86 (include)
  /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  cmake/torch.cmake:15 (find_package)
  CMakeLists.txt:309 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find nvtx3 (missing: nvtx3_dir) 
CMake Warning at /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Caffe2/public/cuda.cmake:180 (message):
  Cannot find NVTX3, find old NVTX instead
Call Stack (most recent call first):
  /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:86 (include)
  /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  cmake/torch.cmake:15 (find_package)
  CMakeLists.txt:309 (include)


-- USE_CUDNN is set to 0. Compiling without cuDNN support
-- USE_CUSPARSELT is set to 0. Compiling without cuSPARSELt support
-- USE_CUDSS is set to 0. Compiling without cuDSS support
-- USE_CUFILE is set to 0. Compiling without cuFile support
-- Autodetected CUDA architecture(s):  7.5 7.5 7.5 7.5
-- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75
CMake Warning at /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /usr/local/lib/python3.10/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake:120 (append_torchlib_if_found)
  cmake/torch.cmake:15 (find_package)
  CMakeLists.txt:309 (include)


-- Found Torch: /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch.so  
CMake Warning at cmake/torch.cmake:37 (message):
   CMAKE_CUDA_FLAGS is --compiler-options -rdynamic --compiler-options -lineinfo -Wno-deprecated-gpu-targets -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w --expt-extended-lambda -gencode arch=compute_75,code=sm_75 -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_75,code=sm_75 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -D_GLIBCXX_USE_CXX11_ABI=0
Call Stack (most recent call first):
  CMakeLists.txt:309 (include)


-- K2_TORCH_VERSION: 2.5
-- PyTorch version: 2.5.0+cu121
-- PyTorch cuda version: 12.1
-- Generated /home/k2/build_debug/torch_version.py
-- Downloading moderngpu from https://github.com/moderngpu/moderngpu/archive/8ec9ac0de8672de7217d014917eedec5317f75f3.zip
-- moderngpu is downloaded to /home/k2/build_debug/_deps/moderngpu-src
-- Downloading googletest from https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz
-- googletest is downloaded to /home/k2/build_debug/_deps/googletest-src
-- googletest's binary dir is /home/k2/build_debug/_deps/googletest-build
-- The C compiler identification is GNU 11.4.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
-- CMAKE_CUDA_FLAGS: --compiler-options -rdynamic --compiler-options -lineinfo -Wno-deprecated-gpu-targets -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w --expt-extended-lambda -gencode arch=compute_75,code=sm_75 -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_75,code=sm_75 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options -Wall  --compiler-options -Wno-strict-overflow  --compiler-options -Wno-unknown-pragmas 
-- CMAKE_CXX_FLAGS:  -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable  -Wno-strict-overflow 
-- CMAKE_CUDA_FLAGS: --compiler-options -rdynamic --compiler-options -lineinfo -Wno-deprecated-gpu-targets -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w --expt-extended-lambda -gencode arch=compute_75,code=sm_75 -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_75,code=sm_75 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options -Wall  --compiler-options -Wno-strict-overflow  --compiler-options -Wno-unknown-pragmas 
-- Generated /home/k2/build_debug/k2/csrc/version.h
-- PYTHON_LIBRARY: /usr/lib/x86_64-linux-gnu/libpython3.10.so
-- Including k2/torch. K2_TORCH_VERSION is 2.5
-- Downloading kaldifeat from https://github.com/csukuangfj/kaldifeat/archive/refs/tags/v1.25.4.tar.gz
-- kaldifeat is downloaded to /home/k2/build_debug/_deps/kaldifeat-src
-- kaldifeat's binary dir is /home/k2/build_debug/_deps/kaldifeat-build
-- C++ Standard version: 14
-- BUILD_SHARED_LIBS ON
-- Python executable: /usr/bin/python3
CMake Warning at cmake/torch.cmake:37 (message):
   CMAKE_CUDA_FLAGS is --compiler-options -rdynamic --compiler-options -lineinfo -Wno-deprecated-gpu-targets -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w --expt-extended-lambda -gencode arch=compute_75,code=sm_75 -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_75,code=sm_75 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options -Wall --compiler-options -Wno-strict-overflow --compiler-options -Wno-unknown-pragmas -D_GLIBCXX_USE_CXX11_ABI=0
Call Stack (most recent call first):
  build_debug/_deps/kaldifeat-src/CMakeLists.txt:62 (include)


-- K2_TORCH_VERSION: 2.5
-- PyTorch version: 2.5.0+cu121
-- PyTorch cuda version: 12.1
-- CMAKE_CXX_FLAGS:  -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable  -Wno-strict-overflow  -D_GLIBCXX_USE_CXX11_ABI=0
-- CMAKE_INSTALL_PREFIX: /usr/local
-- All headers: /home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-common-inl.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-common.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-fbank.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-functions.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-mfcc.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-plp.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-spectrogram.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-window.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/log.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/matrix-functions.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/mel-computations.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/online-feature-itf.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/online-feature.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/pitch-functions.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/whisper-fbank.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/whisper-mel-bank.h;/home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/whisper-v3-mel-bank.h
-- Configuring done
-- Generating done
-- Build files have been written to: /home/k2/build_debug

make -j log:


make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:188: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/online-feature.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2211: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

thank you very much!

@csukuangfj
Copy link
Collaborator

please post all.logs

@Coll1ns-cult
Copy link
Author

Thank you for the fast response! Make log is too big (226 mb) though.

@csukuangfj
Copy link
Collaborator

I mean, the logs from your terminal.

@csukuangfj
Copy link
Collaborator

make -j log:

You only gave us 3 lines of the log! It is too little to be useful.

@Coll1ns-cult
Copy link
Author

terminal doesn't capture the full output, I flushed the stdin and stderr to a log file, and there are ~200,000 lines. I tried to find the errors that make shows by running.
grep -C 5 "^make.*Error" make_error.log
and the output is

      |                                                                                                  ^~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/_convolution_mode.h: In function 'at::Tensor at::symint::_convolution_mode(const at::Tensor&, const at::Tensor&, int)':
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/_convolution_mode.h:32:61: error: 'bias' was not declared in this scope
   32 |     return at::_ops::_convolution_mode::call(input, weight, bias, c10::fromIntArrayRefSlow(stride), padding, c10::fromIntArrayRefSlow(dilation), groups);
      |                                                             ^~~~
make[2]: *** [k2/csrc/CMakeFiles/context.dir/build.make:524: k2/csrc/CMakeFiles/context.dir/pytorch_context.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/_convolution.h:93:66: error: 'stride' was not declared in this scope
   93 |     return at::_ops::_convolution_out::call(input, weight, bias, stride, padding, dilation, transposed, output_padding, groups, benchmark, deterministic, cudnn_enabled, allow_tf32, out);
      |                                                                  ^~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/_conv_depthwise2d.h:87:87: error: 'padding' was not declared in this scope
--
   35 | inline ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &,at::Tensor &> _batch_norm_no_update_outf(const at::Tensor & input, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & bias, const ::std::optional<at::Tensor> & running_mean, const ::std::optional<at::Tensor> & running_var, double momentum, double eps, at::Tensor & out0, at::Tensor & out1, at::Tensor & out2, at::Tensor & out3) {
      |                                                                                                                                     ^~
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/_batch_norm_no_update.h:35:148: error: expected ',' or '...' before '<' token
   35 | inline ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &,at::Tensor &> _batch_norm_no_update_outf(const at::Tensor & input, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & bias, const ::std::optional<at::Tensor> & running_mean, const ::std::optional<at::Tensor> & running_var, double momentum, double eps, at::Tensor & out0, at::Tensor & out1, at::Tensor & out2, at::Tensor & out3) {
      |                                                                                                                                                    ^
make[2]: *** [k2/csrc/CMakeFiles/context.dir/build.make:482: k2/csrc/CMakeFiles/context.dir/torch_util.cu.o] Error 1
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/_convolution_double_backward.h:27:184: error: 'dilation' was not declared in this scope
   27 |     return at::_ops::_convolution_double_backward::call(ggI, ggW, ggb, gO, weight, self, c10::fromIntArrayRefSlow(stride), c10::fromIntArrayRefSlow(padding), c10::fromIntArrayRefSlow(dilation), transposed, c10::fromIntArrayRefSlow(output_padding), groups, output_mask);
      |                                                                                                                                                                                        ^~~~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/_convolution_double_backward.h:27:184: error: 'dilation' was not declared in this scope
   27 |     return at::_ops::_convolution_double_backward::call(ggI, ggW, ggb, gO, weight, self, c10::fromIntArrayRefSlow(stride), c10::fromIntArrayRefSlow(padding), c10::fromIntArrayRefSlow(dilation), transposed, c10::fromIntArrayRefSlow(output_padding), groups, output_mask);
--
   64 |   at::Tensor & slice_scatter_outf(const at::Tensor & self, const at::Tensor & src, int64_t dim, ::std::optional<int64_t> start, ::std::optional<int64_t> end, int64_t step, at::Tensor & out) {
      |                                                                                                        ^~~~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/slice_scatter.h:64:112: error: expected ',' or '...' before '<' token
   64 |   at::Tensor & slice_scatter_outf(const at::Tensor & self, const at::Tensor & src, int64_t dim, ::std::optional<int64_t> start, ::std::optional<int64_t> end, int64_t step, at::Tensor & out) {
      |                                                                                                                ^
make[1]: *** [CMakeFiles/Makefile2:643: k2/csrc/CMakeFiles/context.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/slow_conv_transpose2d.h: In function 'at::Tensor& at::slow_conv_transpose2d_symint_out(at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymIntArrayRef, int)':
/usr/local/lib/python3.10/dist-packages/torch/include/ATen/ops/slow_conv_transpose2d.h:49:81: error: 'bias' was not declared in this scope
   49 |     return at::_ops::slow_conv_transpose2d_out::call(self, weight, kernel_size, bias, stride, padding, output_padding, dilation, out);
      |                                                                                 ^~~~
--
  141 |     std::optional<at::Device> device = std::nullopt);
      |          ^~~~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/serialization/import.h:141:18: error: expected ',' or '...' before '<' token
  141 |     std::optional<at::Device> device = std::nullopt);
      |                  ^
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:90: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-functions.cc.o] Error 1
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/serialization/import.h:147:10: error: 'std::optional' has not been declared
  147 |     std::optional<at::Device> device);
      |          ^~~~~~~~
make[2]: *** Waiting for unfinished jobs....
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/serialization/import.h:147:18: error: expected ',' or '...' before '<' token
--
      |                                                                 ^
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/profiler/util.h:89:65: error: template argument 2 is invalid
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/nn/functional/pooling.h:923:36: error: 'output_size_' was not declared in this scope
  923 |   std::optional<ExpandingArray<3>> output_size_ = output_size;
      |                                    ^~~~~~~~~~~~
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:160: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/matrix-functions.cc.o] Error 1
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/api/object.h: In lambda function:
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/api/object.h:145:12: error: 'optional' is not a member of 'std'
  145 |       std::optional<Method> setter = std::nullopt;
      |            ^~~~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/api/object.h:145:12: note: 'std::optional' is only available from C++17 onwards
--
                 from /home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-plp.cc:7:
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/nn/options/upsampling.h: In member function 'torch::nn::functional::InterpolateFuncOptions& torch::nn::functional::InterpolateFuncOptions::size(int)':
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/nn/options/upsampling.h:68:3: error: 'struct torch::nn::functional::InterpolateFuncOptions' has no member named 'size_'; did you mean 'size'?
   68 |   TORCH_ARG(std::optional<std::vector<int64_t>>, size) = std::nullopt;
      |   ^~~~~~~~~
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:188: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/online-feature.cc.o] Error 1
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/optim/lbfgs.h: At global scope:
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/optim/lbfgs.h:48:3: error: 'optional' in namespace 'std' does not name a template type
   48 |   TORCH_ARG(std::optional<std::vector<Tensor>>, al) = std::nullopt;
      |   ^~~~~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/optim/lbfgs.h:48:3: note: 'std::optional' is only available from C++17 onwards
--
      |                        ~~~~~~~^~~~
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/SmallVector.h:1277:3: note: candidate: 'c10::SmallVector<T, N>::SmallVector() [with T = c10::intrusive_ptr<torch::jit::Tree>; unsigned int N = 4]'
 1277 |   SmallVector() : SmallVectorImpl<T>(N) {}
      |   ^~~~~~~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/SmallVector.h:1277:3: note:   candidate expects 0 arguments, 2 provided
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:146: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-window.cc.o] Error 1
In file included from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/ArrayRef.h:21,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/c10/core/MemoryFormat.h:3,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/TensorBody.h:13,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/Tensor.h:3,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/Tensor.h:3,
--
      |                        ~~~~~~~^~~~
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/SmallVector.h:1277:3: note: candidate: 'c10::SmallVector<T, N>::SmallVector() [with T = c10::intrusive_ptr<torch::jit::Tree>; unsigned int N = 4]'
 1277 |   SmallVector() : SmallVectorImpl<T>(N) {}
      |   ^~~~~~~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/SmallVector.h:1277:3: note:   candidate expects 0 arguments, 2 provided
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:132: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-spectrogram.cc.o] Error 1
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/SmallVector.h: In instantiation of 'c10::SmallVectorImpl<T>::~SmallVectorImpl() [with T = long int]':
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/SmallVector.h:1285:29:   required from 'c10::SmallVector<T, N>::SmallVector(size_t, const T&) [with T = long int; unsigned int N = 5; size_t = long unsigned int]'
/usr/local/lib/python3.10/dist-packages/torch/include/c10/core/SymIntArrayRef.h:56:34:   required from here
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/SmallVector.h:654:16: error: 'class c10::SmallVectorImpl<long int>' has no member named 'isSmall'
  654 |     if (!this->isSmall())
--
  654 |     if (!this->isSmall())
      |          ~~~~~~^~~~~~~
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/SmallVector.h:655:18: error: 'class c10::SmallVectorImpl<torch::autograd::InputMetadata>' has no member named 'begin'
  655 |       free(this->begin());
      |            ~~~~~~^~~~~
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:76: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-fbank.cc.o] Error 1
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/hash.h: In instantiation of 'size_t c10::hash<T>::operator()(const T&) const [with T = unsigned int; size_t = long unsigned int]':
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/hash.h:354:24:   required from 'size_t c10::_hash_detail::simple_get_hash(const T&) [with T = unsigned int; size_t = long unsigned int]'
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/hash.h:306:40:   required from 'size_t c10::hash<std::tuple<_Tps ...> >::tuple_hash<idx, Ts>::operator()(const std::tuple<_Args2 ...>&) const [with long unsigned int idx = 1; Ts = {const std::shared_ptr<torch::autograd::Node>&, const unsigned int&}; Types = {const std::shared_ptr<torch::autograd::Node>&, const unsigned int&}; size_t = long unsigned int]'
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/hash.h:319:56:   required from 'size_t c10::hash<std::tuple<_Tps ...> >::operator()(const std::tuple<_Tps ...>&) const [with Types = {const std::shared_ptr<torch::autograd::Node>&, const unsigned int&}; size_t = long unsigned int]'
/usr/local/lib/python3.10/dist-packages/torch/include/c10/util/hash.h:368:50:   required from 'size_t c10::get_hash(const Types& ...) [with Types = {std::shared_ptr<torch::autograd::Node>, unsigned int}; size_t = long unsigned int]'
--
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/frontend/tree_views.h:134:22: error: 'const struct torch::jit::ListIterator<torch::jit::Attribute>' has no member named 'it'
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/frontend/tree_views.h: In instantiation of 'bool torch::jit::ListIterator<T>::operator!=(const torch::jit::ListIterator<T>&) const [with T = torch::jit::WithItem]':
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/frontend/tree_views.h:167:5:   required from 'torch::jit::List<T>::List(const TreeRef&) [with T = torch::jit::WithItem; torch::jit::TreeRef = c10::intrusive_ptr<torch::jit::Tree>]'
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/frontend/tree_views.h:1104:37:   required from here
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/jit/frontend/tree_views.h:134:22: error: 'const struct torch::jit::ListIterator<torch::jit::WithItem>' has no member named 'it'
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:104: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-mfcc.cc.o] Error 1
In file included from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/ArrayRef.h:21,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/c10/core/MemoryFormat.h:3,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/c10/core/TensorImpl.h:10,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/c10/core/GeneratorImpl.h:8,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/Generator.h:18,
--
                 from /home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/mel-computations.h:10,
                 from /home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/mel-computations.cc:7:
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/nn/init.h:99:17: note:   initializing argument 3 of 'at::Tensor torch::nn::init::kaiming_uniform_(at::Tensor, double, int, int)'
   99 |     FanModeType mode = torch::kFanIn,
      |     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:174: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/mel-computations.cc.o] Error 1
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:202: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/whisper-fbank.cc.o] Error 1
In file included from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/Dict_inl.h:4,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/Dict.h:397,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/ivalue_inl.h:9,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/ivalue.h:1581,
                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/List_inl.h:4,
--
                 from /home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-plp.h:13,
                 from /home/k2/build_debug/_deps/kaldifeat-src/kaldifeat/csrc/feature-plp.cc:7:
/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/nn/init.h:99:17: note:   initializing argument 3 of 'at::Tensor torch::nn::init::kaiming_uniform_(at::Tensor, double, int, int)'
   99 |     FanModeType mode = torch::kFanIn,
      |     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
make[2]: *** [_deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/build.make:118: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/feature-plp.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2211: _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@csukuangfj
Copy link
Collaborator

please post all.logs

As said before, please post all ogs.

You can save them into a .txt file and upload it.

@csukuangfj
Copy link
Collaborator

Please delete the build directory before you try to get logs.

All logs here mean all output from your terminal, including the output for cmake and make.

@Coll1ns-cult
Copy link
Author

file was too large, so I uploaded to google drivehttps://drive.google.com/file/d/1PX33MnNyA8v9_ss-auTwt-u6ifcg14LP/view?usp=sharing
Thank you very much!

@Coll1ns-cult
Copy link
Author

Closing the issue, Problem was in C++ standard, for torch > 2, C++17 is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants