Re: Install fabric-chaincode-java to raspberry 4 #fabric-chaincode #fabric-questions


Brett T Logan <development.brett@...>
 

I believe you need to add `mavenLocal()` to https://github.com/hyperledger/fabric-chaincode-java/blob/master/fabric-chaincode-protos/build.gradle#L13 like it is mentioned here: https://github.com/hyperledger/fabric-chaincode-java/blob/master/build.gradle#L23

The protos don't import your local maven repo.

Brett

On Mon, Mar 8, 2021 at 10:48 AM Nikos Karamolegkos <nkaram@...> wrote:
Hello, I have built
1) protobuf 3.12.0 using ../autogen, /configure, make, make check, sudo make install. No problems, the protobuf pack is installed in usr/local/lib
2) export LDFLAGS="-L/usr/local/lib/", export CXXFLAGS="-I/usr/local/include/". Not sure if needed
3) From grpc/compiler I run:
a)
../gradlew java_pluginExecutable -Pprotoc=/usr/local/bin/protoc -PskipAndroid=true OK
b) .
./gradlew test -Pprotoc=/usr/local/bin/protoc -PskipAndroid=true OK
c)
../gradlew publishToMavenLocal -PskipAndroid=true -Pprotoc=/usr/local/bin/protoc OK after changing assertEq "$format" "elf64-little" $LINENO to assertEq "$format" "elf64-littleaarch64" $LINENO.  The output:

 * Skipping the build of Android projects because skipAndroid=true

> Configure project :grpc-compiler
*** Building codegen requires Protobuf version 3.12.0
*** Please refer to https://github.com/grpc/grpc-java/blob/master/COMPILING.md#how-to-build-code-generation-plugin

> Task :grpc-compiler:checkArtifacts

Checking format of build/artifacts/java_plugin/protoc-gen-grpc-java.exe
Format=elf64-littleaarch64

Checking dependencies of build/artifacts/java_plugin/protoc-gen-grpc-java.exe
Checking for expected dependencies ...
 NEEDED               libpthread.so.0
 NEEDED               libc.so.6
 NEEDED               ld-linux-aarch64.so.1
Checking for unexpected dependencies ...
Dependencies look good.


BUILD SUCCESSFUL in 10s
11 actionable tasks: 7 executed, 4 up-to-date

4) From the fabric-chaincode-java folder I run: ./gradlew clean build install

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':fabric-chaincode-protos:generateProto'.
> Could not resolve all files for configuration ':fabric-chaincode-protos:protobufToolsLocator_grpc'.
  > Could not find protoc-gen-grpc-java-linux-aarch_64.exe (io.grpc:protoc-gen-grpc-java:1.23.0).
    Searched in the following locations:
        https://repo.maven.apache.org/maven2/io/grpc/protoc-gen-grpc-java/1.23.0/protoc-gen-grpc-java-1.23.0-linux-aarch_64.exe

The same problem which I started

Join fabric@lists.hyperledger.org to automatically receive all group messages.