grpc-swift icon indicating copy to clipboard operation
grpc-swift copied to clipboard

Ubuntu 19.10/swift 5.1 build failure

Open dnvdmitry opened this issue 4 years ago • 1 comments

The problem comes with the new glibc >= 2.30 for Sources/CgRPC/src/core/lib/iomgr/ev_epollex_linux.cc :

static declaration of 'gettid' follows non-static declaration static long gettid(void) { return syscall(__NR_gettid); }

Possible solution is @@ -1102,8 +1102,10 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, }

#ifndef NDEBUG +#if !defined(_GNU_SOURCE) || !defined(GLIBC) || GLIBC < 2 || (GLIBC == 2 && GLIBC_MINOR < 30) static long gettid(void) { return syscall(__NR_gettid); } #endif +#endif

dnvdmitry avatar Dec 12 '19 15:12 dnvdmitry

Still present in Ubuntu 20.04. Exact same error from exact same file.

Swift 5.3 clang version 10.0.0-4ubuntu1 Target: x86_64-pc-linux-gnu Thread model: posix

` 1608198104.553934900: src/main/tools/linux-sandbox-pid1.cc:393: child started with PID 2 external/com_github_grpc_grpc_swift/Sources/CgRPC/src/core/lib/iomgr/ev_epollex_linux.cc:110

6:13: error: static declaration of 'gettid' follows non-static declaration static long gettid(void) { return syscall(__NR_gettid); } ^

/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration is here extern __pid_t gettid (void) __THROW; ^ `

marvin-hansen avatar Dec 17 '20 10:12 marvin-hansen