Opened 9 years ago

Closed 9 years ago

#1184 closed defect (fixed)

Cannot build grpc-java when make due to libstdc++

Reported by: Bang Pham Huu Owned by: Alex Toader
Priority: critical Milestone: 9.2
Component: java Version: development
Keywords: build grpc error Cc: Dimitar Misev, Alex Toader
Complexity: Medium

Description

Using git clone rasdaman and built with this configuration
autoreconf -fi
./configure —with-java-server=embedded —prefix=/home/rasdaman/install —with-netcdf
make

error in here

cp grpc-java/compiler/build/binaries/java_pluginExecutable/protoc-gen-grpc-java /home/rasdaman/test_servers/update/rasdaman/third_party/bin/grpc-java
*** Building codegen requires Protobuf version 3.0.0-beta-1
*** Please refer to https://github.com/grpc/grpc-java/blob/master/COMPILING.md#how-to-build-code-generation-plugin
:grpc-compiler:compileJava_pluginExecutableJava_pluginCpp
:grpc-compiler:linkJava_pluginExecutable
/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status

:grpc-compiler:linkJava_pluginExecutable FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':grpc-compiler:linkJava_pluginExecutable'.
> A build operation failed.
      Linker failed while linking protoc-gen-grpc-java.
  See the complete log at: file:///home/rasdaman/test_servers/update/rasdaman/third_party/grpc-java/compiler/build/tmp/linkJava_pluginExecutable/output.txt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 31.115 secs
make[2]: *** [/home/rasdaman/test_servers/update/rasdaman/third_party/bin/grpc-java] Error 1
make[2]: Leaving directory `/home/rasdaman/test_servers/update/rasdaman/third_party'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rasdaman/test_servers/update/rasdaman'
make: *** [all] Error 2

Solution: Then when configure should request this version of library libstdc++ minimum 4.8.5

sudo yum install libstdc++-static
  libstdc++-static.x86_64 0:4.8.5-4.el7         

Change History (1)

comment:1 by Dimitar Misev, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.