Hadoop-pipes 编译 Native报错问题

近期编译Hadoop native代码发现,由于内核版本升级,导致了编译失败,失败的module是hadoop-pipes。编译的命令式 mvn clean package -Pnative -DskipTests。发现了大量的如下错误

[exec] /usr/bin/c++ -g -Wall -O2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC CMakeFiles/pipes-sort.dir/main/native/examples/impl/sort.cc.o -o examples/pipes-sort -rdynamic libhadooppipes.a libhadooputils.a -lssl -lpthread
[exec] /usr/bin/cmake: /usr/lib64/libcrypto.so.10: no version information available (required by /usr/lib64/libssl.so.10)
[exec] /usr/bin/cmake: /usr/lib64/libcrypto.so.10: no version information available (required by /usr/lib64/libssl.so.10)
[exec] /usr/bin/cmake: /usr/lib64/libcrypto.so.10: no version information available (required by /usr/lib64/libssl.so.10)
[exec] /usr/bin/cmake: /usr/lib64/libcrypto.so.10: no version information available (required by /usr/lib64/libssl.so.10)
[exec] make[2]: Leaving directory /data0/jiangyu2/compile/201504/hadoop-tools/hadoop-pipes/target/native'
[exec] make[1]: Leaving directory
/data0/jiangyu2/compile/201504/hadoop-tools/hadoop-pipes/target/native’
[exec] /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/libssl.so: undefined reference to `OPENSSL_init_library@libcrypto.so.10′

      看了下是缺少libcrypto,为解决这一问题,修改$HADOOP_PIPES/src/CMakeLists.txt,修改后加入一行加入如下即可解决。

target_link_libraries(hadooppipes
${OPENSSL_LIBRARIES}
pthread
+ crypto
)

 

Print Friendly

jiang yu

Leave a Reply