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

Error building from source. #10

Closed
videodanchik opened this issue Dec 31, 2022 · 6 comments
Closed

Error building from source. #10

videodanchik opened this issue Dec 31, 2022 · 6 comments

Comments

@videodanchik
Copy link

videodanchik commented Dec 31, 2022

Hi @galv, I have the intention to plug the k2 HLG decoding graph into your amazing decoding algorithm. So I tried to build riva-asrlib-decoder from source and here is my environment detected during configuration:

$ cmake -DRIVA_ASRLIB_BUILD_PYTHON_BINDINGS=NO ..
-- The CUDA compiler identification is NVIDIA 11.7.99
-- The CXX compiler identification is GNU 11.3.0
-- 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
-- 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
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found CUDAToolkit: /usr/local/cuda/include (found version "11.7.99")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/english_k2/riva-asrlib-decoder/build

Now the building process was successful until it reached batched-mapped-decoder-cuda compilation, where it failed with errors. The stack trace is long, so I attach the log file.
build_log.txt

Thanks in advance for the help.

@galv
Copy link
Collaborator

galv commented Jan 3, 2023

I can't reproduce this, so my guess is that I am using a different version from libstdc++ that transitively includes somehow already.

Looking at your log, I see this:

/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:23:1: note: ‘std::optional’ is defined in header ‘<optional>’; did you forget to ‘#include <optional>’?
   22 | #include <cudadecoder/lattice-postprocessor.h>
  +++ |+#include <optional>
   23 | #include <fstext/lattice-utils.h>

The odds are good that adding #include <optional> there will fix things for you.

Adding include-what-you-use to CI could fix these issues, but unfortunately include-what-you-use doesn't have an easy CI workflow from what I can see...

@videodanchik
Copy link
Author

It worked indeed, thank you @galv !

@galv galv reopened this Jan 4, 2023
@galv
Copy link
Collaborator

galv commented Jan 4, 2023

Going to keep this open until I add the appropriate header so it doesn't remain an issue for people building from source.

galv added a commit that referenced this issue Jan 5, 2023
I'm not sure why the error message says to put optional there in
particular, but I cannot reproduce the error with my setup, so I will
consertively put it in the middle of my library's includes.
@galv galv closed this as completed in 89f28c5 Jan 5, 2023
@videodanchik
Copy link
Author

Hey @galv
After #11 , I'm getting this error

