Hadoop 3.0 在Mac上面编译失败

时间:2015年4月

Hadoop版本:当前日期trunk最新版

OS版本:OS X 10.10.2


编译错误:

当编译hadoop-mapreduce-client-nativetask 3.0.0-SNAPSHOT工程的时候会出错,错误如下:

     [exec] /Library/Developer/CommandLineTools/usr/bin/c++    -DSIMPLE_MEMCPY -fno-strict-aliasing -Wall -Wno-sign-compare -g -O2 -DNDEBUG -fPIC -I/Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/target/native/javah -I/Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src -I/Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util -I/Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib -I/Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/test -I/Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src -I/Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/target/native -I/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/include/darwin -isystem /Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/gtest/include    -w -o CMakeFiles/gtest.dir/main/native/gtest/gtest-all.cc.o -c /Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/gtest/gtest-all.cc
     [exec] In file included from /Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/gtest/gtest-all.cc:39:
     [exec] In file included from /Users/CaiYicong/Documents/SourceCode/ForkHadoop/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/gtest/include/gtest/gtest.h:55:
     [exec] In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:131:
     [exec] In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:216:
     [exec] In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:15:
     [exec] In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:439:
     [exec] In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
     [exec] In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
     [exec] /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
     [exec] #include <__debug>
     [exec]          ^
     [exec] 1 error generated.
     [exec] make[2]: *** [CMakeFiles/gtest.dir/main/native/gtest/gtest-all.cc.o] Error 1
     [exec] make[1]: *** [CMakeFiles/gtest.dir/all] Error 2
     [exec] make: *** [all] Error 2

该错误显示找不到__debug文件,在该路径下确实没有该文件/Library/Developer/CommandLineTools/usr/include/c++/v1/__debug

搜索了一下发现是由于最近更新了Command Line Tools 6.3所致,最近OS推送了这个更新,我也更新了,但是该版本貌似不那么友好,所以出现了该编译错误。


规避解决方法:

回退该工具到6.2版本,下载地址:https://developer.apple.com/downloads/index.action

选择Command Line Tools(OS X 10.10) for Xcode - Xcode 6.2版本


参考:http://stackoverflow.com/questions/29529455/missing-c-header-debug-after-updating-osx-command-line-tools-6-3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值