#1104 closed defect (fixed)

Cannot compile rasnet after update

Reported by: mdumitru Owned by: gmerticariu
Priority: major Milestone: 9.2
Component: rasnet Version: development
Keywords: Cc: atoader
Complexity: Medium

Description

I had a running installation. I ran git pull and the autoreconf, configure, make && make install. This is what I got back:

import org.rasdaman.rasnet.service.Error;
                                  ^
  symbol:   class Error
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/util/GrpcUtils.java:54: error: cannot find symbol
                Error.ErrorMessage message = Error.ErrorMessage.parseFrom(status.getDescription().getBytes(Charset.forName("UTF-8")));

Also there was no mention of needing to update grpc in the wiki in order to compile.

Change History (18)

comment:1 Changed 21 months ago by dmisev

I have this issue, what exactly needs to be updated?

serverrasnet.cc: In constructor ‘rasmgr::ServerRasNet::ServerRasNet(const rasmgr::ServerConfig&)’:
serverrasnet.cc:104:106: error: ‘InsecureChannelCredentials’ is not a member of ‘grpc’
     this->service.reset(new ::rasnet::service::RasServerService::Stub(grpc::CreateChannel(serverAddress, grpc::InsecureChannelCredentials())));

comment:2 Changed 21 months ago by mdumitru

I couldn't get it to update, it seems some Makefile is broken and does not properly clean some generated files -> hence this ticket. It works if you clone a new version though and follow the installation isntructions.

comment:3 Changed 21 months ago by dmisev

I'm compiling on a fresh rasdaman clone and I get the above error.. not sure if I need to update something else.

comment:4 Changed 21 months ago by mdumitru

Probably skipped this grpc part git checkout release-0_12
See here: http://rasdaman.org/wiki/Install

comment:5 Changed 21 months ago by dmisev

Ok last time I installed I guess there wasn't 0.12, in my local clone grpc is at 0.11; there should be some announcement when the dependencies change.

comment:6 Changed 21 months ago by mdumitru

I agree, I was surprised to see this as well.

comment:7 follow-up: Changed 21 months ago by dmisev

Now I'm getting this:

