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

[BUG] TCP transport cannot be built without thread support #394

Open
2 tasks done
kevin-peng-hao opened this issue Nov 24, 2023 · 1 comment
Open
2 tasks done

[BUG] TCP transport cannot be built without thread support #394

kevin-peng-hao opened this issue Nov 24, 2023 · 1 comment
Labels

Comments

@kevin-peng-hao
Copy link

Describe the bug
TCP transport cannot be built without thread support.
I'm getting errors:

In file included from erpc/erpc_c/setup/erpc_setup_tcp.cpp:11:
/erpc/erpc_c/transports/erpc_tcp_transport.h:89:5: error: ‘Thread’ does not name a type
89 | Thread m_serverThread; /!< Pointer to server thread. /
| ^~~~~~
make[2]: *** [CMakeFiles/erpc_main.dir/build.make:118: CMakeFiles/erpc_main.dir/erpc/erpc_c/setup/erpc_setup_tcp.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from erpc/erpc_c/transports/erpc_tcp_transport.cpp:10:
erpc/erpc_c/transports/erpc_tcp_transport.h:89:5: error: ‘Thread’ does not name a type
89 | Thread m_serverThread; /
!< Pointer to server thread. /
| ^~~~~~
erpc/erpc_c/transports/erpc_tcp_transport.cpp: In constructor ‘erpc::TCPTransport::TCPTransport(bool)’:
erpc/erpc_c/transports/erpc_tcp_transport.cpp:48:3: error: class ‘erpc::TCPTransport’ does not have any field named ‘m_serverThread’
48 | , m_serverThread(serverThreadStub)
| ^~~~~~~~~~~~~~
erpc/erpc_c/transports/erpc_tcp_transport.cpp: In constructor ‘erpc::TCPTransport::TCPTransport(const char
, uint16_t, bool)’:
erpc/erpc_c/transports/erpc_tcp_transport.cpp:58:3: error: class ‘erpc::TCPTransport’ does not have any field named ‘m_serverThread’
58 | , m_serverThread(serverThreadStub)
| ^~~~~~~~~~~~~~
erpc/erpc_c/transports/erpc_tcp_transport.cpp: In member function ‘virtual erpc_status_t erpc::TCPTransport::open()’:
erpc/erpc_c/transports/erpc_tcp_transport.cpp:78:9: error: ‘m_serverThread’ was not declared in this scope; did you mean ‘serverThread’?
78 | m_serverThread.start(this);
| ^~~~~~~~~~~~~~
| serverThread
erpc/erpc_c/transports/erpc_tcp_transport.cpp: In member function ‘virtual erpc_status_t erpc::TCPTransport::underlyingReceive(uint8_t
, uint32_t)’:
erpc/erpc_c/transports/erpc_tcp_transport.cpp:233:9: error: ‘Thread’ has not been declared
233 | Thread::sleep(10000);
| ^~~~~~

To Reproduce

  1. Disable thread in erpc_config.h
    #define ERPC_THREADS (ERPC_THREADS_NONE)
  2. Build the erpc_tcp_transport.cpp.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.3 LTS
  • eRPC Version: 1.9.1 release.

Steps you didn't forgot to do

  • I checked if there is no related issue opened/closed.
  • I checked that there doesn't exist opened PR which is solving this issue.

Additional context

Copy link

Hi eRPC user. Thank you for your interest and welcome. We hope you will enjoy this framework well.

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

No branches or pull requests

1 participant