进入hadoop-hdfs-project/hadoop-hdfs/src目录,执行cmake以生成Makefile文件。
如果遇到如下的错误:
~/hadoop-2.7.1-src/hadoop-hdfs-project/hadoop-hdfs/src]$ cmake .
JAVA_HOME=, JAVA_JVM_LIBRARY=/data/jdk/jre/lib/amd64/server/libjvm.so
JAVA_INCLUDE_PATH=/data/jdk/include, JAVA_INCLUDE_PATH2=/data/jdk/include/linux
Located all JNI components successfully.
CMake Error at CMakeLists.txt:84 (MESSAGE):
You must set the CMake variable GENERATED_JAVAH
-- Configuring incomplete, errors occurred!
则指定一下cmake参数即可,如下所示:
cmake -DJAVA_HOME=/data/jdk -DGENERATED_JAVAH=/data/jdk .
然后带参数再次执行cmake:
~/hadoop-2.7.1-src/hadoop-hdfs-project/hadoop-hdfs/src]$ cmake -DJAVA_HOME=/data/jdk -DGENERATED_JAVAH=/data/jdk .
下面的显示表示cmake成功,会在当前目录下生成Makefile文件:
JAVA_HOME=/data/jdk, JAVA_JVM_LIBRARY=/data/jdk/jre/lib/amd64/server/libjvm.so
JAVA_INCLUDE_PATH=/data/jdk/include, JAVA_INCLUDE_PATH2=/data/jdk/include/linux
Located all JNI components successfully.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23")
-- checking for module 'fuse'
-- package 'fuse' not found
-- Failed to find Linux FUSE libraries or include files. Will not build FUSE client.
-- Configuring done
-- Generating done
-- Build files have been written to: /data/hadoop-2.7.1-src/hadoop-hdfs-project/hadoop-hdfs/src
接下来就可以执行make来编译生成libhdfs.a了。
相关文章
- 08-25Django中CKEditor富文本编译器的使用
- 08-25【转】为什么C++编译器不能支持对模板的分离式编译
- 08-25更改C编译器的缺省字节对齐方式__align(),__attribute((aligned-(n))),#pragma-pack(n)
- 08-25NDK clang编译器的一个bug
- 08-25Hadoop新版本中map任务待处理split大小的计算方法
- 08-25Day4:编译型和解释型,idea的使用和配置
- 08-25一直深深困扰我的问题——hadoop 重启集群后,之前运行的job运行状态都丢失了
- 08-25golang GO1111MODULE=on导致bee生成的工程无法编译
- 08-25脚本的基本编译
- 08-25libraries – 查找已编译C程序的依赖项