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

managed_components 里的代码编译报错 #47

Open
wi-cuckoo opened this issue Jan 8, 2025 · 2 comments
Open

managed_components 里的代码编译报错 #47

wi-cuckoo opened this issue Jan 8, 2025 · 2 comments

Comments

@wi-cuckoo
Copy link

编译报错,看着是依赖包问题,这块经验不足不知道是不是版本lock不对
环境信息:

  • sdk 5.5.0
  • board:esp32s3 via usb-jtag
  • 代码版本:v0.9.8

报错日志如下

In file included from /workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/opus_decoder.cc:1:
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:29: error: 'uint8_t' was not declared in this scope
   15 |     bool Decode(std::vector<uint8_t>&& opus, std::vector<int16_t>& pcm);
      |                             ^~~~~~~
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:8:1: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    7 | #include "opus.h"
  +++ |+#include <cstdint>
    8 | 
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:36: error: template argument 1 is invalid
   15 |     bool Decode(std::vector<uint8_t>&& opus, std::vector<int16_t>& pcm);
      |                                    ^
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:36: error: template argument 2 is invalid
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:37: error: expected identifier before '&&' token
   15 |     bool Decode(std::vector<uint8_t>&& opus, std::vector<int16_t>& pcm);
      |                                     ^~
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:58: error: 'int16_t' was not declared in this scope
   15 |     bool Decode(std::vector<uint8_t>&& opus, std::vector<int16_t>& pcm);
      |                                                          ^~~~~~~
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:58: note: 'int16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:65: error: template argument 1 is invalid
   15 |     bool Decode(std::vector<uint8_t>&& opus, std::vector<int16_t>& pcm);
      |                                                                 ^
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:65: error: template argument 2 is invalid
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:66: error: expected identifier before '&' token
   15 |     bool Decode(std::vector<uint8_t>&& opus, std::vector<int16_t>& pcm);
      |                                                                  ^
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/opus_decoder.cc:23:6: error: no declaration matches 'bool OpusDecoderWrapper::Decode(std::vector<unsigned char>&&, std::vector<short int>&)'
   23 | bool OpusDecoderWrapper::Decode(std::vector<uint8_t>&& opus, std::vector<int16_t>& pcm) {
      |      ^~~~~~~~~~~~~~~~~~
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:15:10: note: candidate is: 'bool OpusDecoderWrapper::Decode(int&&, int&)'
   15 |     bool Decode(std::vector<uint8_t>&& opus, std::vector<int16_t>& pcm);
      |          ^~~~~~
/workspace/espcar/xiaozhi-esp32/managed_components/78__esp-opus-encoder/include/opus_decoder.h:10:7: note: 'class OpusDecoderWrapper' defined here
   10 | class OpusDecoderWrapper {
      |       ^~~~~~~~~~~~~~~~~~
[1682/1787] Building CXX object esp-idf/78__esp-ml307/CMakeFiles/__idf_78__esp-ml307.dir/ml307_http.cc.obj
ninja: build stopped: subcommand failed.
@78
Copy link
Owner

78 commented Jan 8, 2025

sdk 5.5.0已经出来了吗?还没试过

@wi-cuckoo
Copy link
Author

我按官方教程装的环境,没有注意版本这块,我先试试改下吧

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