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
Description
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
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
openstreetmap-trac commentedon Jul 23, 2021
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 commentedon Jul 23, 2021
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.