在 debian 上安装 h4toh5 时,C 编译器无法创建可执行文件

在 debian 上安装 h4toh5 时,C 编译器无法创建可执行文件

这是我一生中第一次从源代码安装,所以感谢您的帮助。

我正在尝试安装 h4toh5 实用程序,它可以允许将 hdf4 文件转换为 hdf5 文件。经过长时间的网上阅读,我弄清楚了如何配置。

./configure CC=/usr/bin/h4cc --with-hdf5=/usr/lib/x86_64-linux-gnu --prefix=/home/cyue/Documents/tools

安装说明说我必须使用 h4cc 进行编译:HDF4 库安装可以替换 cc 的 h4cc 脚本。 h4cc 应指定为 C 编译器。这可以通过将以下内容传递给配置脚本来完成:

CC=<hdf4directory>/bin/h4cc                                              

一开始我没有这个,但安装 HDF4-tools 后我确认我/usr/bin/h4cc的系统上有这个。但是,我遇到了这样的最终错误:

    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for ranlib... ranlib
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking shell variables initial values... done
    checking for gcc... /usr/bin/h4cc
    checking whether the C compiler works... no
    configure: error: in `/home/cyue/Downloads/h4h5tools-2.2.2':
    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 H4H5Tools configure 2.2.2, which was
    generated by GNU Autoconf 2.65.  Invocation command line was

      $ ./configure CC=/usr/bin/h4cc --with-hdf5=/usr/lib/x86_64-linux-gnu --prefix=/home/cyue/Documents/tools

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

    hostname = LGGE130
    uname -m = x86_64
    uname -r = 3.16.0-4-amd64
    uname -s = Linux
    uname -v = #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04)

    /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/bin
    PATH: /usr/bin
    PATH: /bin
    PATH: /usr/local/games
    PATH: /usr/games
    PATH: /var/cfengine/bin


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

    configure:2142: checking for a BSD-compatible install
    configure:2210: result: /usr/bin/install -c
    configure:2221: checking whether build environment is sane
    configure:2271: result: yes
    configure:2412: checking for a thread-safe mkdir -p
    configure:2451: result: /bin/mkdir -p
    configure:2464: checking for gawk
    configure:2480: found /usr/bin/gawk
    configure:2491: result: gawk
    configure:2502: checking whether make sets $(MAKE)
    configure:2524: result: yes
    configure:2605: checking whether to enable maintainer-specific portions of Makefiles
    configure:2614: result: no
    configure:2670: checking for ranlib
    configure:2686: found /usr/bin/ranlib
    configure:2697: result: ranlib
    configure:2724: checking build system type
    configure:2738: result: x86_64-unknown-linux-gnu
    configure:2758: checking host system type
    configure:2771: result: x86_64-unknown-linux-gnu
    configure:2794: checking shell variables initial values
    ACLOCAL='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run aclocal-1.11'
    AMTAR='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run tar'
    AUTOCONF='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run autoconf'
    AUTOHEADER='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run autoheader'
    AUTOMAKE='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run automake-1.11'
    AWK=gawk
    BASEDATADIR=homel/ychao/basedata
    BASH=/bin/bash
    BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
    BASH_ALIASES=()
    BASH_ARGC=([0]="3")
    BASH_ARGV=([0]="--prefix=/home/cyue/Documents/tools" [1]="--with-hdf5=/usr/lib/x86_64-linux-gnu" [2]="CC=/usr/bin/h4cc")
    BASH_CMDS=()
    BASH_LINENO=([0]="0")
    BASH_SOURCE=([0]="./configure")
    BASH_VERSINFO=([0]="4" [1]="3" [2]="30" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
    BASH_VERSION='4.3.30(1)-release'
    CC=/usr/bin/h4cc
    CONFIG_SHELL=/bin/bash
    CYGPATH_W=echo
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-tC6gSQHljc,guid=5c6130f74e9fde0b455bfc4555ce3181
    DESKTOP_SESSION=default
    DIRSTACK=()
    DISPLAY=:0
    DUALCASE=1
    ECHO_C=
    ECHO_N=-n
    ECHO_T=
    EUID=7277
    FER_DATA='. /data /usr/local/ferret//go /usr/local/ferret//examples /usr/local/ferret//contrib /data/ncep'
    FER_DESCR='. /descr'
    FER_DIR=/usr/local/ferret/
    FER_EXTERNAL_FUNCTIONS=/usr/local/ferret//ext_func/libs
    FER_GO='. /usr/local/ferret//go /usr/local/ferret//examples /usr/local/ferret//contrib'
    FER_GRIDS='. /grids'
    FER_PALETTE='. /usr/local/ferret//ppl'
    FER_PATHS=/usr/local/ferret_paths
    GDMSESSION=default
    GDM_LANG=en_US.utf8
    GJS_DEBUG_OUTPUT=stderr
    GJS_DEBUG_TOPICS='JS ERROR;JS LOG'
    GNOME_DESKTOP_SESSION_ID=this-is-deprecated
    GPG_AGENT_INFO=/run/user/7277/keyring/gpg:0:1
    GROUPS=()
    GTK_IM_MODULE=ibus
    HOME=/home/cyue
    HOSTNAME=LGGE130
    HOSTTYPE=x86_64
    IFS='   
    '
    INSTALL='/usr/bin/install -c'
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    LANG=en_US.utf8
    LANGUAGE=C
    LC_ALL=C
    LIBOBJS=
    LINENO=2794
    LOADEDMODULES=
    LOGNAME=cyue
    LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'
    MACHTYPE=x86_64-pc-linux-gnu
    MAINT='#'
    MAINTAINER_MODE_FALSE=
    MAINTAINER_MODE_TRUE='#'
    MAKEFLAGS=
    MAKEINFO='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run makeinfo'
    MANPATH=:/var/cfengine/share/man
    MFLAGS=
    MISSING='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing'
    MKDIR_P='/bin/mkdir -p'
    MODULEPATH='/etc/environment-modules/modules:/usr/share/modules/versions:/usr/Modules/$MODULE_VERSION/modulefiles:/usr/share/modules/modulefiles'
    MODULESHOME=/usr/share/modules
    MODULE_VERSION=3.2.10
    MODULE_VERSION_STACK=3.2.10
    OPTERR=1
    OPTIND=1
    OSTYPE=linux-gnu
    PACKAGE=h4h5tools
    [email protected]
    PACKAGE_NAME=H4H5Tools
    PACKAGE_STRING='H4H5Tools 2.2.2'
    PACKAGE_TARNAME=h4h5tools
    PACKAGE_URL=
    PACKAGE_VERSION=2.2.2
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/var/cfengine/bin
    PATH_SEPARATOR=:
    PIPESTATUS=([0]="0")
    PLOTFONTS=/usr/local/ferret//ppl/fonts
    POSIXLY_CORRECT=y
    PPID=4806
    PS1='$ '
    PS2='> '
    PS4='+ '
    PWD=/home/cyue/Downloads/h4h5tools-2.2.2
    PYDIR=/home/cyue/python/
    PYTHONPATH=/home/cyue/python/pylsce:/home/cyue/python/libstudy
    QT_IM_MODULE=ibus
    RANLIB=ranlib
    SESSION_MANAGER=local/LGGE130:@/tmp/.ICE-unix/1687,unix/LGGE130:/tmp/.ICE-unix/1687
    SET_MAKE=
    SHELL=/bin/bash
    SHELLOPTS=braceexpand:hashall:interactive-comments:posix
    SHLVL=2
    SPECTRA=/usr/local/ferret//ppl
    SSH_AGENT_PID=1727
    SSH_AUTH_SOCK=/run/user/7277/keyring/ssh
    TERM=xterm
    TMAP=/usr/local/ferret//fmt
    UID=7277
    USER=cyue
    USERNAME=cyue
    USE_MAINTAINER_MODE=no
    VERSION=2.2.2
    VTE_VERSION=3801
    WINDOWID=31457286
    WINDOWPATH=7
    XAUTHORITY=/var/run/gdm3/auth-for-cyue-BlQ3QV/database
    XDG_CURRENT_DESKTOP=GNOME
    XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
    XDG_MENU_PREFIX=gnome-
    XDG_RUNTIME_DIR=/run/user/7277
    XDG_SEAT=seat0
    XDG_SESSION_DESKTOP=default
    XDG_SESSION_ID=1
    XDG_VTNR=7
    XMODIFIERS=@im=ibus
    _='checking shell variables initial values... '
    ac_abs_confdir=/home/cyue/Downloads/h4h5tools-2.2.2
    ac_arg=CC=/usr/bin/h4cc
    ac_aux_dir=bin
    ac_build_alias=x86_64-unknown-linux-gnu
    ac_cache_corrupted=false
    ac_clean_files=
    ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    ac_compiler_gnu=
    ac_confdir=.
    ac_config_guess='/bin/bash bin/config.guess'
    ac_config_libobj_dir=.
    ac_config_sub='/bin/bash bin/config.sub'
    ac_configure='/bin/bash bin/configure'
    ac_configure_args=' '\''CC=/usr/bin/h4cc'\'' '\''--with-hdf5=/usr/lib/x86_64-linux-gnu'\'' '\''--prefix=/home/cyue/Documents/tools'\'''
    ac_cpp='$CPP $CPPFLAGS'
    ac_ct_RANLIB=ranlib
    ac_cv_build=x86_64-unknown-linux-gnu
    ac_cv_env_CC_set=set
    ac_cv_env_CC_value=/usr/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_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_path_mkdir=/bin/mkdir
    ac_cv_prog_AWK=gawk
    ac_cv_prog_ac_ct_RANLIB=ranlib
    ac_cv_prog_make_make_set=yes
    ac_dashdash=
    ac_default_prefix=/usr/local
    ac_dir=bin
    ac_env_CC_set=set
    ac_env_CC_value=/usr/bin/h4cc
    ac_env_CFLAGS_set=
    ac_env_CFLAGS_value=
    ac_env_CPPFLAGS_set=
    ac_env_CPPFLAGS_value=
    ac_env_CPP_set=
    ac_env_CPP_value=
    ac_env_LDFLAGS_set=
    ac_env_LDFLAGS_value=
    ac_env_LIBS_set=
    ac_env_LIBS_value=
    ac_env_build_alias_set=
    ac_env_build_alias_value=
    ac_env_host_alias_set=
    ac_env_host_alias_value=
    ac_env_target_alias_set=
    ac_env_target_alias_value=
    ac_envvar=CC
    ac_exec_ext=
    oldincludedir
    includedir
    localstatedir
    sharedstatedir
    sysconfdir
    datadir
    datarootdir
    libexecdir
    sbindir
    bindir
    program_transform_name
    prefix
    exec_prefix
    PACKAGE_URL
    PACKAGE_BUGREPORT
    PACKAGE_STRING
    PACKAGE_VERSION
    PACKAGE_TARNAME
    PACKAGE_NAME
    PATH_SEPARATOR
    SHELL'
    ac_t=install-sh
    ac_tool_prefix=
    ac_unique_file=lib/src/h4toh5main.c
    ac_unrecognized_opts=
    ac_unrecognized_sep=
    ac_user_opts='
    enable_option_checking
    enable_maintainer_mode
    enable_dependency_tracking
    enable_static_exec
    with_fnord
    with_hdf5
    with_hdfeos2
    enable_production
    '
    ac_useropt=hdf5
    ac_useropt_orig=hdf5
    ac_val='${datarootdir}/man'
    ac_var=CPP
    ac_word=ranlib
    am__api_version=1.11
    am__leading_dot=.
    am__tar='${AMTAR} chof - "$$tardir"'
    am__untar='${AMTAR} xf -'
    am_aux_dir=/home/cyue/Downloads/h4h5tools-2.2.2/bin
    am_lf='
    '
    am_missing_run='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run '
    as_basename=basename
    as_cr_LETTERS=ABCDEFGHIJKLMNOPQRSTUVWXYZ
    as_cr_Letters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
    as_cr_alnum=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
    as_cr_digits=0123456789
    as_cr_letters=abcdefghijklmnopqrstuvwxyz
    as_dir=/usr/bin
    as_dirname=dirname
    as_echo='printf %s\n'
    as_echo_n='printf %s'
    as_executable_p='test -x'
    as_expr=expr
    as_lineno_1=425
    as_lineno_1a=425
    as_lineno_2=426
    as_lineno_2a=426
    as_ln_s='ln -s'
    as_me=configure
    as_mkdir_p='mkdir -p "$as_dir"'
    as_myself=./configure
    as_nl='
    '
    as_save_IFS='   
    '
    as_test_x='test -x'
    as_tr_cpp='eval sed '\''y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[^_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]%_%g'\'''
    as_tr_sh='eval sed '\''y%*+%pp%;s%[^_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]%_%g'\'''
    as_unset=as_fn_unset
    as_var=ac_cv_prog_make_make_set
    bindir='${exec_prefix}/bin'
    build=x86_64-unknown-linux-gnu
    build_cpu=x86_64
    build_os=linux-gnu
    build_vendor=unknown
    cache_file=/dev/null
    cross_compiling=no
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix=NONE
    host=x86_64-unknown-linux-gnu
    host_cpu=x86_64
    host_os=linux-gnu
    host_vendor=unknown
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/install-sh'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    mkdir_p='/bin/mkdir -p'
    no_create=
    no_recursion=
    oldincludedir=/usr/include
    pdfdir='${docdir}'
    prefix=/home/cyue/Documents/tools
    program_prefix=NONE
    program_suffix=NONE
    program_transform_name=s,x,x,
    psdir='${docdir}'
    pylibast=/ahome/python/python_lib
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    silent=
    site=
    srcdir=.
    subdirs=
    sysconfdir='${prefix}/etc'
    target=
    verbose=
    with_hdf5=/usr/lib/x86_64-linux-gnu
    x_includes=NONE
    x_libraries=NONE
    configure:2797: result: done
    configure:2848: checking for gcc
    configure:2875: result: /usr/bin/h4cc
    configure:3104: checking for C compiler version
    configure:3113: /usr/bin/h4cc --version >&5
    gcc (Debian 4.9.2-10) 4.9.2
    Copyright (C) 2014 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.

    gcc: error: /usr/lib/libmfhdf.a: No such file or directory
    gcc: error: /usr/lib/libdf.a: No such file or directory
    configure:3124: $? = 0
    configure:3113: /usr/bin/h4cc -v >&5
    gcc: error: /usr/lib/libmfhdf.a: No such file or directory
    gcc: error: /usr/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/4.9/lto-wrapper
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --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-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --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 4.9.2 (Debian 4.9.2-10) 
    configure:3124: $? = 1
    configure:3113: /usr/bin/h4cc -V >&5
    gcc: error: /usr/lib/libmfhdf.a: No such file or directory
    gcc: error: /usr/lib/libdf.a: No such file or directory
    gcc: error: unrecognized command line option '-V'
    configure:3124: $? = 1
    configure:3113: /usr/bin/h4cc -qversion >&5
    gcc: error: /usr/lib/libmfhdf.a: No such file or directory
    gcc: error: /usr/lib/libdf.a: No such file or directory
    gcc: error: unrecognized command line option '-qversion'
    configure:3124: $? = 1
    configure:3144: checking whether the C compiler works
    configure:3166: /usr/bin/h4cc    conftest.c  >&5
    gcc: error: /usr/lib/libmfhdf.a: No such file or directory
    gcc: error: /usr/lib/libdf.a: No such file or directory
    configure:3170: $? = 1
    configure:3208: result: no
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "H4H5Tools"
    | #define PACKAGE_TARNAME "h4h5tools"
    | #define PACKAGE_VERSION "2.2.2"
    | #define PACKAGE_STRING "H4H5Tools 2.2.2"
    | #define PACKAGE_BUGREPORT "[email protected]"
    | #define PACKAGE_URL ""
    | #define PACKAGE "h4h5tools"
    | #define VERSION "2.2.2"
    | /* end confdefs.h.  */
    | 
    | int
    | main ()
    | {
    | 
    |   ;
    |   return 0;
    | }
    configure:3213: error: in `/home/cyue/Downloads/h4h5tools-2.2.2':
    configure:3217: 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_CC_set=set
    ac_cv_env_CC_value=/usr/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_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_path_mkdir=/bin/mkdir
    ac_cv_prog_AWK=gawk
    ac_cv_prog_ac_ct_CC=/usr/bin/h4cc
    ac_cv_prog_ac_ct_RANLIB=ranlib
    ac_cv_prog_make_make_set=yes

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

    ACLOCAL='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run aclocal-1.11'
    AMDEPBACKSLASH=''
    AMDEP_FALSE=''
    AMDEP_TRUE=''
    AMTAR='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run tar'
    AR=''
    AUTOCONF='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run autoconf'
    AUTOHEADER='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run autoheader'
    AUTOMAKE='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run automake-1.11'
    AWK='gawk'
    CC='/usr/bin/h4cc'
    CCDEPMODE=''
    CFLAGS=''
    CPP=''
    CPPFLAGS=''
    CYGPATH_W='echo'
    DEFS=''
    DEPDIR=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    EXEEXT=''
    GREP=''
    H4_USE_FILTER_SZIP=''
    H5_USE_FILTER_SZIP=''
    H5_USE_FILTER_ZLIB=''
    H5_USE_HDFEOS2=''
    H5_USE_SZIP_ENCODER=''
    HDF5PATH=''
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    LDFLAGS=''
    LD_LIBRARY_PATH=''
    LIBHDF5=''
    LIBOBJS=''
    LIBS=''
    LTLIBOBJS=''
    LT_STATIC_EXEC=''
    MAINT='#'
    MAINTAINER_MODE_FALSE=''
    MAINTAINER_MODE_TRUE='#'
    MAKEINFO='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/missing --run makeinfo'
    MKDIR_P='/bin/mkdir -p'
    OBJEXT=''
    PACKAGE='h4h5tools'
    PACKAGE_BUGREPORT='[email protected]'
    PACKAGE_NAME='H4H5Tools'
    PACKAGE_STRING='H4H5Tools 2.2.2'
    PACKAGE_TARNAME='h4h5tools'
    PACKAGE_URL=''
    PACKAGE_VERSION='2.2.2'
    PARALLEL=''
    PATH_SEPARATOR=':'
    PERL=''
    RANLIB='ranlib'
    RUNPARALLEL=''
    RUNSERIAL=''
    SEARCH=''
    SETX=''
    SET_MAKE=''
    SHELL='/bin/bash'
    STRIP=''
    TESTPARALLEL=''
    VERSION='2.2.2'
    ac_ct_CC='/usr/bin/h4cc'
    am__EXEEXT_FALSE=''
    am__EXEEXT_TRUE=''
    am__fastdepCC_FALSE=''
    am__fastdepCC_TRUE=''
    am__include=''
    am__isrc=''
    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='${SHELL} /home/cyue/Downloads/h4h5tools-2.2.2/bin/install-sh'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    mkdir_p='/bin/mkdir -p'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    prefix='/home/cyue/Documents/tools'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target_alias=''

    ## ------------------- ##
    ## File substitutions. ##
    ## ------------------- ##

    COMMENCE=''
    CONCLUDE=''
    DEPEND=''

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

    /* confdefs.h */
    #define PACKAGE_NAME "H4H5Tools"
    #define PACKAGE_TARNAME "h4h5tools"
    #define PACKAGE_VERSION "2.2.2"
    #define PACKAGE_STRING "H4H5Tools 2.2.2"
    #define PACKAGE_BUGREPORT "[email protected]"
    #define PACKAGE_URL ""
    #define PACKAGE "h4h5tools"
    #define VERSION "2.2.2"

    configure: exit 77

不过我确实尝试使用 gcc 编译 hello.c 并且工作正常。有人能给我一些提示吗?先感谢您 !!

答案1

根据您的日志文件,您缺少libmfhdf.alibdf.a静态库。这是日志中有趣的部分:

gcc: error: /usr/lib/libmfhdf.a: No such file or directory
gcc: error: /usr/lib/libdf.a: No such file or directory
configure:3124: $? = 0
configure:3113: /usr/bin/h4cc -v >&5
gcc: error: /usr/lib/libmfhdf.a: No such file or directory
gcc: error: /usr/lib/libdf.a: No such file or directory

尝试找到可以在哪个包中获取并安装它。

相关内容