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

Error zero_copy_stream.h file not found during ../gradlew java_pluginExecutable

Open silentAllay opened this issue 10 years ago • 8 comments

RUN ../gradlew java_pluginExecutable got error:

Error zero_copy_stream.h file not found

I tried export CXXFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" , but did not work, ENV as following: OS: CentOS-7/Mac protobuf: protoc-3.0.0-beta-4-linux-x86_64 grpc-java:grpc-java-0.15.0 jdk:1.8

silentAllay avatar Jul 26 '16 03:07 silentAllay

Thats typically because you are using an older protobuf. Are you sure you don't have a doppelganger on your LD_LIBRARY_PATH? Possibly somewhere else on you system?

carl-mastrangelo avatar Jul 26 '16 16:07 carl-mastrangelo

Can you confirm /usr/local/include/google/protobuf/io/zero_copy_stream.h exists? I just did a new build of protobuf-3.0.0-beta4 and see that file and don't have problems during building grpc.

If you're building 0.15.0, is there a reason not to use our pre-built binary? http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22protoc-gen-grpc-java%22

ejona86 avatar Jul 26 '16 16:07 ejona86

@ejona86 0. I am using the newest protobuf:protobuf-3.0.0-beta4: image

  1. the error occurs when i building grpc-java-0.15.0: $ cd $GRPC_JAVA_ROOT/compiler $ ../gradlew java_pluginExecutable
  2. in the maven url you gave above, I downloaded the windows-x86_64.exe, then double click it to run in my windows 7,but it stuck there,the snapshot: image

silentAllay avatar Jul 26 '16 17:07 silentAllay

I thought you were using CentOS-7? Although all the files on Maven end in .exe, they are normal binaries for each platform. Maven Central requires a file extension, so we chose exe.

protoc-gen-grpc-java is a plugin for protoc (also available on Maven Central). It is expecting input from protoc over stdin. Take a look at the Readme for how to use it.

ejona86 avatar Jul 26 '16 17:07 ejona86

@ejona86 I did the following as the Readme,but still got error: image

silentAllay avatar Jul 26 '16 18:07 silentAllay

@ejona86 I got it,chmod the exe to be runnable,then it WORKED, thank you very much~

silentAllay avatar Jul 26 '16 18:07 silentAllay

Could you share ls -l? Maybe chmod +x protoc-gen-grpc-java-0.15.0-linux-x86_64.exe?

ejona86 avatar Jul 26 '16 18:07 ejona86

@killjason, excellent. Glad it's working for you now.

ejona86 avatar Jul 26 '16 18:07 ejona86