Unable to build java google cloud debugger on ubuntu server on virtualbox

77 Views Asked by At

I'm trying to build the java google cloud debugger on Ubuntu 15.10 Server (guest) running on Virtual Box 5.0.14 on Mac OS X El Capitan (host).

I'm following the build instructions from cloud-debug-java

After installing cmake, build-essential, oracle java 8, maven3 etc., I also had to make the following changes to src/agent/Makefile before running ./build.sh:

  1. Changed the /path/to/java/ to /usr/lib/jvm/java-8-oracle/
  2. Added this include: -I/usr/lib/jvm/java-8-oracle/include/linux

So, my INCLUDES declaration looks like this: INCLUDES = \ -I/usr/lib/jvm/java-8-oracle/include \ -I/usr/lib/jvm/java-8-oracle/include/linux \ -I$(THIRD_PARTY_INCLUDE_PATH) \ -I$(ANTLR_CPP_LIB_INCLUDE) \ -I. \ -I../codegen \ -Iantlrgen \

After that, the build runs fine but eventually fails when trying to build expression_util.o

Error: g++ -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/home/ubuntu-java/Development/google-cloud-debugger/cloud-debug-java/third_party/install/include -I../../third_party/antlr/lib/cpp/v2_7_2/ -I. -I../codegen -Iantlrgen -m64 -std=c++11 -fPIC -Werror -Wall -Wno-unused-parameter -Wno-deprecated -Wno-ignored-qualifiers -Wno-sign-compare -Wno-array-bounds -g0 -DSTANDALONE_BUILD -DGCP_HUB_CLIENT -Wno-unused-but-set-variable -Wno-strict-aliasing -O3 -D NDEBUG -c expression_util.cc -o expression_util.o In file included from expression_util.cc:25:0: antlrgen/JavaExpressionLexer.hpp:4:54: fatal error: third_party/antlr/lib/cpp/antlr/config.hpp: No such file or directory compilation terminated. Makefile:190: recipe for target 'expression_util.o' failed make: *** [expression_util.o] Error 1

In the generated JavaExpressionLexer.hpp file, it's trying to #include third_party/antlr/lib/cpp/antlr/config.hpp and fails to find it.

In the project, I do see a config.hpp, but it's under <project-root>/third_party/antlr/lib/cpp/v2_7_2/antlr/.

I'm not sure how to resolve this error.

1

There are 1 best solutions below

1
On

Are you using build.sh script? It should take care of ANTLR and other third party dependencies.

Specifically the build needs to set THIRD_PARTY_INCLUDE_PATH environment variable similarly to build.sh.