k2-fsa / sherpa

Speech-to-text server framework with next-gen Kaldi
https://k2-fsa.github.io/sherpa
Apache License 2.0
515 stars 103 forks source link

build error #392

Closed shanguanma closed 1 year ago

shanguanma commented 1 year ago
running build
running build_py
creating build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/nbest.py -> build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/timestamp.py -> build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/lexicon.py -> build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/decode.py -> build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/utils.py -> build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/http_server.py -> build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/torch_version.py -> build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/__init__.py -> build/lib.linux-x86_64-cpython-38/sherpa
copying sherpa/python/sherpa/online_endpoint.py -> build/lib.linux-x86_64-cpython-38/sherpa
running build_ext
Setting PYTHON_EXECUTABLE to /home/maduo/miniconda3/envs/k2-fsa/bin/python3
for fast compilation, run:
export SHERPA_MAKE_ARGS="-j"; python setup.py install
Setting make_args to "-j4"
build command is:

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

                cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/home/maduo/miniconda3/envs/k2-fsa/bin/python3 -DSHERPA_ENABLE_TESTS=OFF  -DCMAKE_INSTALL_PREFIX=/workspace2/maduo/k2-fsa/sherpa/build/lib.linux-x86_64-cpython-38/sherpa  /workspace2/maduo/k2-fsa/sherpa

                make -j4 install/strip

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.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
-- 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
-- CMAKE_BUILD_TYPE: Release
-- SHERPA_ENABLE_TESTS: OFF
-- SHERPA_ENABLE_PORTAUDIO: ON
-- SHERPA_ENABLE_WEBSOCKET: ON
-- 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
-- SHERPA_OS: Ubuntu 20.04.2 LTS
-- CMake version: 3.26.3
-- Found Git: /usr/bin/git (found version "2.25.1")
-- SHERPA_GIT_SHA1: d8934324774afd1066079d69935a9061260e7eda
-- SHERPA_GIT_DATE: Mon Jun 5 14:57:47 2023
-- SHERPA_GIT_BRANCH: master
CMake Warning (dev) at /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/FetchContent.cmake:1282 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  cmake/pybind11.cmake:27 (FetchContent_Declare)
  cmake/pybind11.cmake:43 (download_pybind11)
  CMakeLists.txt:135 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Downloading pybind11 from https://github.com/pybind/pybind11/archive/refs/tags/v2.10.2.tar.gz
-- pybind11 is downloaded to /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/pybind11-src
-- pybind11 v2.10.2
-- Found PythonInterp: /home/maduo/miniconda3/envs/k2-fsa/bin/python3 (found suitable version "3.8.16", minimum required is "3.6")
-- Found PythonLibs: /home/maduo/miniconda3/envs/k2-fsa/lib/libpython3.8.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
CMake Warning (dev) at /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/FetchContent.cmake:1282 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  cmake/json.cmake:27 (FetchContent_Declare)
  cmake/json.cmake:44 (download_json)
  CMakeLists.txt:136 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Downloading json from https://github.com/nlohmann/json/archive/refs/tags/v3.11.2.tar.gz
-- json is downloaded to /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/json-src
-- Python executable: /home/maduo/miniconda3/envs/k2-fsa/bin/python3
-- PYTHON_EXECUTABLE: /home/maduo/miniconda3/envs/k2-fsa/bin/python3
-- TORCH_DIR: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/torch
-- Found CUDA: /usr/local/cuda-11.7 (found version "11.7")
-- The CUDA compiler identification is NVIDIA 11.7.64
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda-11.7/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Caffe2: CUDA detected: 11.7
-- Caffe2: CUDA nvcc is: /usr/local/cuda-11.7/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda-11.7
-- Caffe2: Header version is: 11.7
-- /usr/local/cuda-11.7/lib64/libnvrtc.so shorthash is d833c4f3
-- USE_CUDNN is set to 0. Compiling without cuDNN support
-- 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
CMake Warning at /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  cmake/torch.cmake:14 (find_package)
  CMakeLists.txt:141 (include)

-- Found Torch: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/torch/lib/libtorch.so
-- TORCH_LIBRARIES: torch;torch_library;/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/torch/lib/libc10.so;/usr/lib/x86_64-linux-gnu/libcuda.so;/usr/local/cuda-11.7/lib64/libnvrtc.so;/usr/local/cuda-11.7/lib64/libnvToolsExt.so;/usr/local/cuda-11.7/lib64/libcudart.so;/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/torch/lib/libc10_cuda.so
-- PyTorch version: 2.0.0+cu117
CMake Warning (dev) at cmake/k2.cmake:38:
  Syntax Warning in cmake code at column 52

  Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
  CMakeLists.txt:142 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Python executable: /home/maduo/miniconda3/envs/k2-fsa/bin/python3
