无法在virtualbox上的ubuntu服务器上构建java google云调试器

时间:2016-02-20 16:52:26

标签: java ubuntu virtualbox google-cloud-debugger

我正在尝试在Ubuntu 15.10 Server(主机)Virtual Box 5.0.14上运行的Mac OS X El Capitan(来宾)上构建 java google云调试器。

我正在按照cloud-debug-java

的构建说明进行操作

安装cmakebuild-essentialoracle java 8maven3等后,我还必须在src/agent/Makefile之前对./build.sh进行以下更改{{1 }}:

  1. /path/to/java/更改为/usr/lib/jvm/java-8-oracle/
  2. 添加了此include-I/usr/lib/jvm/java-8-oracle/include/linux
  3. 所以,我的INCLUDES声明如下: 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 \

    之后,构建运行正常但最终在尝试构建expression_util.o

    时失败

    错误 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

    生成的 JavaExpressionLexer.hpp文件中,它正在尝试#include third_party/antlr/lib/cpp/antlr/config.hpp并且无法找到它。

    在项目中,我确实看到了config.hpp,但它位于<project-root>/third_party/antlr/lib/cpp/v2_7_2/antlr/下。

    我不确定如何解决此错误。

1 个答案:

答案 0 :(得分:0)

您使用的是build.sh脚本吗?它应该照顾ANTLR和其他第三方依赖。

具体而言,构建需要与build.sh类似地设置THIRD_PARTY_INCLUDE_PATH环境变量。