Closed
Description
Please answer these questions before submitting your issue.
What version of gRPC are you using?
v0.15.0
What JVM are you using (java -version
)?
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
What did you do?
Install protoc to /opt/share
If possible, provide a recipe for reproducing the error.
cd /tmp
git clone https://github.com/google/protobuf.git && cd protobuf
git checkout v3.1.0
./autogen.sh
./configure --prefix=/opt/share/protobuf/ppc64le/
make && make install
export PATH=/opt/share/protobuf/ppc64le/bin/:$PATH
export LD_LIBRARY_PATH=/opt/share/protobuf/ppc64le/lib/:$LD_LIBRARY_PATH
Install grpc-java
cd tmp
git clone https://github.com/grpc/grpc-java.git && cd grpc-java
export CXXFLAGS="-I/opt/share/protobuf/ppc64le/include"
./gradlew build
What did you expect to see?
Build Successful
What did you see instead?
:grpc-compiler:compileJava_pluginExecutableJava_pluginCpp/tmp/src/grpc-java/compiler/src/java_plugin/cpp/java_generator.cpp:7:54: fatal error: google/protobuf/compiler/java/java_names.h: No such file or directory
#include <c>
even though
ls -la /opt/share/protobuf/ppc64le/include/google/protobuf/compiler/java/
total 12
drwxr-xr-x 2 bmbelgod users 48 Dec 1 22:06 .
drwxr-xr-x 11 bmbelgod users 4096 Dec 1 22:06 ..
-rw-r--r-- 1 bmbelgod users 2945 Dec 1 22:06 java_generator.h
-rw-r--r-- 1 bmbelgod users 2931 Dec 1 22:06 java_names.h
Activity
ejona86 commentedon Dec 6, 2016
Hmm... That's strange. You can debug the build a little bit by running
./gradlew :grpc-compiler:assemble --info
. It will show that g++ is being passed arguments via a file. The file should probably becompiler/build/tmp/compileJava_pluginExecutableJava_pluginCpp/options.txt
. Normally the file is deleted, but if the build fails it is left in-place for debugging. Do the contents ofoptions.txt
include the-I
?bbelgodere commentedon Dec 6, 2016
@ejona86 Now getting another error. started with a fresh install of Master. v1.0.2 throws an architecture error.
ejona86 commentedon Dec 7, 2016
You should also specify
LDFLAGS
. Something like-L/opt/share/protobuf/ppc64le/lib
.LD_LIBRARY_PATH
is used during protoc execution,LDFLAGS
is used during our plugin linking.bbelgodere commentedon Dec 7, 2016
@ejona86 Options being passed now look correct but running into a new error
Options being passed now look good.
Now getting a new Error
npanpaliya commentedon Dec 8, 2016
grpc-java 15.0 needs protobuf v3.0.0-beta-3. I think that is the cause of the issue you are seeing. Please try with protobuf v3.0.0-beta-3.
Then for grpc-java, export CXXFLAGS to include folder where protobuf headers are installed and LDFLAGS to protobuf's libs folder.
To build grpc-java, run below command -
./gradlew build -Pprotoc=<path/to/protoc binary>