[ 81%] Building CXX object CMakeFiles/riva_asrlib_wfst_decoder.dir/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc.o
In file included from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-decoder-cuda.h:17,
                 from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:17:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:124:63: error: ‘NBestResult’ is not a member of ‘kaldi::cuda_decoder’
  124 |                std::optional<std::vector<kaldi::cuda_decoder::NBestResult>>>;
      |                                                               ^~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:124:63: error: template argument 1 is invalid
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:124:63: error: template argument 2 is invalid
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:124:74: error: template argument 1 is invalid
  124 |                std::optional<std::vector<kaldi::cuda_decoder::NBestResult>>>;
      |                                                                          ^~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:124:76: error: template argument 3 is invalid
  124 |                std::optional<std::vector<kaldi::cuda_decoder::NBestResult>>>;
      |                                                                            ^
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:125:46: error: ‘ReturnType’ was not declared in this scope
  125 |   using LatticeCallback = std::function<void(ReturnType&)>;
      |                                              ^~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:125:58: error: template argument 1 is invalid
  125 |   using LatticeCallback = std::function<void(ReturnType&)>;
      |                                                          ^
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:235:56: error: ‘LatticeCallback’ does not name a type
  235 |   void SetLatticeCallback(CorrelationID corr_id, const LatticeCallback& callback)
      |                                                        ^~~~~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:353:47: error: ‘LatticeCallback’ does not name a type
  353 |   void FinalizeDecoding(int32 ichannel, const LatticeCallback* callback)
      |                                               ^~~~~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:426:43: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
  426 |   std::unordered_map<CorrelationID, const LatticeCallback> lattice_callbacks_;
      |                                           ^~~~~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:426:58: error: template argument 2 is invalid
  426 |   std::unordered_map<CorrelationID, const LatticeCallback> lattice_callbacks_;
      |                                                          ^
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:426:58: error: template argument 5 is invalid
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h: In constructor ‘riva::asrlib::BatchedMappedOnlineDecoderCuda::BatchedMappedOnlineDecoderCuda(const riva::asrlib::BatchedMappedOnlineDecoderCudaConfig&, const fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > >&, std::unique_ptr<kaldi::TransitionInformation>&&)’:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:157:24: error: request for member ‘reserve’ in ‘((riva::asrlib::BatchedMappedOnlineDecoderCuda*)this)->riva::asrlib::BatchedMappedOnlineDecoderCuda::lattice_callbacks_’, which is of non-class type ‘int’
  157 |     lattice_callbacks_.reserve(config_.num_channels);
      |                        ^~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h: In member function ‘void riva::asrlib::BatchedMappedOnlineDecoderCuda::SetLatticeCallback(riva::asrlib::BatchedMappedOnlineDecoderCuda::CorrelationID, const int&)’:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:238:24: error: request for member ‘insert’ in ‘((riva::asrlib::BatchedMappedOnlineDecoderCuda*)this)->riva::asrlib::BatchedMappedOnlineDecoderCuda::lattice_callbacks_’, which is of non-class type ‘int’
  238 |     lattice_callbacks_.insert({corr_id, callback});
      |                        ^~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h: In member function ‘void riva::asrlib::BatchedMappedOnlineDecoderCuda::RunCallbacksAndFinalize(const std::vector<long unsigned int>&, const std::vector<int>&, const std::vector<bool>&)’:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:247:17: error: ‘LatticeCallback’ was not declared in this scope; did you mean ‘kaldi::cuda_decoder::LatticeCallback’?
  247 |     std::vector<LatticeCallback*> list_lattice_callbacks_last_chunk;
      |                 ^~~~~~~~~~~~~~~
      |                 kaldi::cuda_decoder::LatticeCallback
In file included from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/third_party/kaldi/src/cudadecoder/lattice-postprocessor.h:25,
                 from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:22,
                 from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-decoder-cuda.h:17,
                 from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:17:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/third_party/kaldi/src/cudadecoder/cuda-pipeline-common.h:140:47: note: ‘kaldi::cuda_decoder::LatticeCallback’ declared here
  140 | typedef std::function<void(CompactLattice &)> LatticeCallback;
      |                                               ^~~~~~~~~~~~~~~
