Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Blockchain by (4.1k points)

I'm trying to install Open Transactions, the open-source project, on a debian 8. I've installed all the dependencies and am having an issue when compiling (make). The following error is showing at my terminal, even though i made sure to install the protobuf project:

In file included from /root/opentxs/src/../include/opentxs/core/OTStoragePB.hpp:64:0,
                 from /root/opentxs/src/core/OTStorage.cpp:47:
/root/opentxs/build/src/core/otprotob/Generics.pb.h:501:6: error: "PROTOBUF_INLINE_NOT_IN_HEADERS" is not defined [-Werror=undef]
 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
      ^
In file included from /root/opentxs/src/../include/opentxs/core/OTStoragePB.hpp:65:0,
                 from /root/opentxs/src/core/OTStorage.cpp:47:
/root/opentxs/build/src/core/otprotob/Markets.pb.h:2062:6: error: "PROTOBUF_INLINE_NOT_IN_HEADERS" is not defined [-Werror=undef]
 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
      ^
In file included from /root/opentxs/src/../include/opentxs/core/OTStoragePB.hpp:66:0,
                 from /root/opentxs/src/core/OTStorage.cpp:47:
/root/opentxs/build/src/core/otprotob/Bitcoin.pb.h:833:6: error: "PROTOBUF_INLINE_NOT_IN_HEADERS" is not defined [-Werror=undef]
 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
      ^
In file included from /root/opentxs/src/../include/opentxs/core/OTStoragePB.hpp:67:0,
                 from /root/opentxs/src/core/OTStorage.cpp:47:
/root/opentxs/build/src/core/otprotob/Moneychanger.pb.h:1026:6: error: "PROTOBUF_INLINE_NOT_IN_HEADERS" is not defined [-Werror=undef]
 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
      ^
cc1plus: all warnings being treated as errors
src/core/CMakeFiles/opentxs-core.dir/build.make:1368: recipe for target 'src/core/CMakeFiles/opentxs-core.dir/OTStorage.cpp.o' failed
make[2]: *** [src/core/CMakeFiles/opentxs-core.dir/OTStorage.cpp.o] Error 1
make[2]: Leaving directory '/root/opentxs/build'
CMakeFiles/Makefile2:586: recipe for target 'src/core/CMakeFiles/opentxs-core.dir/all' failed
make[1]: *** [src/core/CMakeFiles/opentxs-core.dir/all] Error 2
make[1]: Leaving directory '/root/opentxs/build'
Makefile:150: recipe for target 'all' failed
make: *** [all] Error 2

Any ideas on how to deal with this? Couldn't find any help online.

1 Answer

0 votes
by (14.4k points)

The problem arises because google coders are relying on the fact that the C++ standard allows you to treat an undefined preprocessor symbol as evaluating to 0. There is a bunch of #if directives that test the value of PROTOBUF_INLINE_NOT_IN_HEADERS when it hasn’t been defined anywhere.  

So to fix this, you should add this line in the CMakeList.txt that you find in the opentxs main folder :

add_definitions(-DPROTOBUF_INLINE_NOT_IN_HEADERS=0)

SConstruct and CXXFLAGS in src/SConscript (CXXFLAGS) and that seemed to catch it.

And don't forget to repeat the CMake step.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked May 25 in Blockchain by neelimakv (27.5k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.5k answers

500 comments

108k users

Browse Categories

...