使用ant构建hadoop1.2.1核心jar失败

66bbxpm5  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(373)

我需要对hadoop中的map类和reduce类进行一些修改,因此,我一直在尝试从源文件中使用ant编译hadoop 1.2.1 jar文件,但总是出现以下错误:

  1. Buildfile: build.xml
  2. clover.setup:
  3. clover.info:
  4. [echo]
  5. [echo] Clover not found. Code coverage reports disabled.
  6. [echo]
  7. clover:
  8. ivy-download:
  9. [get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0 /ivy-2.1.0.jar
  10. [get] To: /home/user/Downloads/hadoop-1.2.1/ivy/ivy-2.1.0.jar
  11. [get] Not modified - so not downloaded
  12. ivy-init-dirs:
  13. ivy-probe-antlib:
  14. ivy-init-antlib:
  15. ivy-init:
  16. [ivy:configure] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
  17. [ivy:configure] :: loading settings :: file = /home/user/Downloads/hadoop-1.2.1/ivy/ivysettings.xml
  18. ivy-resolve-common:
  19. ivy-retrieve-common:
  20. [ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
  21. [ivy:cachepath] :: loading settings :: file = /home/user/Downloads/hadoop-1.2.1/ivy/ivysettings.xml
  22. init:
  23. [touch] Creating /tmp/null1102494190
  24. [delete] Deleting: /tmp/null1102494190
  25. [exec] svn: E155007: '/home/user/Downloads/hadoop-1.2.1' is not a working copy
  26. [exec] svn: E155007: '/home/user/Downloads/hadoop-1.2.1' is not a working copy
  27. record-parser:
  28. compile-rcc-compiler:
  29. compile-core-classes:
  30. compile-hdfs-classes:
  31. [javac] Compiling 2 source files to /home/user/Downloads/hadoop-1.2.1/build/classes
  32. [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
  33. [javac] 1 warning
  34. compile-mapred-classes:
  35. Trying to override old definition of task jsp-compile
  36. create-native-configure:
  37. [exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
  38. [exec] ../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from...
  39. [exec] configure.ac:42: the top level
  40. [exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
  41. [exec] ../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from...
  42. [exec] configure.ac:42: the top level
  43. [exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
  44. [exec] ../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from...
  45. [exec] configure.ac:42: the top level
  46. [exec] configure.ac:48: error: possibly undefined macro: AC_PROG_LIBTOOL
  47. [exec] If this token and others are legitimate, please use m4_pattern_allow.
  48. [exec] See the Autoconf documentation.
  49. [exec] autoreconf: /usr/bin/autoconf failed with exit status: 1
  50. BUILD FAILED
  51. /home/user/Downloads/hadoop-1.2.1/build.xml:634: exec returned: 1

有人知道问题出在哪里吗?或者知道如何使用ant创建jar文件?
谢谢

gijlo24d

gijlo24d1#

错误是它缺少一个库。
只需安装libtool即可修复。

  1. sudo apt-get install libtool

现在它将成功地建造这个项目。
来源:[链接]http://desk.stinkpot.org:8080/tricks/index.php/2007/05/fixing-error-undefined-macro-ac\u prog\u libtool/

相关问题