Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5228 closed defect (fixed)

Fails to build with protobuf 2.6.0

Reported by: sebastic Owned by: brett@…
Priority: blocker Milestone:
Component: osmosis Version:
Keywords: Cc: sebastic

Description

osmosis fails to build on Debian unstable (as reported in Debian Bug #761562) where the protobuf package was recently upgraded from 2.5.0 to 2.6.0.

It looks like the parseUnknownField method has changed its signature:

:osmosis-osm-binary:compileJava/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:578: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:1309: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:1866: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:2630: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:3334: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:3802: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:4532: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:5151: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:5669: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:6410: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:7171: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java:8058: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java:369: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
/home/bas/git/pkg-grass/osmosis/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java:868: error: method parseUnknownField in class Builder<MessageType,BuilderType> cannot be applied to given types;
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                   ^
  required: CodedInputStream,CodedOutputStream,ExtensionRegistryLite,int
  found: CodedInputStream,ExtensionRegistryLite,int
  reason: actual and formal argument lists differ in length
  where MessageType,BuilderType are type-variables:
    MessageType extends GeneratedMessageLite declared in class Builder
    BuilderType extends Builder declared in class Builder
14 errors
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':osmosis-osm-binary:compileJava'.
> Compilation failed; see the compiler error output for details.

* 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: 1 mins 6.258 secs

Change History (3)

comment:1 Changed 4 years ago by sebastic

  • Cc sebastic added
  • Priority changed from minor to blocker

comment:2 Changed 4 years ago by sebastic

  • Resolution set to fixed
  • Status changed from new to closed

Supporting protobuf 2.6.0 turned out to be easier than expected.

The code generated by osmosis-protoc.sh fixed the build failure.

comment:3 Changed 4 years ago by brett@…

I've updated Osmosis to 2.6.0. I performed the same step as yourself, but I've checked the newly generated files into the source tree so that others can also use them.

At some point I'll need to generate a new release and upload the jars to Maven Central.

Note: See TracTickets for help on using tickets.