hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bo Fu <...@uchicago.edu>
Subject Compilation problem of hadoop
Date Mon, 02 Feb 2015 17:17:14 GMT
Hi all,

I’m trying to compile the hadoop-1.0.3 source code using the command:

ant package -Djava5.home=$JAVA_HOME -Dforrest.home=$FORREST_HOME

It failed. The fail log is as follows. Can anyone tell me how to solve it?
Thanks.


[exec] depbase=`echo impl/task-controller.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
     [exec] gcc -DPACKAGE_NAME=\"linux-task-controller\" -DPACKAGE_TARNAME=\"linux-task-controller\"
-DPACKAGE_VERSION=\"1.0.0\" -DPACKAGE_STRING=\"linux-task-controller\ 1.0.0\" -DPACKAGE_BUGREPORT=\"mapreduce-dev@hadoop.apache.org<mailto:mapreduce-dev@hadoop.apache.org>\"
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1
-D_TANDEM_SOURCE=1 -DPACKAGE=\"linux-task-controller\" -DVERSION=\"1.0.0\" -DHAVE_DLFCN_H=1
-DLT_OBJDIR=\".libs/\" -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_DECL_STRERROR_R=1
-DHAVE_STRERROR_R=1 -DHAVE_MKDIR=1 -DHAVE_UNAME=1 -I. -I/usr/local/hadoop-1.0.3/src/c++/task-controller
   -I/usr/local/hadoop-1.0.3/src/c++/task-controller/impl -Wall -g -Werror -DHADOOP_CONF_DIR=/etc/hadoop
-MT impl/task-controller.o -MD -MP -MF $depbase.Tpo -c -o impl/task-controller.o /usr/local/hadoop-1.0.3/src/c++/task-controller/impl/task-controller.c
&&\
     [exec] mv -f $depbase.Tpo $depbase.Po
     [exec] /usr/local/hadoop-1.0.3/src/c++/task-controller/impl/task-controller.c:80:15:
error: use of undeclared identifier 'PATH_MAX'
     [exec]   char buffer[PATH_MAX];
     [exec]               ^
     [exec] /usr/local/hadoop-1.0.3/src/c++/task-controller/impl/task-controller.c:82:27:
error: use of undeclared identifier 'PATH_MAX'
     [exec]   char *filename = malloc(PATH_MAX);
     [exec]                           ^
     [exec] /usr/local/hadoop-1.0.3/src/c++/task-controller/impl/task-controller.c:88:21:
error: use of undeclared identifier 'PATH_MAX'
     [exec]   } else if (len >= PATH_MAX) {
     [exec]                     ^
     [exec] /usr/local/hadoop-1.0.3/src/c++/task-controller/impl/task-controller.c:90:13:
error: use of undeclared identifier 'PATH_MAX'
     [exec]             PATH_MAX, filename, PATH_MAX);
     [exec]             ^
     [exec] /usr/local/hadoop-1.0.3/src/c++/task-controller/impl/task-controller.c:892:3:
error: implicit declaration of function 'fcloseall' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
     [exec]   fcloseall();
     [exec]   ^
     [exec] /usr/local/hadoop-1.0.3/src/c++/task-controller/impl/task-controller.c:892:3:
note: did you mean 'fclose'?
     [exec] /usr/include/stdio.h:232:6: note: 'fclose' declared here
     [exec] int      fclose(FILE *);
     [exec]          ^
     [exec] 5 errors generated.
     [exec] make: *** [impl/task-controller.o] Error 1

BUILD FAILED
/usr/local/hadoop-1.0.3/build.xml:1598: The following error occurred while executing this
line:
/usr/local/hadoop-1.0.3/build.xml:2781: exec returned: 2

Total time: 1 minute 37 seconds


Bo Fu
Master’s Program of Computer Science, University of Chicago


Mime
View raw message