phenopacket-schema icon indicating copy to clipboard operation
phenopacket-schema copied to clipboard

[ERROR] PROTOC FAILED: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

Open xiaofengleo opened this issue 1 year ago • 12 comments

After clone the repository, I tried to run mvn compile, but got following errors saying Expected top-level statement (e.g. "message"). Please see details below: I google but found no solution. Does any one have a clue? Thank you in advance.

mvn compile [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Detecting the operating system and CPU architecture [INFO] ------------------------------------------------------------------------ [INFO] os.detected.name: windows [INFO] os.detected.arch: x86_32 [INFO] os.detected.version: 10.0 [INFO] os.detected.version.major: 10 [INFO] os.detected.version.minor: 0 [INFO] os.detected.classifier: windows-x86_32 [INFO] [INFO] ----------------< org.phenopackets:phenopacket-schema >----------------- [INFO] Building phenopacket-schema 2.0.2 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- protobuf-maven-plugin:0.6.1:compile (default) @ phenopacket-schema --- [INFO] Compiling 17 proto file(s) to C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\target\generated-sources\protobuf\java [ERROR] PROTOC FAILED: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrs\v1\vrs.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrsatile\v1\vrsatile.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\base.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\interpretation.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\phenopackets.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\base.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\biosample.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\disease.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\genome.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\individual.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\interpretation.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\measurement.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\medical_action.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\meta_data.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\pedigree.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\phenotypic_feature.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\phenopackets.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.938 s [INFO] Finished at: 2022-07-28T22:54:09+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project phenopacket-schema: protoc did not exit cleanly. Review output for more information. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

xiaofengleo avatar Jul 28 '22 20:07 xiaofengleo

Hi @xiaofengleo did you pull in the git sub-modules before building? https://github.com/phenopackets/phenopacket-schema#git-submodules

julesjacobsen avatar Jul 29 '22 09:07 julesjacobsen

Hi @julesjacobsen , I run the git submodule cmd, and then again mvn compile, then get same error. Details shown below.

PS C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema> git submodule update --init --recursive PS C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema> PS C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema> mvn compile [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Detecting the operating system and CPU architecture [INFO] ------------------------------------------------------------------------ [INFO] os.detected.name: windows [INFO] os.detected.arch: x86_32 [INFO] os.detected.version: 10.0 [INFO] os.detected.version.major: 10 [INFO] os.detected.version.minor: 0 [INFO] os.detected.classifier: windows-x86_32 [INFO] [INFO] ----------------< org.phenopackets:phenopacket-schema >----------------- [INFO] Building phenopacket-schema 2.0.2 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- protobuf-maven-plugin:0.6.1:compile (default) @ phenopacket-schema --- [INFO] Compiling 17 proto file(s) to C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\target\generated-sources\protobuf\java [ERROR] PROTOC FAILED: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrs\v1\vrs.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrsatile\v1\vrsatile.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\base.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\interpretation.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\phenopackets.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\base.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\biosample.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\disease.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\genome.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\individual.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\interpretation.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\measurement.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\medical_action.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\meta_data.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\pedigree.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\phenotypic_feature.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\phenopackets.proto [0:0]: ga4gh/vrs/v1/vrs.proto:3:1: Expected top-level statement (e.g. "message").

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.417 s [INFO] Finished at: 2022-08-02T10:10:56+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project phenopacket-schema: protoc did not exit cleanly. Review output for more information. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

xiaofengleo avatar Aug 02 '22 08:08 xiaofengleo

what is the contents of the file phenopacket-schema/src/main/proto/ga4gh/vrs/v1/vrs.proto does it exist at all? It should look like this:

syntax = "proto3";

package org.ga4gh.vrs.v1;

option java_multiple_files = true;
option java_package = "org.ga4gh.vrs.v1";

message Variation {
   oneof variation {
      Allele allele = 1;
      Haplotype haplotype = 2;
      CopyNumber copy_number = 3;
      Text text = 4;
      VariationSet variation_set = 5;
   }
}

message MolecularVariation {
   oneof molecular_variation {
      Allele allele = 1;
      Haplotype haplotype = 2;
   }
}

// plus a load more...

if it looks like this:

../../../../../vrs-protobuf/schema/vrs.proto

the submodule hasn't been imported correctly. I'm not sure if this is a Windows thing or not.

If you're using Java, there is a pre-built jar file on maven central. There are also pre-built python artefacts in the releases page

julesjacobsen avatar Aug 02 '22 08:08 julesjacobsen

Hi @julesjacobsen Yes the file content has two lines:

syntax = "proto3";

../../../../../vrs-protobuf/schema/vrs.proto

I revised it according to your suggestion, good news is that this error was resolved, but get some new errors. Seems still missing something somewhere. Please see below for detail.

PS C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema> mvn compile [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Detecting the operating system and CPU architecture [INFO] ------------------------------------------------------------------------ [INFO] os.detected.name: windows [INFO] os.detected.arch: x86_32 [INFO] os.detected.version: 10.0 [INFO] os.detected.version.major: 10 [INFO] os.detected.version.minor: 0 [INFO] os.detected.classifier: windows-x86_32 [INFO] [INFO] ----------------< org.phenopackets:phenopacket-schema >----------------- [INFO] Building phenopacket-schema 2.0.2 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- protobuf-maven-plugin:0.6.1:compile (default) @ phenopacket-schema --- [INFO] Compiling 17 proto file(s) to C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\target\generated-sources\protobuf\java [ERROR] PROTOC FAILED: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrs\v1\vrs.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrsatile\v1\vrsatile.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\base.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\interpretation.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\phenopackets.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\base.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\biosample.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\disease.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\genome.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\individual.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\interpretation.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\measurement.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\medical_action.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\meta_data.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\pedigree.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\phenotypic_feature.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\phenopackets.proto [0:0]: ga4gh/vrs/v1/vrs.proto:10:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:11:7: "Haplotype" is not defined. ga4gh/vrs/v1/vrs.proto:12:7: "CopyNumber" is not defined. ga4gh/vrs/v1/vrs.proto:13:7: "Text" is not defined. ga4gh/vrs/v1/vrs.proto:14:7: "VariationSet" is not defined. ga4gh/vrs/v1/vrs.proto:20:7: "Allele" is not defined. ga4gh/vrs/v1/vrs.proto:21:7: "Haplotype" is not defined.

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.268 s [INFO] Finished at: 2022-08-02T10:59:51+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project phenopacket-schema: protoc did not exit cleanly. Review output for more information. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

xiaofengleo avatar Aug 02 '22 09:08 xiaofengleo

Did you add the first line yourself?

It's failing to compile the protobuf because the vrs.proto file isn't protobuf, it's a symbolic link to a separate GitHub repository which needs importing.

I suggest you delete the entire phenopacket-schema directory and start again with the whole list of incantations:

git clone --recursive https://github.com/phenopackets/phenopacket-schema.git
cd phenopacket-schema
./mvnw install

I can confirm that this works on Linux, if you've adapted this for windows and it's failing, I can't help much more, sorry. You could try using the WSL to do the git clone and submodules part.

julesjacobsen avatar Aug 02 '22 09:08 julesjacobsen

Also using IntelliJ 2018.3 or above cloning the repository as a New -> Project from Version Control and then building it in the IDE also works without an issue on Linux.

julesjacobsen avatar Aug 02 '22 09:08 julesjacobsen

Hi @julesjacobsen , thanks for your suggestion. Unfortunately it reproduce the error mentioned above even I follow exactly your instruction. Please see details below.

C:\Users\manZ515245\Documents\GitHub\Xomics> git clone https://github.com/phenopackets/phenopacket-schema.git Cloning into 'phenopacket-schema'... remote: Enumerating objects: 6432, done. remote: Counting objects: 100% (969/969), done. remote: Compressing objects: 100% (271/271), done. Receiving objects: 100% (6432/6432), 1.42 MiB | 5.18 MiB/s, done.ed 5463Receiving objects: 100% (6432/6432)

Resolving deltas: 100% (2916/2916), done.

PS C:\Users\manZ515245\Documents\GitHub\Xomics> cd .\phenopacket-schema
PS C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema> git submodule update --init --recursive Submodule 'src/vrs-protobuf' (https://github.com/ga4gh/vrs-protobuf.git) registered for path 'src/vrs-protobuf' Cloning into 'C:/Users/manZ515245/Documents/GitHub/Xomics/phenopacket-schema/src/vrs-protobuf'... Submodule path 'src/vrs-protobuf': checked out 'd045bb0c65152a0cb32177dfc21148cc13d40fbe' Submodule 'vrs' (https://github.com/ga4gh/vrs.git) registered for path 'src/vrs-protobuf/vrs' Cloning into 'C:/Users/manZ515245/Documents/GitHub/Xomics/phenopacket-schema/src/vrs-protobuf/vrs'... Submodule path 'src/vrs-protobuf/vrs': checked out '76542a903b913110e67811885a8958625bbc3aae'

After running following cmd, the syntax = "proto3" or syntax = "proto2" error appeared again.

PS C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema> .\mvnw install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Detecting the operating system and CPU architecture [INFO] ------------------------------------------------------------------------ [INFO] os.detected.name: windows [INFO] os.detected.arch: x86_32 [INFO] os.detected.version: 10.0 [INFO] os.detected.version.major: 10 [INFO] os.detected.version.minor: 0 [INFO] os.detected.classifier: windows-x86_32 [INFO] [INFO] ----------------< org.phenopackets:phenopacket-schema >----------------- [INFO] Building phenopacket-schema 2.0.2 [INFO] --------------------------------[ jar ]--------------------------------- Downloading from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar Downloading from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.13.3/jackson-databind-2.13.3.jar Downloading from central: https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar Downloading from central: https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.5.1/error_prone_annotations-2.5.1.jar Downloading from central: https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.20.1/protobuf-java-util-3.20.1.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.5.1/error_prone_annotations-2.5.1.jar (14 kB at 14 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.13.3/jackson-annotations-2.13.3.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.13.3/jackson-annotations-2.13.3.jar (76 kB at 48 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.13.3/jackson-core-2.13.3.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.20.1/protobuf-java-util-3.20.1.jar (74 kB at 44 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.13.3/jackson-dataformat-yaml-2.13.3.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.13.3/jackson-dataformat-yaml-2.13.3.jar (52 kB at 26 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.30/snakeyaml-1.30.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.13.3/jackson-core-2.13.3.jar (375 kB at 116 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/ca/uhn/hapi/fhir/hapi-fhir-base/5.7.2/hapi-fhir-base-5.7.2.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar (258 kB at 79 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.13.1/jackson-datatype-jsr310-2.13.1.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.30/snakeyaml-1.30.jar (332 kB at 96 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.13.1/jackson-datatype-jsr310-2.13.1.jar (121 kB at 31 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-text/1.9/commons-text-1.9.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar (2.7 MB at 588 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.15/commons-codec-1.15.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-text/1.9/commons-text-1.9.jar (216 kB at 43 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.13.3/jackson-databind-2.13.3.jar (1.5 MB at 305 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.7.33/jcl-over-slf4j-1.7.33.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.7.33/jcl-over-slf4j-1.7.33.jar (17 kB at 3.2 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/ca/uhn/hapi/fhir/hapi-fhir-structures-r4/5.7.2/hapi-fhir-structures-r4-5.7.2.jar Downloaded from central: https://repo.maven.apache.org/maven2/ca/uhn/hapi/fhir/hapi-fhir-structures-r4/5.7.2/hapi-fhir-structures-r4-5.7.2.jar (27 kB at 4.9 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.8.1/okhttp-3.8.1.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar (587 kB at 96 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.13.0/okio-1.13.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.15/commons-codec-1.15.jar (354 kB at 57 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/ca/uhn/hapi/fhir/org.hl7.fhir.utilities/5.6.27/org.hl7.fhir.utilities-5.6.27.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.13.0/okio-1.13.0.jar (82 kB at 12 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/ca/uhn/hapi/fhir/org.hl7.fhir.r4/5.6.27/org.hl7.fhir.r4-5.6.27.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.8.1/okhttp-3.8.1.jar (398 kB at 55 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/ca/uhn/hapi/fhir/hapi-fhir-base/5.7.2/hapi-fhir-base-5.7.2.jar (1.0 MB at 138 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar (327 kB at 43 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/ca/uhn/hapi/fhir/org.hl7.fhir.utilities/5.6.27/org.hl7.fhir.utilities-5.6.27.jar (522 kB at 68 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/ca/uhn/hapi/fhir/org.hl7.fhir.r4/5.6.27/org.hl7.fhir.r4-5.6.27.jar (12 MB at 1.3 MB/s) [INFO] [INFO] --- protobuf-maven-plugin:0.6.1:compile (default) @ phenopacket-schema --- [INFO] Compiling 17 proto file(s) to C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\target\generated-sources\protobuf\java [ERROR] PROTOC FAILED: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrs\v1\vrs.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrsatile\v1\vrsatile.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\base.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\interpretation.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\phenopackets.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\base.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\biosample.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\disease.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\genome.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\individual.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\interpretation.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\measurement.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\medical_action.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\meta_data.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\pedigree.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\phenotypic_feature.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\phenopackets.proto [0:0]: [libprotobuf WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:645] No syntax specified for the proto file: ga4gh/vrs/v1/vrs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) ga4gh/vrs/v1/vrs.proto:1:1: Expected top-level statement (e.g. "message").

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 20.618 s [INFO] Finished at: 2022-08-02T11:35:53+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project phenopacket-schema: protoc did not exit cleanly. Review output for more information. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Then I again add syntax = "proto3"; to the phenopacket-schema\src\main\proto\ga4gh\vrs\v1\vrs.proto file. The vrs.proto file looks like: syntax = "proto3"; ../../../../../vrs-protobuf/schema/vrs.proto

And then run .\mvnw install again, but it reproduced the error Expected top-level statement (e.g. "message"). again

PS C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema> .\mvnw install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Detecting the operating system and CPU architecture [INFO] ------------------------------------------------------------------------ [INFO] os.detected.name: windows [INFO] os.detected.arch: x86_32 [INFO] os.detected.version: 10.0 [INFO] os.detected.version.major: 10 [INFO] os.detected.version.minor: 0 [INFO] os.detected.classifier: windows-x86_32 [INFO] [INFO] ----------------< org.phenopackets:phenopacket-schema >----------------- [INFO] Building phenopacket-schema 2.0.2 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- protobuf-maven-plugin:0.6.1:compile (default) @ phenopacket-schema --- [INFO] Compiling 17 proto file(s) to C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\target\generated-sources\protobuf\java [ERROR] PROTOC FAILED: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrs\v1\vrs.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\ga4gh\vrsatile\v1\vrsatile.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\base.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\interpretation.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v1\phenopackets.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\base.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\biosample.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\disease.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\genome.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\individual.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\interpretation.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\measurement.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\medical_action.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\meta_data.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\pedigree.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\core\phenotypic_feature.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[ERROR] C:\Users\manZ515245\Documents\GitHub\Xomics\phenopacket-schema\src\main\proto\phenopackets\schema\v2\phenopackets.proto [0:0]: ga4gh/vrs/v1/vrs.proto:2:1: Expected top-level statement (e.g. "message").

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.093 s [INFO] Finished at: 2022-08-02T11:37:54+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project phenopacket-schema: protoc did not exit cleanly. Review output for more information. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

xiaofengleo avatar Aug 02 '22 09:08 xiaofengleo

OK, it must be a symbolic link problem.

You don't need to add syntax = "proto3"; to the phenopacket-schema\src\main\proto\ga4gh\vrs\v1\vrs.proto file. it should look like this without any intervention on your part:

syntax = "proto3";

package org.ga4gh.vrs.v1;

option java_multiple_files = true;
option java_package = "org.ga4gh.vrs.v1";

message Variation {
   oneof variation {
      Allele allele = 1;
      Haplotype haplotype = 2;
      CopyNumber copy_number = 3;
      Text text = 4;
      VariationSet variation_set = 5;
   }
}

message MolecularVariation {
   oneof molecular_variation {
      Allele allele = 1;
      Haplotype haplotype = 2;
   }
}

// plus a load more...

Why are you trying to clone and build the repo?

julesjacobsen avatar Aug 02 '22 09:08 julesjacobsen

We are working on a dataset from TWOC project, where there are some phenotype data that we would like to use phenopacket to encode into RDF. Are we using the right tools?

xiaofengleo avatar Aug 02 '22 10:08 xiaofengleo

Yes, but if you're using Java to do this there is a pre-built jar file on maven central already, so you don't need to build this yourself. If you're using Python, there is a pre-built python file on the releases page.

Although note that the RDF part will need to come from elsewhere as this will simply give you the classes with which to encode the data as a phenopacket and the ability to convert to JSON/YAML.

julesjacobsen avatar Aug 02 '22 10:08 julesjacobsen

Yes, but if you're using Java to do this there is a pre-built jar file on maven central already, so you don't need to build this yourself. If you're using Python, there is a pre-built python file on the releases page.

Although note that the RDF part will need to come from elsewhere as this will simply give you the classes with which to encode the data as a phenopacket and the ability to convert to JSON/YAML.

Hi @julesjacobsen , can you point me explicitly to the pre-built jar file or the pre-built python file? I mainly looking at the example page at https://phenopacket-schema.readthedocs.io/en/latest/examples.html

Thank you.

xiaofengleo avatar Aug 03 '22 10:08 xiaofengleo

Maven central: https://search.maven.org/artifact/org.phenopackets/phenopacket-schema/2.0.2/jar (also linked from top of readme and in https://phenopacket-schema.readthedocs.io/en/latest/java-build.html#rstjavabuild)

GitHub releases page from the main repo page: https://github.com/phenopackets/phenopacket-schema/releases

julesjacobsen avatar Aug 03 '22 10:08 julesjacobsen