Skip to content
This repository was archived by the owner on Jul 24, 2021. It is now read-only.
This repository was archived by the owner on Jul 24, 2021. It is now read-only.

Fails to build with protobuf 2.6.0 #5227

Closed
@openstreetmap-trac

Description

@openstreetmap-trac

Reporter: sebastic
[Submitted to the original trac issue database at 2.13pm, Thursday, 11th September 2014]

osmosis fails to build on Debian unstable (as reported in [https://bugs.debian.org/761562 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

Activity

openstreetmap-trac

openstreetmap-trac commented on Jul 23, 2021

@openstreetmap-trac
Author

Author: sebastic
[Added to the original trac issue at 8.15pm, Saturday, 27th September 2014]

Supporting protobuf 2.6.0 turned out to be easier than expected.

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

openstreetmap-trac

openstreetmap-trac commented on Jul 23, 2021

@openstreetmap-trac
Author

Author: brett[at]bretth.com
[Added to the original trac issue at 11.32am, Wednesday, 1st October 2014]

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @openstreetmap-trac

      Issue actions

        Fails to build with protobuf 2.6.0 · Issue #5227 · openstreetmap/trac-tickets