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

v1.38.0 breaks building on NetBSD #26357

Closed
moubctez opened this issue May 25, 2021 · 3 comments
Closed

v1.38.0 breaks building on NetBSD #26357

moubctez opened this issue May 25, 2021 · 3 comments

Comments

@moubctez
Copy link

What version of gRPC and what language are you using?

1.38.0

What operating system (Linux, Windows,...) and version?

NetBSD

What runtime / compiler are you using (e.g. python version or version of gcc)

GCC or Clang

gRPC 1.38.0 does not build on NetBSD. It looks like someone has forgotten to mention NetBSD in include/grpc/event_engine/port.h, which ends the build with UNKNOWN PLATFORM. This patch fixes the problem:

--- include/grpc/event_engine/port.h.orig	2021-05-25 05:21:42.595878017 +0000
+++ include/grpc/event_engine/port.h
@@ -22,7 +22,7 @@
 #elif defined(GPR_ANDROID) || defined(GPR_LINUX) || defined(GPR_APPLE) ||   \
     defined(GPR_FREEBSD) || defined(GPR_OPENBSD) || defined(GPR_SOLARIS) || \
     defined(GPR_AIX) || defined(GPR_NACL) || defined(GPR_FUCHSIA) ||        \
-    defined(GRPC_POSIX_SOCKET)
+    defined(GRPC_POSIX_SOCKET) || defined(GPR_NETBSD)
 #define GRPC_EVENT_ENGINE_POSIX
 #include <netdb.h>
 #include <netinet/in.h>
@jtattermusch
Copy link
Contributor

@drfloob
Copy link
Member

drfloob commented May 27, 2021

@moubctez Apologies, BSD is a bit of blind spot for our automated build/test infrastructure, we're looking into that. I'll do the fix and backport it to 1.38.x.

@drfloob
Copy link
Member

drfloob commented May 27, 2021

Actually, we don't have explicit support for NetBSD. The NetBSD package maintainers keep a set of patches against gRPC that define GPR_NETBSD in port_platform, it's not defined in this repository at all. See https://github.com/NetBSD/pkgsrc/blob/trunk/net/grpc/patches/patch-src_core_lib_iomgr_port.h. It looks like they (maybe you? Someone named Adam) already made this fix there.

gRPC-core added support for OpenBSD in 2017, FreeBSD support in 2015. It seems we should be able to add support for NetBSD as well, but again without the test harnesses set up in our CI, it probably wouldn't be wise, we'll continue to miss problems like this.

I'll see about fixing this for the other BSDs if needed.

@drfloob drfloob closed this as completed May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants