hadoop-common /native/src/exception.c : error: function-like macro ‘__GLIBC_PREREQ‘ is not defined

1. 问题来源

mac上编译hadoop 源码的时候遇到如下错误

1 error generated.
/usr/local/develop/open-source/hadoop-rel-release-3.3.6/hadoop-common-project/hadoop-common/src/main/native/src/exception.c:114:50: error: function-like macro '__GLIBC_PREREQ' is not defined
#if defined(__sun) || defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 32)
                                                 ^
1 error generated.
make[2]: *** [CMakeFiles/hadoop.dir/main/native/src/exception.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/hadoop_static.dir/main/native/src/exception.c.o] Error 1
make[1]: *** [CMakeFiles/hadoop_static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/hadoop.dir/all] Error 2
make: *** [all] Error 2

2. 分析

可能mac上没有 __GLIBC_PREREQ

3. 解决

把这块删除即可
例如
hadoop-common /native/src/exception.c : error: function-like macro ‘__GLIBC_PREREQ‘ is not defined_第1张图片

good day !!!!

你可能感兴趣的:(大数据搭建问题,hadoop,大数据)