我正在尝试在Mac OS X El Capitan
(主机)上运行Virtual Box 5.0.14
Ubuntu 15.10 Server
(来宾)上构建java google云调试器。
我正在遵循云调试Java的构建说明
在安装了cmake
、build-essential
、oracle java 8
、maven3
等之后,我还必须在运行./build.sh
之前对src/agent/Makefile
进行以下更改:
- 将
/path/to/java/
更改为/usr/lib/jvm/java-8-oracle/
- 添加了此
include
:-I/usr/lib/jvm/java-8-oracle/include/linux
因此,我的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/
下。
我不确定如何解决此错误。
你正在使用 build.sh 脚本吗?它应该照顾ANTLR和其他第三方依赖项。
具体来说,构建需要设置THIRD_PARTY_INCLUDE_PATH
环境变量,类似于 build.sh。