0

我正在尝试使用 ./configure 安装 HDF-EOS C 库,并且在执行配置期间,我得到以下输出:

./configure CC=/usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... /usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.

config.log 是:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by hdf-eos2 configure 4.2, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ./configure CC=/usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc

## --------- ##
## Platform. ##
## --------- ##

hostname = kali
uname -m = x86_64
uname -r = 4.3.0-kali1-amd64
uname -s = Linux
uname -v = #1 SMP Debian 4.3.3-5kali4 (2016-01-13)

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/local/hdf5/bin
PATH: /usr/local/hdf4-4.2.12/bin
PATH: /usr/local/hdf5/bin
PATH: /usr/local/hdf4-4.2.12/bin
PATH: /usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc
PATH: /usr/local/hdf5/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2022: checking for a BSD-compatible install
configure:2078: result: /usr/bin/install -c
configure:2089: checking whether build environment is sane
configure:2132: result: yes
configure:2197: checking for gawk
configure:2227: result: no
configure:2197: checking for mawk
configure:2213: found /usr/bin/mawk
configure:2224: result: mawk
configure:2235: checking whether make sets $(MAKE)
configure:2256: result: yes
configure:2440: checking whether to enable maintainer-specific portions of Makefiles
configure:2449: result: no
configure:2546: checking build system type
configure:2564: result: x86_64-unknown-linux-gnu
configure:2586: checking host system type
configure:2601: result: x86_64-unknown-linux-gnu
configure:2635: checking for style of include used by make
configure:2663: result: GNU
configure:2736: checking for gcc
configure:2763: result: /usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc
configure:3001: checking for C compiler version
configure:3008: /usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc --version >&5
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libmfhdf.a: No such file or directory
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libdf.a: No such file or directory
gcc (Debian 6.1.1-11) 6.1.1 20160802
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3011: $? = 0
configure:3018: /usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc -v >&5
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libmfhdf.a: No such file or directory
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libdf.a: No such file or directory
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.1.1-11' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.1.1 20160802 (Debian 6.1.1-11) 
configure:3021: $? = 1
configure:3028: /usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc -V >&5
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libmfhdf.a: No such file or directory
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libdf.a: No such file or directory
gcc: error: unrecognized command line option '-V'
configure:3031: $? = 1
configure:3054: checking for C compiler default output file name
configure:3081: /usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc    conftest.c  >&5
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libmfhdf.a: No such file or directory
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libdf.a: No such file or directory
configure:3084: $? = 1
configure:3122: result: 
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "hdf-eos2"
| #define PACKAGE_TARNAME "hdf-eos2"
| #define PACKAGE_VERSION "4.2"
| #define PACKAGE_STRING "hdf-eos2 4.2"
| #define PACKAGE_BUGREPORT "null@bogus.email"
| #define PACKAGE "hdf-eos2"
| #define VERSION "4.2"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3129: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=
ac_cv_env_FC_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=mawk
ac_cv_prog_ac_ct_CC=/usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /usr/local/hdfeos/config/missing --run aclocal-1.9'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /usr/local/hdfeos/config/missing --run tar'
AR=''
AUTOCONF='${SHELL} /usr/local/hdfeos/config/missing --run autoconf'
AUTOHEADER='${SHELL} /usr/local/hdfeos/config/missing --run autoheader'
AUTOMAKE='${SHELL} /usr/local/hdfeos/config/missing --run automake-1.9'
AWK='mawk'
CC='/usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F2CFORTRAN_32PTR_CONDITIONAL_FALSE=''
F2CFORTRAN_32PTR_CONDITIONAL_TRUE=''
F2CFORTRAN_90_CONDITIONAL_FALSE=''
F2CFORTRAN_90_CONDITIONAL_TRUE=''
F2CFORTRAN_CONDITIONAL_FALSE=''
F2CFORTRAN_CONDITIONAL_TRUE=''
F77=''
FC=''
FCFLAGS=''
FFLAGS=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_INCLUDE_CONDITIONAL_FALSE=''
INSTALL_INCLUDE_CONDITIONAL_TRUE=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /usr/local/hdfeos/config/missing --run makeinfo'
OBJEXT=''
PACKAGE='hdf-eos2'
PACKAGE_BUGREPORT='null@bogus.email'
PACKAGE_NAME='hdf-eos2'
PACKAGE_STRING='hdf-eos2 4.2'
PACKAGE_TARNAME='hdf-eos2'
PACKAGE_VERSION='4.2'
PATH_SEPARATOR=':'
RANLIB=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
SZIP_ENCODER_CONDITIONAL_FALSE=''
SZIP_ENCODER_CONDITIONAL_TRUE=''
TESTDRIVERS_CONDITIONAL_FALSE=''
TESTDRIVERS_CONDITIONAL_TRUE=''
VERSION='4.2'
ac_ct_CC='/usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc'
ac_ct_CXX=''
ac_ct_F77=''
ac_ct_FC=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='/usr/local/hdfeos/config/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME "hdf-eos2"
#define PACKAGE_TARNAME "hdf-eos2"
#define PACKAGE_VERSION "4.2"
#define PACKAGE_STRING "hdf-eos2 4.2"
#define PACKAGE_BUGREPORT "null@bogus.email"
#define PACKAGE "hdf-eos2"
#define VERSION "4.2"

configure: exit 77

问题似乎发生在名为“confdefs.h”的头文件中,config.log 文件显示程序失败。我不知道问题是什么,我非常感谢任何帮助。

规格:Linux kali 4.3.0-kali1-amd64

#1 SMP Debian 4.3.3-5kali4 (2016-01-13) x86_64 GNU/Linux

侏儒 3.18.2

另外,不要介意我的 PATH 变量多次引用同一个位置。我会尽快解决这个问题。

4

1 回答 1

2

问题似乎发生在名为“confdefs.h”的头文件中

confdefs.h 由配置脚本生成以用于其测试。这不是你的问题。

并且 config.log 文件说程序失败。

更具体地说,它准确地告诉您运行了什么命令,并回显产生的错误消息和退出状态。具体来说,命令是

/usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc conftest.c >&5

这是尝试使用CC您在运行时通过设置环境变量指定的编译器configure,它之前根据使用该--version选项运行时的输出将其识别为 GCC。

这些错误是在失败的编译中发出的:

gcc:错误:/mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-stati/lib/libmfhdf.a:没有这样的文件或目录

gcc:错误:/mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libdf.a:没有这样的文件或目录

每次运行指定的编译器时似乎都会发出这些。它们令人担忧的部分原因是标记为错误的诊断总是令人担忧,还特别是因为它们表明h4cc脚本所在的 HDF4 包可能安装不正确或配置不正确。

此外,编译器脚本以退出状态 1(不是 0)退出,并且显然没有生成编译后的输出文件。其他输出表明,尽管它可能是 的包装器gcc,但它有自己的一组选项,它专门尊重,拒绝所有其他选项,因此它不是 . 的可行的通用替代品gcc

我不确定您为什么要尝试将h4cc脚本替换为系统的默认编译器,而最明显的尝试就是不这样做。如果你在没有定义CC环境变量的情况下运行配置脚本,或者将其定义为裸gcc二进制文件的路径,那么配置脚本应该会更快乐。

另请参阅您尝试构建的软件包的安装说明。他们很可能有关于如何将其指向您的 HDF 安装的说明,这可能是 h4cc 的预期目的之一。任何其他目的,例如提供特定于安装的编译选项,都应包含在您尝试构建的包的构建系统中。

于 2016-08-18T20:44:46.237 回答