Opened 5 years ago

Closed 5 years ago

#4419 closed defect (fixed)

protobuf-c required version?

Reported by: pramsey Owned by: Algunenano
Priority: high Milestone: PostGIS 3.0.0
Component: postgis Version: master
Keywords: Cc:

Description

When trying to build using default protobuf-c-devel on AWS linux, build dies on protobuf module:

/usr/bin/protoc-c --c_out=. vector_tile.proto
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I../liblwgeom -std=gnu99 -g -O2 -fno-math-errno -fno-signed-zeros -I../libpgcommon -I../deps/wagyu -I../deps/uthash/include  -I/usr/local/include  -I/usr/local/include -I/usr/include/libxml2  -I/usr/include/json-c      -fPIC -DPIC -I. -I./ -I/data/pgsql/12/include/server -I/data/pgsql/12/include/internal  -D_GNU_SOURCE   -c -o vector_tile.pb-c.o vector_tile.pb-c.c
/usr/bin/protoc-c --c_out=. geobuf.proto
geobuf.proto:9:5: Expected "required", "optional", or "repeated".
geobuf.proto:9:21: Missing field number.
geobuf.proto:18:9: Expected "required", "optional", or "repeated".
geobuf.proto:18:23: Missing field number.
geobuf.proto:57:9: Expected "required", "optional", or "repeated".
geobuf.proto:57:26: Missing field number.
make[1]: *** [geobuf.pb-c.c] Error 1
make[1]: Leaving directory `/home/ec2-user/postgis/postgis'
make: *** [all] Error 1

The versions installed for this distro are

[ec2-user@ip-172-31-31-163 postgis]$ rpm -qa | grep protobuf
protobuf-c-compiler-1.0.2-3.amzn2.0.1.x86_64
protobuf-2.5.0-8.amzn2.0.2.x86_64
protobuf-compiler-2.5.0-8.amzn2.0.2.x86_64
protobuf-c-devel-1.0.2-3.amzn2.0.1.x86_64
protobuf-c-1.0.2-3.amzn2.0.1.x86_64

If there's a required version level we should be testing for it in ./configure

Change History (5)

comment:1 by Algunenano, 5 years ago

From configure.ac: 1.1.0

        	PKG_CHECK_MODULES([PROTOBUFC], [libprotobuf-c >= 1.1.0], [
                    HAVE_PROTOBUF=yes;
                    PROTOBUF_CPPFLAGS=$PROTOBUFC_CFLAGS;
                    PROTOBUF_LDFLAGS=$PROTOBUFC_LIBS
                ],
                [HAVE_PROTOBUF=no])

I don't know why, I'd look into the original MVT or geobuf PRs.

comment:2 by Algunenano, 5 years ago

Explanation:

protobuf-c 1.1.0 requires protobuf 2.6 that added oneof features, which are used in geobuf.proto.

comment:3 by pramsey, 5 years ago

In 17646:

Use protobuf version to enable/disable mvt/geobuf
References #4419

comment:4 by pramsey, 5 years ago

In 17647:

Use protobuf version to enable/disable mvt/geobuf
References #4419

comment:5 by pramsey, 5 years ago

Resolution: fixed
Status: assignedclosed

In 17648:

Use protobuf version to enable/disable mvt/geobuf
Closes #4419

Note: See TracTickets for help on using tickets.