You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[QUESTION] TCP transport cannot compile on Zephyr (missing netdb.h, pthread, and unsupported threading) #473
Hi, I’m trying to build eRPC on Zephyr RTOS and encountered several compilation errors when enabling the TCP transport (erpc_tcp_transport.cpp). It seems that the TCP transport and pthread threading implementation are not compatible with Zephyr.
Environment
Zephyr version: (4.0.0)
eRPC version: master (1.13.0)
Toolchain: Zephyr SDK / GCC ARM
Platform: Raspberry Pi Pico (rp2040)
Issue Description
When building eRPC inside a Zephyr application, the following errors occur:
netdb.h not found
fatal error: netdb.h: No such file or directory #include <netdb.h>
Zephyr does not provide netdb.h (POSIX network database), so this header cannot be included.
pthread-based implementation is pulled into the build
error: 'pthread_key_t erpc::Thread::s_threadObjectKey' is not a static data member
and
error: no matching function for call to 'k_thread::k_thread(int)'
Zephyr does not support pthreads, and the k_thread structure does not behave like a C++ class, so this code cannot compile.
Questions
Is TCP transport officially supported on Zephyr?
If not, is there any plan (or recommended approach) to port TCPTransport to the Zephyr networking stack (zephyr/net/socket.h)?
Thank you!
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/closed PR which is solving this issue.
I looked in documentation if there is related information.
Activity
github-actions commentedon Dec 4, 2025
Hi eRPC user. Thank you for your interest and welcome. We hope you will enjoy this framework well.