-- K2_CMAKE_PREFIX_PATH: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/k2/share/cmake
-- Found k2: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/k2/lib/libk2_torch_api.so (Required is at least version "1.23.2")
-- K2_FOUND: TRUE
-- K2_INCLUDE_DIRS: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/k2/include
-- K2_LIBRARIES: k2_torch_api;k2_torch;k2_log;k2context;k2fsa
-- K2_CXX_FLAGS:  -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable  -Wno-strict-overflow
-- K2_CUDA_FLAGS:  -Wno-deprecated-gpu-targets   -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w  --expt-extended-lambda -gencode arch=compute_35,code=sm_35  -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w  --expt-extended-lambda -gencode arch=compute_50,code=sm_50  -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w  --expt-extended-lambda -gencode arch=compute_60,code=sm_60  -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w  --expt-extended-lambda -gencode arch=compute_61,code=sm_61  -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w  --expt-extended-lambda -gencode arch=compute_70,code=sm_70  -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w  --expt-extended-lambda -gencode arch=compute_75,code=sm_75  -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w  --expt-extended-lambda -gencode arch=compute_80,code=sm_80  -lineinfo --expt-extended-lambda -use_fast_math -Xptxas=-w  --expt-extended-lambda -gencode arch=compute_86,code=sm_86 -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=integer_sign_change,--diag_suppress=useless_using_declaration,--diag_suppress=set_but_not_used,--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=implicit_return_from_non_void_function,--diag_suppress=unsigned_compare_with_zero,--diag_suppress=declared_but_not_referenced,--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
-- K2_TORCH_VERSION_MAJOR: 2
-- K2_TORCH_VERSION_MINOR: 0
-- K2_WITH_CUDA: ON
-- K2_CUDA_VERSION: 11.7
-- K2_VERSION: 1.23.4
-- K2_GIT_SHA1: f96d09d40f73c2fba1ca9f79739327932ef06116
-- K2_GIT_DATE: Sat Mar 18 08:42:24 2023
-- CMAKE_CXX_FLAGS:    -Wall  -g  -D_GLIBCXX_USE_CXX11_ABI=0   -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable  -Wno-strict-overflow
CMake Warning (dev) at cmake/kaldifeat.cmake:32:
  Syntax Warning in cmake code at column 52

  Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
  CMakeLists.txt:143 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Python executable: /home/maduo/miniconda3/envs/k2-fsa/bin/python3
-- KALDIFEAT_CMAKE_PREFIX_PATH: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/kaldifeat/share/cmake
-- Found kaldifeat: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/kaldifeat/lib/libkaldifeat_core.so
-- KALDIFEAT_FOUND: TRUE
-- KALDIFEAT_INCLUDE_DIRS: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/kaldifeat/include
-- KALDIFEAT_CXX_FLAGS:  -D_GLIBCXX_USE_CXX11_ABI=0
-- KALDIFEAT_LIBRARIES: kaldifeat_core
-- KALDIFEAT_VERSION: 1.24
-- CMAKE_CXX_FLAGS:    -Wall  -g  -D_GLIBCXX_USE_CXX11_ABI=0   -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable  -Wno-strict-overflow   -D_GLIBCXX_USE_CXX11_ABI=0
CMake Warning (dev) at /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/FetchContent.cmake:1282 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  cmake/kaldi_native_io.cmake:30 (FetchContent_Declare)
  cmake/kaldi_native_io.cmake:57 (download_kaldi_native_io)
  CMakeLists.txt:144 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Downloading kaldi_native_io from https://github.com/csukuangfj/kaldi_native_io/archive/refs/tags/v1.17.2.tar.gz
-- kaldi_native_io is downloaded to /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/kaldi_native_io-src
-- kaldi_native_io's binary dir is /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/kaldi_native_io-build
-- CMAKE_BUILD_TYPE: Release
-- CMAKE_CXX_FLAGS:    -Wall  -g  -D_GLIBCXX_USE_CXX11_ABI=0   -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable  -Wno-strict-overflow   -D_GLIBCXX_USE_CXX11_ABI=0
-- CMAKE_INSTALL_PREFIX: /workspace2/maduo/k2-fsa/sherpa/build/lib.linux-x86_64-cpython-38/sherpa
-- CMAKE_CXX_FLAGS:    -Wall  -g  -D_GLIBCXX_USE_CXX11_ABI=0   -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable  -Wno-strict-overflow   -D_GLIBCXX_USE_CXX11_ABI=0
CMake Warning (dev) at /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/FetchContent.cmake:1282 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  cmake/portaudio.cmake:36 (FetchContent_Declare)
  cmake/portaudio.cmake:62 (download_portaudio)
  CMakeLists.txt:146 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Downloading portaudio from http://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz
