[Tile-serving] [osm2pgsql] Non-standard protobuf-c installation build error (#212)
Gh0stFas
notifications at github.com
Sun Nov 9 00:33:59 UTC 2014
During my build on Centos 6.5, I received the following error:
```
libtool: compile: g++ -DHAVE_CONFIG_H -I. -pthread -I/usr/include -I/usr/include/libxml2 -I/usr/include -I/usr/include -I/usr/include -DOSM2PGSQL_DATADIR=\"/home/myhome/osm/src/osm2pgsql/install/share/osm2pgsql\" -Igeos-fallback -pthread -I/home/myhome/osm/src/boost_1_57_0 -g -O2 -MT parse.lo -MD -MP -MF .deps/parse.Tpo -c parse.cpp -fPIC -DPIC -o .libs/parse.o
In file included from parse-pbf.hpp:34,
from parse.cpp:7:
fileformat.pb-c.h:7:35: error: protobuf-c/protobuf-c.h: No such file or directory
fileformat.pb-c.h:12:3: error: #error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
In file included from parse-pbf.hpp:35,
from parse.cpp:7:
osmformat.pb-c.h:12:3: error: #error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
In file included from parse-pbf.hpp:34,
from parse.cpp:7:
fileformat.pb-c.h:18: error: expected constructor, destructor, or type conversion before ‘typedef’
fileformat.pb-c.h:29: error: ‘ProtobufCMessage’ does not name a type
fileformat.pb-c.h:30: error: ‘protobuf_c_boolean’ does not name a type
fileformat.pb-c.h:31: error: ‘ProtobufCBinaryData’ does not name a type
fileformat.pb-c.h:32: error: ‘protobuf_c_boolean’ does not name a type
fileformat.pb-c.h:34: error: ‘protobuf_c_boolean’ does not name a type
fileformat.pb-c.h:35: error: ‘ProtobufCBinaryData’ does not name a type
fileformat.pb-c.h:36: error: ‘protobuf_c_boolean’ does not name a type
fileformat.pb-c.h:37: error: ‘ProtobufCBinaryData’ does not name a type
fileformat.pb-c.h:38: error: ‘protobuf_c_boolean’ does not name a type
fileformat.pb-c.h:39: error: ‘ProtobufCBinaryData’ does not name a type
fileformat.pb-c.h:48: error: ‘ProtobufCMessage’ does not name a type
fileformat.pb-c.h:50: error: ‘protobuf_c_boolean’ does not name a type
fileformat.pb-c.h:51: error: ‘ProtobufCBinaryData’ does not name a type
fileformat.pb-c.h:61: error: variable or field ‘blob__init’ declared void
fileformat.pb-c.h:61: error: ‘Blob’ was not declared in this scope
fileformat.pb-c.h:61: error: ‘message’ was not declared in this scope
fileformat.pb-c.h:63: error: ISO C++ forbids declaration of ‘Blob’ with no type
fileformat.pb-c.h:63: error: expected ‘,’ or ‘...’ before ‘*’ token
fileformat.pb-c.h:65: error: ISO C++ forbids declaration of ‘Blob’ with no type
fileformat.pb-c.h:65: error: expected ‘,’ or ‘...’ before ‘*’ token
fileformat.pb-c.h:68: error: ISO C++ forbids declaration of ‘Blob’ with no type
fileformat.pb-c.h:68: error: expected ‘,’ or ‘...’ before ‘*’ token
fileformat.pb-c.h:70: error: expected constructor, destructor, or type conversion before ‘*’ token
fileformat.pb-c.h:76: error: variable or field ‘blob__free_unpacked’ declared void
fileformat.pb-c.h:76: error: ‘Blob’ was not declared in this scope
fileformat.pb-c.h:76: error: ‘message’ was not declared in this scope
fileformat.pb-c.h:77: error: ‘ProtobufCAllocator’ was not declared in this scope
fileformat.pb-c.h:77: error: ‘allocator’ was not declared in this scope
fileformat.pb-c.h:88: error: ‘ProtobufCBuffer’ has not been declared
fileformat.pb-c.h:91: error: ‘ProtobufCAllocator’ was not declared in this scope
fileformat.pb-c.h:91: error: ‘allocator’ was not declared in this scope
fileformat.pb-c.h:92: error: expected primary-expression before ‘len’
fileformat.pb-c.h:93: error: expected primary-expression before ‘const’
fileformat.pb-c.h:93: error: initializer expression list treated as compound expression
fileformat.pb-c.h:96: error: ‘ProtobufCAllocator’ has not been declared
fileformat.pb-c.h:100: error: ISO C++ forbids declaration of ‘Blob’ with no type
fileformat.pb-c.h:100: error: expected ‘,’ or ‘...’ before ‘*’ token
fileformat.pb-c.h:111: error: ‘ProtobufCMessageDescriptor’ does not name a type
fileformat.pb-c.h:112: error: ‘ProtobufCMessageDescriptor’ does not name a type
fileformat.pb-c.h:114: error: ‘PROTOBUF_C__END_DECLS’ does not name a type
In file included from parse-pbf.hpp:35,
from parse.cpp:7:
osmformat.pb-c.h:38: error: expected ‘}’ before ‘PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE’
osmformat.pb-c.h:38: error: typedef ‘PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE’ is initialized (use decltype instead)
osmformat.pb-c.h:38: error: ‘RELATION__MEMBER_TYPE’ was not declared in this scope
osmformat.pb-c.h:39: error: expected constructor, destructor, or type conversion before ‘;’ token
osmformat.pb-c.h:45: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:61: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:74: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:78: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:80: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:82: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:84: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:94: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:112: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:114: error: ISO C++ forbids declaration of ‘ProtobufCBinaryData’ with no type
osmformat.pb-c.h:114: error: expected ‘;’ before ‘*’ token
osmformat.pb-c.h:123: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:124: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:126: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:128: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:130: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:132: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:142: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:161: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:169: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:171: error: ‘protobuf_c_boolean’ does not name a type
osmformat.pb-c.h:181: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:198: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:216: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:233: error: ‘ProtobufCMessage’ does not name a type
osmformat.pb-c.h:245: error: ISO C++ forbids declaration of ‘Relation__MemberType’ with no type
osmformat.pb-c.h:245: error: expected ‘;’ before ‘*’ token
osmformat.pb-c.h:254: error: variable or field ‘header_block__init’ declared void
osmformat.pb-c.h:254: error: ‘HeaderBlock’ was not declared in this scope
osmformat.pb-c.h:254: error: ‘message’ was not declared in this scope
osmformat.pb-c.h:256: error: ISO C++ forbids declaration of ‘HeaderBlock’ with no type
osmformat.pb-c.h:256: error: expected ‘,’ or ‘...’ before ‘*’ token
osmformat.pb-c.h:258: error: ISO C++ forbids declaration of ‘HeaderBlock’ with no type
osmformat.pb-c.h:258: error: expected ‘,’ or ‘...’ before ‘*’ token
osmformat.pb-c.h:261: error: ISO C++ forbids declaration of ‘HeaderBlock’ with no type
osmformat.pb-c.h:261: error: expected ‘,’ or ‘...’ before ‘*’ token
osmformat.pb-c.h:263: error: expected constructor, destructor, or type conversion before ‘*’ token
osmformat.pb-c.h:269: error: variable or field ‘header_block__free_unpacked’ declared void
osmformat.pb-c.h:269: error: ‘HeaderBlock’ was not declared in this scope
osmformat.pb-c.h:269: error: ‘message’ was not declared in this scope
osmformat.pb-c.h:270: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:270: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:281: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:284: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:284: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:285: error: expected primary-expression before ‘len’
osmformat.pb-c.h:286: error: expected primary-expression before ‘const’
osmformat.pb-c.h:286: error: initializer expression list treated as compound expression
osmformat.pb-c.h:289: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:300: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:303: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:303: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:304: error: expected primary-expression before ‘len’
osmformat.pb-c.h:305: error: expected primary-expression before ‘const’
osmformat.pb-c.h:305: error: initializer expression list treated as compound expression
osmformat.pb-c.h:308: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:319: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:322: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:322: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:323: error: expected primary-expression before ‘len’
osmformat.pb-c.h:324: error: expected primary-expression before ‘const’
osmformat.pb-c.h:324: error: initializer expression list treated as compound expression
osmformat.pb-c.h:327: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:338: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:341: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:341: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:342: error: expected primary-expression before ‘len’
osmformat.pb-c.h:343: error: expected primary-expression before ‘const’
osmformat.pb-c.h:343: error: initializer expression list treated as compound expression
osmformat.pb-c.h:346: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:357: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:360: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:360: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:361: error: expected primary-expression before ‘len’
osmformat.pb-c.h:362: error: expected primary-expression before ‘const’
osmformat.pb-c.h:362: error: initializer expression list treated as compound expression
osmformat.pb-c.h:365: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:376: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:379: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:379: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:380: error: expected primary-expression before ‘len’
osmformat.pb-c.h:381: error: expected primary-expression before ‘const’
osmformat.pb-c.h:381: error: initializer expression list treated as compound expression
osmformat.pb-c.h:384: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:395: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:398: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:398: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:399: error: expected primary-expression before ‘len’
osmformat.pb-c.h:400: error: expected primary-expression before ‘const’
osmformat.pb-c.h:400: error: initializer expression list treated as compound expression
osmformat.pb-c.h:403: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:414: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:417: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:417: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:418: error: expected primary-expression before ‘len’
osmformat.pb-c.h:419: error: expected primary-expression before ‘const’
osmformat.pb-c.h:419: error: initializer expression list treated as compound expression
osmformat.pb-c.h:422: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:433: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:436: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:436: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:437: error: expected primary-expression before ‘len’
osmformat.pb-c.h:438: error: expected primary-expression before ‘const’
osmformat.pb-c.h:438: error: initializer expression list treated as compound expression
osmformat.pb-c.h:441: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:452: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:455: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:455: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:456: error: expected primary-expression before ‘len’
osmformat.pb-c.h:457: error: expected primary-expression before ‘const’
osmformat.pb-c.h:457: error: initializer expression list treated as compound expression
osmformat.pb-c.h:460: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:471: error: ‘ProtobufCBuffer’ has not been declared
osmformat.pb-c.h:474: error: ‘ProtobufCAllocator’ was not declared in this scope
osmformat.pb-c.h:474: error: ‘allocator’ was not declared in this scope
osmformat.pb-c.h:475: error: expected primary-expression before ‘len’
osmformat.pb-c.h:476: error: expected primary-expression before ‘const’
osmformat.pb-c.h:476: error: initializer expression list treated as compound expression
osmformat.pb-c.h:479: error: ‘ProtobufCAllocator’ has not been declared
osmformat.pb-c.h:483: error: ISO C++ forbids declaration of ‘HeaderBlock’ with no type
osmformat.pb-c.h:483: error: expected ‘,’ or ‘...’ before ‘*’ token
osmformat.pb-c.h:524: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:525: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:526: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:527: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:528: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:529: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:530: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:531: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:532: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:533: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:534: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:535: error: ‘ProtobufCMessageDescriptor’ does not name a type
osmformat.pb-c.h:536: error: ‘ProtobufCEnumDescriptor’ does not name a type
In file included from parse.cpp:7:
parse-pbf.hpp:36: error: expected constructor, destructor, or type conversion before ‘}’ token
parse-pbf.hpp:36: error: expected declaration before ‘}’ token
make[1]: *** [parse.lo] Error 1
```
It appears to not be able to find the proper include provided by protobuf-c. I've installed protobuf-c in a non-standard location and provided it via the configure command line like this:
./configure --with-protobuf-c=/non/standard/loc
After digging a little further it appears that the AM_CFLAGS in the generated Makefile contained the proper flag to point to my non-standard installation with -I/non/standard/loc....however, the AM_CPPFLAGS did not. I added the flag to the AM_CPPFLAGS variable and rebuilt without issue.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/212
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20141108/384b722c/attachment-0001.html>
More information about the Tile-serving
mailing list