In file included from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-decoder-cuda.h:17,
                 from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:17:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:247:33: error: template argument 1 is invalid
  247 |     std::vector<LatticeCallback*> list_lattice_callbacks_last_chunk;
      |                                 ^
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:247:33: error: template argument 2 is invalid
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:257:39: error: request for member ‘end’ in ‘((riva::asrlib::BatchedMappedOnlineDecoderCuda*)this)->riva::asrlib::BatchedMappedOnlineDecoderCuda::lattice_callbacks_’, which is of non-class type ‘int’
  257 |           decltype(lattice_callbacks_.end()) it_lattice_callback;
      |                                       ^~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:257:39: error: request for member ‘end’ in ‘((riva::asrlib::BatchedMappedOnlineDecoderCuda*)this)->riva::asrlib::BatchedMappedOnlineDecoderCuda::lattice_callbacks_’, which is of non-class type ‘int’
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:258:35: error: request for member ‘empty’ in ‘((riva::asrlib::BatchedMappedOnlineDecoderCuda*)this)->riva::asrlib::BatchedMappedOnlineDecoderCuda::lattice_callbacks_’, which is of non-class type ‘int’
  258 |           if (!lattice_callbacks_.empty()) {
      |                                   ^~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:259:54: error: request for member ‘find’ in ‘((riva::asrlib::BatchedMappedOnlineDecoderCuda*)this)->riva::asrlib::BatchedMappedOnlineDecoderCuda::lattice_callbacks_’, which is of non-class type ‘int’
  259 |             it_lattice_callback = lattice_callbacks_.find(corr_id);
      |                                                      ^~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:260:79: error: request for member ‘end’ in ‘((riva::asrlib::BatchedMappedOnlineDecoderCuda*)this)->riva::asrlib::BatchedMappedOnlineDecoderCuda::lattice_callbacks_’, which is of non-class type ‘int’
  260 |             has_lattice_callback = (it_lattice_callback != lattice_callbacks_.end());
      |                                                                               ^~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:264:30: error: ‘lattice_callback’ was not declared in this scope; did you mean ‘lattice_callbacks_’?
  264 |             LatticeCallback* lattice_callback =
      |                              ^~~~~~~~~~~~~~~~
      |                              lattice_callbacks_
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:265:21: error: expected type-specifier before ‘LatticeCallback’
  265 |                 new LatticeCallback(std::move(it_lattice_callback->second));
      |                     ^~~~~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:266:32: error: request for member ‘erase’ in ‘((riva::asrlib::BatchedMappedOnlineDecoderCuda*)this)->riva::asrlib::BatchedMappedOnlineDecoderCuda::lattice_callbacks_’, which is of non-class type ‘int’
  266 |             lattice_callbacks_.erase(it_lattice_callback);
      |                                ^~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:268:47: error: request for member ‘push_back’ in ‘list_lattice_callbacks_last_chunk’, which is of non-class type ‘int’
  268 |             list_lattice_callbacks_last_chunk.push_back(lattice_callback);
      |                                               ^~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:292:24: error: ‘lattice_callback’ was not declared in this scope; did you mean ‘lattice_callbacks_’?
  292 |       LatticeCallback* lattice_callback = list_lattice_callbacks_last_chunk[i];
      |                        ^~~~~~~~~~~~~~~~
      |                        lattice_callbacks_
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:292:76: error: invalid types ‘int[std::size_t {aka long unsigned int}]’ for array subscript
  292 |       LatticeCallback* lattice_callback = list_lattice_callbacks_last_chunk[i];
      |                                                                            ^
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h: In member function ‘void riva::asrlib::BatchedMappedOnlineDecoderCuda::FinalizeDecoding(int32, const int*)’:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:378:5: error: ‘ReturnType’ was not declared in this scope
  378 |     ReturnType result;
      |     ^~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:385:42: error: ‘NBestResult’ is not a member of ‘kaldi::cuda_decoder’
  385 |         std::vector<kaldi::cuda_decoder::NBestResult> nbest = lattice_postprocessor_->GetNBestList(dlat);
      |                                          ^~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:385:53: error: template argument 1 is invalid
  385 |         std::vector<kaldi::cuda_decoder::NBestResult> nbest = lattice_postprocessor_->GetNBestList(dlat);
      |                                                     ^
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:385:53: error: template argument 2 is invalid
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:385:87: error: ‘class kaldi::cuda_decoder::LatticePostprocessor’ has no member named ‘GetNBestList’
  385 |         std::vector<kaldi::cuda_decoder::NBestResult> nbest = lattice_postprocessor_->GetNBestList(dlat);
      |                                                                                       ^~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:386:9: error: ‘result’ was not declared in this scope; did you mean ‘CUresult’?
  386 |         result = {std::make_optional(clat), std::make_optional(ctm), std::make_optional(nbest)};
      |         ^~~~~~
      |         CUresult
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:388:9: error: ‘result’ was not declared in this scope; did you mean ‘CUresult’?
  388 |         result = {std::make_optional(dlat), std::nullopt, std::nullopt};
      |         ^~~~~~
      |         CUresult
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:393:19: error: ‘result’ was not declared in this scope; did you mean ‘CUresult’?
  393 |       (*callback)(result);
      |                   ^~~~~~
      |                   CUresult
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:393:25: error: expression cannot be used as a function
  393 |       (*callback)(result);
      |                         ^
In file included from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:17:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-decoder-cuda.h: At global scope:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-decoder-cuda.h:51:45: error: ‘LatticeCallback’ in ‘class riva::asrlib::BatchedMappedOnlineDecoderCuda’ does not name a type
   51 |       const BatchedMappedOnlineDecoderCuda::LatticeCallback& callback);
      |                                             ^~~~~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-decoder-cuda.h:97:37: error: ‘LatticeCallback’ in ‘class riva::asrlib::BatchedMappedOnlineDecoderCuda’ does not name a type
   97 |     BatchedMappedOnlineDecoderCuda::LatticeCallback callback;
      |                                     ^~~~~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:46:43: error: ‘LatticeCallback’ in ‘class riva::asrlib::BatchedMappedOnlineDecoderCuda’ does not name a type
   46 |     const BatchedMappedOnlineDecoderCuda::LatticeCallback& callback)
      |                                           ^~~~~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc: In member function ‘void riva::asrlib::BatchedMappedDecoderCuda::DecodeWithCallback(const float*, std::size_t, std::size_t, const int&)’:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:51:8: error: ‘struct riva::asrlib::BatchedMappedDecoderCuda::UtteranceTask’ has no member named ‘callback’
   51 |   task.callback = callback;
      |        ^~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc: In member function ‘void riva::asrlib::BatchedMappedDecoderCuda::AcquireTasks()’:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:79:27: error: ‘struct riva::asrlib::BatchedMappedDecoderCuda::UtteranceTask’ has no member named ‘callback’
   79 |     auto& callback = task.callback;
      |                           ^~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:82:40: error: ‘riva::asrlib::BatchedMappedOnlineDecoderCuda::ReturnType’ has not been declared
   82 |         task.corr_id, [this, callback](BatchedMappedOnlineDecoderCuda::ReturnType& result) {
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc: In lambda function:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:83:15: error: ‘callback’ is not captured
   83 |           if (callback)
      |               ^~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:82:38: note: the lambda has no capture-default
   82 |         task.corr_id, [this, callback](BatchedMappedOnlineDecoderCuda::ReturnType& result) {
      |                                      ^
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:79:11: note: ‘<typeprefixerror>callback’ declared here
   79 |     auto& callback = task.callback;
      |           ^~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:84:13: error: ‘callback’ is not captured
   84 |             callback(result);
      |             ^~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:82:38: note: the lambda has no capture-default
   82 |         task.corr_id, [this, callback](BatchedMappedOnlineDecoderCuda::ReturnType& result) {
      |                                      ^
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:79:11: note: ‘<typeprefixerror>callback’ declared here
   79 |     auto& callback = task.callback;
      |           ^~~~~~~~
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc: In member function ‘void riva::asrlib::BatchedMappedDecoderCuda::AcquireTasks()’:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:81:45: error: cannot convert ‘riva::asrlib::BatchedMappedDecoderCuda::AcquireTasks()::<lambda(int&)>’ to ‘const int&’
   81 |     cuda_online_pipeline_.SetLatticeCallback(
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   82 |         task.corr_id, [this, callback](BatchedMappedOnlineDecoderCuda::ReturnType& result) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   83 |           if (callback)
      |           ~~~~~~~~~~~~~
   84 |             callback(result);
      |             ~~~~~~~~~~~~~~~~~
   85 |           n_tasks_not_done_.fetch_sub(1, std::memory_order_release);
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   86 |         });
      |         ~~
In file included from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-decoder-cuda.h:17,
                 from /share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc:17:
/share/dkulko/behavox-analytics-research/asr/english_k2/riva-asrlib-decoder/include/riva/asrlib/decoder/batched-mapped-online-decoder-cuda.h:235:73: note:   initializing argument 2 of ‘void riva::asrlib::BatchedMappedOnlineDecoderCuda::SetLatticeCallback(riva::asrlib::BatchedMappedOnlineDecoderCuda::CorrelationID, const int&)’
  235 |   void SetLatticeCallback(CorrelationID corr_id, const LatticeCallback& callback)
      |                                                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
gmake[2]: *** [CMakeFiles/riva_asrlib_wfst_decoder.dir/build.make:918: CMakeFiles/riva_asrlib_wfst_decoder.dir/src/riva/asrlib/decoder/batched-mapped-decoder-cuda.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1927: CMakeFiles/riva_asrlib_wfst_decoder.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

@galv
Copy link
Collaborator

galv commented Jan 6, 2023

So sorry. I have an explanatory comment here: #12 (comment)

Basically I forgot to update the kaldi submodule in that PR.

Just go to the latest main branch, and be sure to call git submodule update --init --recursive to make sure you have latest kaldi submodule.

BTW, once I have CI up, these issues should no longer come up.

@videodanchik
Copy link
Author

@galv Thank you very much for the fast fixes, it all works now!

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