-- portaudio is downloaded to /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/portaudio-src
-- portaudio's binary dir is /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/portaudio-build
CMake Deprecation Warning at build/temp.linux-x86_64-cpython-38/_deps/portaudio-src/CMakeLists.txt:7 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Warning (dev) at /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (jack) does
  not match the name of the calling package (Jack).  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):
  build/temp.linux-x86_64-cpython-38/_deps/portaudio-src/cmake_support/FindJack.cmake:34 (find_package_handle_standard_args)
  build/temp.linux-x86_64-cpython-38/_deps/portaudio-src/CMakeLists.txt:277 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find jack (missing: JACK_LIBRARY JACK_INCLUDE_DIR)
-- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
CMake Warning (dev) at /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/FetchContent.cmake:1282 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  cmake/asio.cmake:27 (FetchContent_Declare)
  cmake/asio.cmake:44 (download_asio)
  CMakeLists.txt:150 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Downloading asio https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-24-0.tar.gz
-- asio is downloaded to /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/asio-src
CMake Warning (dev) at /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/FetchContent.cmake:1282 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  cmake/websocketpp.cmake:28 (FetchContent_Declare)
  cmake/websocketpp.cmake:45 (download_websocketpp)
  CMakeLists.txt:151 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Downloading websocketpp from https://github.com/zaphoyd/websocketpp/archive/b9aeec6eaf3d5610503439b4fae3581d9aff08e8.zip
