我需要对map类进行一些修改并从Hadoop中减少类,所以,我一直在尝试使用源文件中的ant编译Hadoop 1.2.1 jar文件,但我总是得到以下错误:
Buildfile: build.xml
clover.setup:
clover.info:
[echo]
[echo] Clover not found. Code coverage reports disabled.
[echo]
clover:
ivy-download:
[get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0 /ivy-2.1.0.jar
[get] To: /home/user/Downloads/hadoop-1.2.1/ivy/ivy-2.1.0.jar
[get] Not modified - so not downloaded
ivy-init-dirs:
ivy-probe-antlib:
ivy-init-antlib:
ivy-init:
[ivy:configure] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file = /home/user/Downloads/hadoop-1.2.1/ivy/ivysettings.xml
ivy-resolve-common:
ivy-retrieve-common:
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /home/user/Downloads/hadoop-1.2.1/ivy/ivysettings.xml
init:
[touch] Creating /tmp/null1102494190
[delete] Deleting: /tmp/null1102494190
[exec] svn: E155007: '/home/user/Downloads/hadoop-1.2.1' is not a working copy
[exec] svn: E155007: '/home/user/Downloads/hadoop-1.2.1' is not a working copy
record-parser:
compile-rcc-compiler:
compile-core-classes:
compile-hdfs-classes:
[javac] Compiling 2 source files to /home/user/Downloads/hadoop-1.2.1/build/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] 1 warning
compile-mapred-classes:
Trying to override old definition of task jsp-compile
create-native-configure:
[exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
[exec] ../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from...
[exec] configure.ac:42: the top level
[exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
[exec] ../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from...
[exec] configure.ac:42: the top level
[exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
[exec] ../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from...
[exec] configure.ac:42: the top level
[exec] configure.ac:48: error: possibly undefined macro: AC_PROG_LIBTOOL
[exec] If this token and others are legitimate, please use m4_pattern_allow.
[exec] See the Autoconf documentation.
[exec] autoreconf: /usr/bin/autoconf failed with exit status: 1
BUILD FAILED
/home/user/Downloads/hadoop-1.2.1/build.xml:634: exec returned: 1
有人知道可能是什么问题吗?或者知道如何使用ant创建jar文件?
谢谢
答案 0 :(得分:1)
错误是它丢失了一个库。
只需安装libtool即可修复。
sudo apt-get install libtool
现在它将成功构建项目。
来源:[link] http://desk.stinkpot.org:8080/tricks/index.php/2007/05/fixing-error-undefined-macro-ac_prog_libtool/