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

grpc build failure #8710

Closed
pathammer opened this issue Oct 24, 2019 · 3 comments
Closed

grpc build failure #8710

pathammer opened this issue Oct 24, 2019 · 3 comments
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@pathammer
Copy link

Host Environment

  • OS: linux - Ubuntu 19.10 - 5.3.0-18-generic
  • Compiler: gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 2019100

To Reproduce
Steps to reproduce the behavior:
./vcpkg install grpc

Failure logs

The following packages will be built and installed:
    grpc[core]:x64-linux
Starting package 1/1: grpc:x64-linux
Building package grpc[core]:x64-linux...
-- Using cached /home/hammer/code/vcpkg/downloads/grpc-grpc-v1.23.1.tar.gz
-- Using source at /home/hammer/code/vcpkg/buildtrees/grpc/src/v1.23.1-e3bc36af44
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
    Command failed: /home/hammer/code/vcpkg/downloads/tools/cmake-3.14.0-linux/cmake-3.14.0-Linux-x86_64/bin/cmake --build . --config Debug --target install -- -v
    Working Directory: /home/hammer/code/vcpkg/buildtrees/grpc/x64-linux-dbg
    See logs for more information:
      /home/hammer/code/vcpkg/buildtrees/grpc/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:96 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/grpc/portfile.cmake:76 (vcpkg_install_cmake)
  scripts/ports.cmake:94 (include)


Error: Building package grpc:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: grpc:x64-linux
  Vcpkg version: 2019.09.12-unknownhash
FAILED: CMakeFiles/gpr.dir/src/core/lib/gpr/log_linux.cc.o 
/usr/bin/c++  -DPB_FIELD_32BIT -I/home/hammer/code/vcpkg/buildtrees/grpc/src/v1.23.1-e3bc36af44/include -I/home/hammer/code/vcpkg/buildtrees/grpc/src/v1.23.1-e3bc36af44 -I/home/hammer/code/vcpkg/installed/x64-linux/include -I/home/hammer/code/vcpkg/buildtrees/grpc/src/v1.23.1-e3bc36af44/third_party/address_sorting/include -I/home/hammer/code/vcpkg/buildtrees/grpc/src/v1.23.1-e3bc36af44/third_party/nanopb -fPIC -std=c++11 -g -fPIC   -fno-exceptions -fno-rtti -MD -MT CMakeFiles/gpr.dir/src/core/lib/gpr/log_linux.cc.o -MF CMakeFiles/gpr.dir/src/core/lib/gpr/log_linux.cc.o.d -o CMakeFiles/gpr.dir/src/core/lib/gpr/log_linux.cc.o -c /home/hammer/code/vcpkg/buildtrees/grpc/src/v1.23.1-e3bc36af44/src/core/lib/gpr/log_linux.cc
/home/hammer/code/vcpkg/buildtrees/grpc/src/v1.23.1-e3bc36af44/src/core/lib/gpr/log_linux.cc:43:13: error: ambiguating new declaration of ‘long int gettid()’
   43 | static long gettid(void) { return syscall(__NR_gettid); }
      |             ^~~~~~
In file included from /usr/include/unistd.h:1170,
                 from /home/hammer/code/vcpkg/buildtrees/grpc/src/v1.23.1-e3bc36af44/src/core/lib/gpr/log_linux.cc:41:
/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: old declaration ‘__pid_t gettid()’
   34 | extern __pid_t gettid (void) __THROW;
      |                ^~~~~~

Additional context
was able to build other packages like protobuf

@pathammer pathammer added the category:port-bug The issue is with a library, which is something the port should already support label Oct 24, 2019
@JackBoosY JackBoosY self-assigned this Oct 24, 2019
@JackBoosY JackBoosY added the requires:repro The issue is not currently repro-able label Oct 24, 2019
@JackBoosY
Copy link
Contributor

Hi @pathammer, thanks for reporting this issue.
It seems the function gettid dumplicate with system function.
Can you unzip this patch , move it to VCPKG_PATH/ports/grpc/ and add line:
fix-duplicate-gettid.patch
to VCPKG_PATH/ports/grpc/portfile.cmake line 27
then try to rebuild grpc?

Thanks.

@pathammer
Copy link
Author

The patch corrected the issue @JackBoosY
Thanks!

@JackBoosY
Copy link
Contributor

Hi @pathammer, my PR has been merged. Please update vcpkg and rebuild grpc.

Thanks.

vladimir-koshelev pushed a commit to JetBrains/Rkernel that referenced this issue Jan 29, 2020
It fixes the issue with failed grpc build with gcc.
See microsoft/vcpkg#8710 for details.

GitOrigin-RevId: b8d2b8096cf88c3f25f7a702a7caa974774e2cb2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

2 participants