Hi all,
This is my first time working with gRPC, and I'm new to the project. I'm building a gRPC application for C++, which will be used (and is currently used) on Toradex SoM running TorizonOS. I'm working on Windows 11 with WSL2. I’ve tried building on both Ubuntu 24.04 LTS and the Torizon distribution from Toradex. The cross-compiler I’m using is: arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu. The process I followed is as follows: 1. Download gRPC via git. 2. Build it in the "build" directory using: cmake .. make -j$(nproc) protoc grpc_cpp_plugin 3. After that, I cross-compile in the "build_target" directory: cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake -DCMAKE_CROSSCOMPILING=1 make -j$(nproc) I always encounter the following error (tried Ubuntu and Torizon distributions in WSL2): [ 75%] Building CXX object _deps/grpc-build/CMakeFiles/grpc.dir/src/core/lib/iomgr/systemd_utils.cc.o /home/mb/Projects/HAL/server/build_target/_deps/grpc-src/src/core/lib/iomgr/systemd_utils.cc:26:10: fatal error: systemd/sd-daemon.h: No such file or directory 26 | #include <systemd/sd-daemon.h> | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [_deps/grpc-build/CMakeFiles/grpc.dir/build.make:8336: _deps/grpc-build/CMakeFiles/grpc.dir/src/core/lib/iomgr/systemd_utils.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 75%] Building CXX object _deps/grpc-build/third_party/protobuf/CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_enum_field.cc.o The build fails because it can’t find systemd/sd-daemon.h. I have fully updated the distribution (via apt update/upgrade) on both Ubuntu and Torizon, and I have libsystemd installed with it, but the build still fails at this point. The only way I’ve found to resolve this is by removing the systemd-related code from the gRPC CMakeLists.txt (located in build/_deps/grpc-src), similar to how it’s done for Windows, where there is no systemd. Interestingly, my colleagues have been able to build it without any modifications to the CMakeLists.txt on their machines, but they did it 2 years ago first time, maybe they forgot some steps I currently don't know... Could anyone offer insight into why this might be happening? Also, will gRPC work correctly on Toradex SoMs without systemd support? If yes, I got nothing to worry about. Thanks in advance! Best regards, Mladen -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/grpc-io/a0436902-c6a1-4e6a-8d96-7b780848e9aen%40googlegroups.com.