make[2]: Entering directory '/home/dimitar/projects/rasdaman/community/src/java'
cp src/rasj/RasImplementation.java.rasnet src/rasj/RasImplementation.java
Making all in ../rasnet
make[3]: Entering directory '/home/dimitar/projects/rasdaman/community/src/rasnet'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/dimitar/projects/rasdaman/community/src/rasnet'
make[3]: Entering directory '/home/dimitar/projects/rasdaman/community/src/java'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/dimitar/projects/rasdaman/community/src/java'
mkdir -p bin dist
javac -cp lib/commons-codec-1.3.jar:lib/commons-logging-1.1.1.jar:lib/google-auth-library-credentials-0.3.0.jar:lib/google-auth-library-oauth2-http-0.3.0.jar:lib/google-http-client-1.19.0.jar:lib/google-http-client-jackson2-1.19.0.jar:lib/grpc-all-0.9.0.jar:lib/grpc-auth-0.9.0.jar:lib/grpc-core-0.9.0.jar:lib/grpc-netty-0.9.0.jar:lib/grpc-okhttp-0.9.0.jar:lib/grpc-protobuf-0.9.0.jar:lib/grpc-protobuf-nano-0.9.0.jar:lib/grpc-stub-0.9.0.jar:lib/guava-18.0.jar:lib/hamcrest-core-1.3.jar:lib/hpack-0.10.1.jar:lib/httpclient-4.0.1.jar:lib/httpcore-4.0.1.jar:lib/jackson-core-2.1.3.jar:lib/jsr305-3.0.0.jar:lib/junit-4.11.jar:lib/junit-4.12.jar:lib/mockito-all-1.10.19.jar:lib/mockito-core-1.10.19.jar:lib/netty-buffer-4.1.0.Beta6.jar:lib/netty-codec-4.1.0.Beta6.jar:lib/netty-codec-http2-4.1.0.Beta6.jar:lib/netty-codec-http-4.1.0.Beta6.jar:lib/netty-common-4.1.0.Beta6.jar:lib/netty-handler-4.1.0.Beta6.jar:lib/netty-resolver-4.1.0.Beta6.jar:lib/netty-transport-4.1.0.Beta6.jar:lib/objenesis-2.1.jar:lib/okhttp-2.4.0.jar:lib/okio-1.4.0.jar:lib/protobuf-java-3.0.0-beta-1.jar:lib/protobuf-javanano-3.0.0-alpha-4.jar -d bin src/org/odmg/*.java src/rasj/*.java src/rasj/global/*.java src/rasj/clientcommhttp/*.java src/rasj/odmg/*.java src/rasj/rnp/*.java src/org/rasdaman/rasnet/communication/*.java src/org/rasdaman/rasnet/service/*.java src/org/rasdaman/rasnet/util/*.java
javac: file not found: src/org/rasdaman/rasnet/service/*.java
Usage: javac <options> <source files>
use -help for a list of possible options

comment:8 in reply to: ↑ 7 Changed 21 months ago by gmerticariu

Replying to dmisev:

Now I'm getting this:

make[2]: Entering directory '/home/dimitar/projects/rasdaman/community/src/java'
cp src/rasj/RasImplementation.java.rasnet src/rasj/RasImplementation.java
Making all in ../rasnet
make[3]: Entering directory '/home/dimitar/projects/rasdaman/community/src/rasnet'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/dimitar/projects/rasdaman/community/src/rasnet'
make[3]: Entering directory '/home/dimitar/projects/rasdaman/community/src/java'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/dimitar/projects/rasdaman/community/src/java'
mkdir -p bin dist
javac -cp lib/commons-codec-1.3.jar:lib/commons-logging-1.1.1.jar:lib/google-auth-library-credentials-0.3.0.jar:lib/google-auth-library-oauth2-http-0.3.0.jar:lib/google-http-client-1.19.0.jar:lib/google-http-client-jackson2-1.19.0.jar:lib/grpc-all-0.9.0.jar:lib/grpc-auth-0.9.0.jar:lib/grpc-core-0.9.0.jar:lib/grpc-netty-0.9.0.jar:lib/grpc-okhttp-0.9.0.jar:lib/grpc-protobuf-0.9.0.jar:lib/grpc-protobuf-nano-0.9.0.jar:lib/grpc-stub-0.9.0.jar:lib/guava-18.0.jar:lib/hamcrest-core-1.3.jar:lib/hpack-0.10.1.jar:lib/httpclient-4.0.1.jar:lib/httpcore-4.0.1.jar:lib/jackson-core-2.1.3.jar:lib/jsr305-3.0.0.jar:lib/junit-4.11.jar:lib/junit-4.12.jar:lib/mockito-all-1.10.19.jar:lib/mockito-core-1.10.19.jar:lib/netty-buffer-4.1.0.Beta6.jar:lib/netty-codec-4.1.0.Beta6.jar:lib/netty-codec-http2-4.1.0.Beta6.jar:lib/netty-codec-http-4.1.0.Beta6.jar:lib/netty-common-4.1.0.Beta6.jar:lib/netty-handler-4.1.0.Beta6.jar:lib/netty-resolver-4.1.0.Beta6.jar:lib/netty-transport-4.1.0.Beta6.jar:lib/objenesis-2.1.jar:lib/okhttp-2.4.0.jar:lib/okio-1.4.0.jar:lib/protobuf-java-3.0.0-beta-1.jar:lib/protobuf-javanano-3.0.0-alpha-4.jar -d bin src/org/odmg/*.java src/rasj/*.java src/rasj/global/*.java src/rasj/clientcommhttp/*.java src/rasj/odmg/*.java src/rasj/rnp/*.java src/org/rasdaman/rasnet/communication/*.java src/org/rasdaman/rasnet/service/*.java src/org/rasdaman/rasnet/util/*.java
javac: file not found: src/org/rasdaman/rasnet/service/*.java
Usage: javac <options> <source files>
use -help for a list of possible options

That's on me. I will fix it on Wed when I return. In the meantime, remove the generated grpc .cc and .h files from rasnet and it will work. The clean in rasnet is not cleaning all the files.

comment:9 Changed 21 months ago by dmisev

Can you be more specific which generated files should be removed?

comment:10 Changed 21 months ago by gmerticariu

Adding the below code in common/src/Makefile.am will fix the problem.

clean: clean-am
        rm -f grpc/messages/*.h
        rm -f grpc/messages/*.cc

comment:11 Changed 21 months ago by dmisev

great, I'll make a patch.

comment:12 follow-up: Changed 21 months ago by dmisev

Hmm now I have a bunch of errors like this:

src/org/rasdaman/rasnet/communication/RasmgrKeepAlive.java:26: error: cannot find symbol
import org.rasdaman.rasnet.service.RasMgrClientServiceGrpc;
                                  ^
  symbol:   class RasMgrClientServiceGrpc
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/communication/RasmgrKeepAlive.java:27: error: cannot find symbol
import org.rasdaman.rasnet.service.RasmgrClientService;
                                  ^
  symbol:   class RasmgrClientService
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/communication/RasmgrKeepAlive.java:41: error: package RasMgrClientServiceGrpc does not exist
    private final RasMgrClientServiceGrpc.RasMgrClientServiceBlockingStub rasmgrService;
                                         ^
src/org/rasdaman/rasnet/communication/RasmgrKeepAlive.java:54: error: package RasMgrClientServiceGrpc does not exist
    public RasmgrKeepAlive(RasMgrClientServiceGrpc.RasMgrClientServiceBlockingStub rasmgrService,
                                                  ^
src/org/rasdaman/rasnet/communication/RasRasnetImplementation.java:31: error: package org.rasdaman.rasnet.service.ClientRasServerService does not exist
import org.rasdaman.rasnet.service.ClientRasServerService.*;
^
src/org/rasdaman/rasnet/communication/RasRasnetImplementation.java:32: error: cannot find symbol
import org.rasdaman.rasnet.service.ClientRassrvrServiceGrpc;
                                  ^
  symbol:   class ClientRassrvrServiceGrpc
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/communication/RasRasnetImplementation.java:34: error: cannot find symbol
import org.rasdaman.rasnet.service.RasMgrClientServiceGrpc;
                                  ^
  symbol:   class RasMgrClientServiceGrpc
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/communication/RasRasnetImplementation.java:35: error: package org.rasdaman.rasnet.service.RasmgrClientService does not exist
import org.rasdaman.rasnet.service.RasmgrClientService.*;

...

comment:13 in reply to: ↑ 12 Changed 21 months ago by gmerticariu

Replying to dmisev:

Hmm now I have a bunch of errors like this:

src/org/rasdaman/rasnet/communication/RasmgrKeepAlive.java:26: error: cannot find symbol
import org.rasdaman.rasnet.service.RasMgrClientServiceGrpc;
                                  ^
  symbol:   class RasMgrClientServiceGrpc
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/communication/RasmgrKeepAlive.java:27: error: cannot find symbol
import org.rasdaman.rasnet.service.RasmgrClientService;
                                  ^
  symbol:   class RasmgrClientService
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/communication/RasmgrKeepAlive.java:41: error: package RasMgrClientServiceGrpc does not exist
    private final RasMgrClientServiceGrpc.RasMgrClientServiceBlockingStub rasmgrService;
                                         ^
src/org/rasdaman/rasnet/communication/RasmgrKeepAlive.java:54: error: package RasMgrClientServiceGrpc does not exist
    public RasmgrKeepAlive(RasMgrClientServiceGrpc.RasMgrClientServiceBlockingStub rasmgrService,
                                                  ^
src/org/rasdaman/rasnet/communication/RasRasnetImplementation.java:31: error: package org.rasdaman.rasnet.service.ClientRasServerService does not exist
import org.rasdaman.rasnet.service.ClientRasServerService.*;
^
src/org/rasdaman/rasnet/communication/RasRasnetImplementation.java:32: error: cannot find symbol
import org.rasdaman.rasnet.service.ClientRassrvrServiceGrpc;
                                  ^
  symbol:   class ClientRassrvrServiceGrpc
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/communication/RasRasnetImplementation.java:34: error: cannot find symbol
import org.rasdaman.rasnet.service.RasMgrClientServiceGrpc;
                                  ^
  symbol:   class RasMgrClientServiceGrpc
  location: package org.rasdaman.rasnet.service
src/org/rasdaman/rasnet/communication/RasRasnetImplementation.java:35: error: package org.rasdaman.rasnet.service.RasmgrClientService does not exist
import org.rasdaman.rasnet.service.RasmgrClientService.*;

...

did you run make clean && make on rasnet and common?

comment:14 Changed 21 months ago by dmisev

ok I did make clean on rasnet as well and it compiled now.

I'm puzzled though: why do I need to run any make clean in the first place? I started from a new clone. Something seems broken I'd say.

comment:15 Changed 21 months ago by dmisev

Ah probably they got generated before I updated grpc, that would make sense.

comment:16 Changed 21 months ago by gmerticariu

Yes, but you have a point. We should generate the java messages if the the files are missing. I will update the make file in java to check whether they exist, and if not they will be generated.

comment:17 Changed 21 months ago by dmisev

  • Component changed from undecided to rasnet
  • Milestone set to 9.2

comment:18 Changed 20 months ago by gmerticariu

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.