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

Compile error on archlinux #17369

Closed
graywolf opened this issue Dec 2, 2018 · 4 comments
Closed

Compile error on archlinux #17369

graywolf opened this issue Dec 2, 2018 · 4 comments

Comments

@graywolf
Copy link

graywolf commented Dec 2, 2018

What version of gRPC and what language are you using?

v1.16.1, c++

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

Linux xxx 4.19.2-arch1-1-ARCH #1 SMP PREEMPT Tue Nov 13 21:16:19 UTC 2018 x86_64 GNU/Linux

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

gcc (GCC) 8.2.1 20180831
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

What did you do?

If possible, provide a recipe for reproducing the error. Try being specific and include code snippets if helpful.

$ wget https://github.com/grpc/grpc/archive/v1.16.1.tar.gz
$ tar xvf v1.16.1.tar.gz
$ cd grpc-1.16.1/
$ CXXFLAGS=-Wno-ignored-qualifiers make

NOTE: the -Wno-ignored-qualifiers is to work around #17287.

What did you expect to see?

Compilation to work.

What did you see instead?

[CXX]     Compiling src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc: In function ‘grpc_grpclb_request* grpc_grpclb_request_create(const char*)’:
src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc:70:10: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 128 equals destination size [-Werror=stringop-truncation]
   strncpy(req->initial_request.name, lb_service_name,
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Anything else we should know about your project / environment?

No

@yashykt
Copy link
Member

yashykt commented Feb 5, 2019

Pull requests are welcome :)

@ius
Copy link

ius commented Apr 8, 2019

@yashykt Pull request has been there for a year (#14452), but it's not moving.

Related: #18565 #18299

It's unfortunate that grpc builds with -Werror even though nobody seems to actually develop using a recent version of gcc (ie. 8, soon to be 9).

@yashykt
Copy link
Member

yashykt commented Apr 8, 2019

@nicolasnoble do you have time to look at this?

@nicolasnoble
Copy link
Member

I have fixed all gcc 8 build issues recently, and these should be on the 1.20 branch. We are now using gcc 8 to build some of our artifacts. This ought to be resolved. Please open new issues if there are still lingering problems not covered by our test cases.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants