我正在尝试在 Windows 环境中使用 Hadoop 压缩编解码器。但是,正如 Haddop 文档中提到的,需要为 Linux 以外的任何平台构建本机库。
我正在按照此处提到的步骤从 Cygwin 构建用于压缩编解码器的本机库:http: //hadoop.apache.org/common/docs/r0.18.3/native_libraries.html#Building+Native+Hadoop+Libraries
但收到此错误:(日志的最后几行)
[exec] configure: WARNING: jni.h: present but cannot be compiled
[exec] configure: WARNING: jni.h: check for missing prerequisite headers?
[exec] configure: WARNING: jni.h: see the Autoconf documentation
[exec] configure: WARNING: jni.h: section "Present But Cannot Be Compiled"
[exec] configure: WARNING: jni.h: proceeding with the preprocessor's result
[exec] configure: WARNING: jni.h: in the future, the compiler will take precedence
[exec] configure: WARNING: ## ------------------------------------------ ##
[exec] configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ##
[exec] configure: WARNING: ## ------------------------------------------ ##
[exec] checking for jni.h... yes
[exec] checking zlib.h usability... yes
[exec] checking zlib.h presence... yes
[exec] checking for zlib.h... yes
[exec] checking Checking for the 'actual' dynamic-library for '-lz'...
[exec] checking zconf.h usability... yes
[exec] checking zconf.h presence... yes
[exec] checking for zconf.h... yes
[exec] checking Checking for the 'actual' dynamic-library for '-lz'... (cached)
[exec] checking fcntl.h usability... yes
[exec] checking fcntl.h presence... yes
[exec] checking for fcntl.h... yes
[exec] checking for stdlib.h... (cached) yes
[exec] checking for string.h... (cached) yes
[exec] checking for unistd.h... (cached) yes
[exec] checking for an ANSI C-conforming const... yes
[exec] checking for memset... yes
[exec] checking whether strerror_r is declared... yes
[exec] checking for strerror_r... yes
[exec] checking whether strerror_r returns char *... no
[exec] configure: creating ./config.status
[exec] config.status: creating Makefile
[exec] config.status: error: cannot find input file: Makefile.in
BUILD FAILED C:\cygwin\usr\local\hadoop\build.xml:596:执行此行时出现以下错误:C:\cygwin\usr\local\hadoop\build.xml:645:exec 返回:1
我还将所有 Makefile 重命名为 Makefile.in 但仍然无法克服此错误。任何人都可以帮我解决这个问题。
Makefile 确实存在于 haddop/src/native 文件夹中,如果我使用 ./configure 构建它,那很好,但是它不会生成任何 jar。