-- websocketpp is downloaded to /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/websocketpp-src
-- CMAKE_CXX_FLAGS:    -Wall  -g  -D_GLIBCXX_USE_CXX11_ABI=0   -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable  -Wno-strict-overflow   -D_GLIBCXX_USE_CXX11_ABI=0
-- CMAKE_INSTALL_PREFIX: /workspace2/maduo/k2-fsa/sherpa/build/lib.linux-x86_64-cpython-38/sherpa
-- Generated /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/sherpa/csrc/version.h
-- Outside a virtual environment
-- path list: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages
-- Outside a virtual environment
-- path list: /home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages
-- Configuring done (29.4s)
-- Generating done (0.1s)
-- Build files have been written to: /workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38
[  1%] Building CXX object sherpa/csrc/CMakeFiles/sherpa-version.dir/version.cc.o
[  2%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/compressed-matrix.cc.o
[  3%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/io-funcs.cc.o
[  4%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_allocation.c.o
[  5%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_converters.c.o
[  6%] Linking CXX executable ../../bin/sherpa-version
[  6%] Built target sherpa-version
[  7%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_cpuload.c.o
[  8%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/kaldi-holder.cc.o
[  9%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_debugprint.c.o
[ 10%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_dither.c.o
[ 11%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_front.c.o
[ 12%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_process.c.o
[ 13%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/kaldi-io.cc.o
[ 14%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_ringbuffer.c.o
[ 15%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_stream.c.o
[ 16%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/common/pa_trace.c.o
[ 17%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/hostapi/skeleton/pa_hostapi_skeleton.c.o
[ 18%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/os/unix/pa_unix_hostapis.c.o
[ 18%] Building C object _deps/portaudio-build/CMakeFiles/portaudio.dir/src/os/unix/pa_unix_util.c.o
[ 19%] Linking C shared library ../../lib/libsherpa_portaudio.so
[ 19%] Built target portaudio
[ 20%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/kaldi-matrix.cc.o
[ 21%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/kaldi-semaphore.cc.o
[ 22%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/kaldi-table.cc.o
[ 23%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/kaldi-utils.cc.o
[ 24%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/kaldi-vector.cc.o
[ 25%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/matrix-shape.cc.o
[ 26%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/parse-options.cc.o
[ 27%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/posterior.cc.o
[ 27%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/text-utils.cc.o
[ 28%] Building CXX object _deps/kaldi_native_io-build/kaldi_native_io/csrc/CMakeFiles/kaldi_native_io_core.dir/wave-reader.cc.o
[ 29%] Linking CXX shared library ../../../../lib/libsherpa_kaldi_native_io_core.so
[ 29%] Built target kaldi_native_io_core
[ 30%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-conformer-ctc-model.cc.o
[ 31%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-conformer-transducer-model.cc.o
[ 32%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-ctc-one-best-decoder.cc.o
[ 33%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-nemo-enc-dec-ctc-model-bpe.cc.o
[ 34%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-transducer-fast-beam-search-decoder.cc.o
[ 35%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-transducer-greedy-search-decoder.cc.o
[ 36%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-transducer-modified-beam-search-decoder.cc.o
[ 37%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-wav2vec2-ctc-model.cc.o
[ 37%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/offline-wenet-conformer-ctc-model.cc.o
[ 38%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-conv-emformer-transducer-model.cc.o
[ 39%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-transducer-greedy-search-decoder.cc.o
[ 40%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-transducer-modified-beam-search-decoder.cc.o
[ 41%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-emformer-transducer-model.cc.o
[ 42%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-conformer-transducer-model.cc.o
[ 43%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-lstm-transducer-model.cc.o
[ 44%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-transducer-fast-beam-search-decoder.cc.o
[ 45%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-zipformer-transducer-model.cc.o
[ 46%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-zipformer2-transducer-model.cc.o
[ 47%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/resample.cc.o
[ 48%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/fbank-features.cc.o
[ 49%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/file-utils.cc.o
[ 50%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/hypothesis.cc.o
[ 51%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/log.cc.o
[ 51%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/symbol-table.cc.o
[ 52%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/online-stream.cc.o
[ 53%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/parse-options.cc.o
[ 54%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/rnnt_beam_search.cc.o
[ 55%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/rnnt_conformer_model.cc.o
[ 56%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/rnnt_conv_emformer_model.cc.o
[ 57%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/rnnt_emformer_model.cc.o
[ 58%] Building CXX object sherpa/csrc/CMakeFiles/sherpa_core.dir/rnnt_lstm_model.cc.o
[ 59%] Linking CXX shared library ../../lib/libsherpa_core.so
[ 59%] Built target sherpa_core
[ 60%] Building CXX object sherpa/cpp_api/websocket/CMakeFiles/sherpa-offline-websocket-client.dir/offline-websocket-client.cc.o
[ 61%] Building CXX object sherpa/cpp_api/websocket/CMakeFiles/sherpa-online-websocket-client.dir/online-websocket-client.cc.o
[ 62%] Building CXX object sherpa/cpp_api/CMakeFiles/sherpa_cpp_api.dir/endpoint.cc.o
[ 63%] Building CXX object sherpa/cpp_api/websocket/CMakeFiles/sherpa-online-websocket-client-microphone.dir/online-websocket-client-from-microphone.cc.o
[ 64%] Building CXX object sherpa/cpp_api/CMakeFiles/sherpa_cpp_api.dir/fast-beam-search-config.cc.o
[ 65%] Building CXX object sherpa/cpp_api/CMakeFiles/sherpa_cpp_api.dir/feature-config.cc.o
[ 66%] Building CXX object sherpa/cpp_api/CMakeFiles/sherpa_cpp_api.dir/offline-recognizer.cc.o
[ 66%] Building CXX object sherpa/cpp_api/websocket/CMakeFiles/sherpa-online-websocket-client-microphone.dir/microphone.cc.o
[ 67%] Linking CXX executable ../../../bin/sherpa-offline-websocket-client
[ 67%] Built target sherpa-offline-websocket-client
[ 68%] Building CXX object sherpa/cpp_api/CMakeFiles/sherpa_cpp_api.dir/offline-stream.cc.o
[ 69%] Linking CXX executable ../../../bin/sherpa-online-websocket-client
[ 69%] Built target sherpa-online-websocket-client
[ 70%] Building CXX object sherpa/cpp_api/CMakeFiles/sherpa_cpp_api.dir/online-recognizer.cc.o
[ 71%] Linking CXX executable ../../../bin/sherpa-online-websocket-client-microphone
[ 71%] Built target sherpa-online-websocket-client-microphone
[ 72%] Linking CXX shared library ../../lib/libsherpa_cpp_api.so
[ 72%] Built target sherpa_cpp_api
[ 72%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/hypothesis.cc.o
[ 73%] Building CXX object sherpa/cpp_api/bin/CMakeFiles/sherpa-online.dir/online-recognizer.cc.o
[ 75%] Building CXX object sherpa/cpp_api/bin/CMakeFiles/sherpa-offline.dir/offline-recognizer.cc.o
[ 75%] Building CXX object sherpa/cpp_api/bin/CMakeFiles/sherpa-online-microphone.dir/online-recognizer-microphone.cc.o
[ 76%] Linking CXX executable ../../../bin/sherpa-online-microphone
[ 76%] Built target sherpa-online-microphone
[ 77%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/resample.cc.o
[ 78%] Linking CXX executable ../../../bin/sherpa-online
[ 79%] Linking CXX executable ../../../bin/sherpa-offline
/usr/bin/ld: CMakeFiles/sherpa-online.dir/online-recognizer.cc.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [sherpa/cpp_api/bin/CMakeFiles/sherpa-online.dir/build.make:119: bin/sherpa-online] Error 1
make[1]: *** [CMakeFiles/Makefile2:525: sherpa/cpp_api/bin/CMakeFiles/sherpa-online.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 80%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/rnnt_beam_search.cc.o
/usr/bin/ld: CMakeFiles/sherpa-offline.dir/offline-recognizer.cc.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [sherpa/cpp_api/bin/CMakeFiles/sherpa-offline.dir/build.make:119: bin/sherpa-offline] Error 1
make[1]: *** [CMakeFiles/Makefile2:497: sherpa/cpp_api/bin/CMakeFiles/sherpa-offline.dir/all] Error 2
[ 81%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/rnnt_conformer_model.cc.o
[ 82%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/rnnt_conv_emformer_model.cc.o
[ 83%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/rnnt_emformer_model.cc.o
[ 84%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/rnnt_lstm_model.cc.o
[ 85%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/rnnt_model.cc.o
[ 86%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/sherpa.cc.o
[ 87%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/fast-beam-search-config.cc.o
[ 88%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/feature-config.cc.o
[ 89%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/offline-ctc-model.cc.o
[ 90%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/offline-recognizer.cc.o
[ 91%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/offline-stream.cc.o
[ 92%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/endpoint.cc.o
[ 92%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/online-recognizer.cc.o
[ 93%] Building CXX object sherpa/python/csrc/CMakeFiles/_sherpa.dir/online-stream.cc.o
[ 94%] Linking CXX shared module ../../../lib/_sherpa.cpython-38-x86_64-linux-gnu.so
/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/torch/include/torch/csrc/utils/pybind.h:36:25: note: type ‘struct type_caster’ itself violates the C++ One Definition Rule
   36 | struct TORCH_PYTHON_API type_caster<at::Tensor> {
      |                         ^
/workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/pybind11-src/include/pybind11/cast.h:38:7: note: the incompatible type is defined here
   38 | class type_caster : public type_caster_base<type> {};
      |       ^
/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/torch/include/torch/csrc/utils/pybind.h:36:25: note: type ‘struct type_caster’ itself violates the C++ One Definition Rule
   36 | struct TORCH_PYTHON_API type_caster<at::Tensor> {
      |                         ^
/workspace2/maduo/k2-fsa/sherpa/build/temp.linux-x86_64-cpython-38/_deps/pybind11-src/include/pybind11/cast.h:38:7: note: the incompatible type is defined here
   38 | class type_caster : public type_caster_base<type> {};
      |       ^
[ 94%] Built target _sherpa
make: *** [Makefile:136: all] Error 2
Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    setuptools.setup(
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
    super().run_command(command)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 325, in run
    self.run_command("build")
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
    super().run_command(command)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 132, in run
    self.run_command(cmd_name)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
    super().run_command(command)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
    self.build_extensions()
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 468, in build_extensions
    self._build_extensions_serial()
  File "/home/maduo/miniconda3/envs/k2-fsa/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 494, in _build_extensions_serial
    self.build_extension(ext)
  File "/workspace2/maduo/k2-fsa/sherpa/cmake/cmake_extension.py", line 117, in build_extension
    raise Exception(
Exception:
Build sherpa failed. Please check the error message.
You can ask for help by creating an issue on GitHub.
build command: python3 setup.py bdist_wheel
csukuangfj commented 1 year ago

@shanguanma

Sorry for the late reply.

Could you replace UNIT in the following line with UNIX and re-try? https://github.com/k2-fsa/sherpa/blob/da0d391638fcdd38e528f145ac79ebfda41e0dd8/sherpa/cpp_api/CMakeLists.txt#L12

csukuangfj commented 1 year ago

@shanguanma Have you fixed it?

shanguanma commented 1 year ago

@csukuangfj , sorry for the late reply. I am busy with other things. Now I have updated it to master. it compiles successfully.