计算化学公社

标题: cfour 编译问题 [打印本页]

作者
Author:
最爱喵星人    时间: 2018-12-27 20:43
标题: cfour 编译问题
在自己的机子上串行编译cfour v2.00beta。在./configure FC=ifort 后得到:checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for GNU make... make
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for ld... ld
checking for ar... ar
checking for strip... strip
checking for etags... etags
checking for ctags... ctags
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether we are using the GNU Fortran compiler... no
checking whether ifort accepts -g... no
checking for ifort option to support OpenMP... unsupported
checking for gcc option to support OpenMP... -fopenmp
checking for g++ option to support OpenMP... -fopenmp
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for gethostname... yes
checking how to get verbose linking output from ifort... configure: WARNING: compilation failed

checking for Fortran libraries of ifort...
checking for alternate main to link with Fortran libraries... main
checking size of void *... 8
checking size of int... 4
checking size of long int... 8
checking size of long long int... 8
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... configure: error: in `/home/software/cfour_v2.00beta':
configure: error: cannot compile a simple Fortran program
See `config.log' for more details


搜索checking for dummy main to link with Fortran libraries 也没得到什么有用信息。请问是哪里出现编译问题?谢谢。


作者
Author:
sobereva    时间: 2018-12-28 00:54
看config.log里有无对解决问题有用的提示
亦可尝试其它ifort版本
实在不行尝试gfortran

作者
Author:
最爱喵星人    时间: 2018-12-28 17:26
谢谢。
在config.log 的Core tests里有如下gcc 错误:

configure:3477: $? = 0
configure:3466: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --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-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --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 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
configure:3477: $? = 0
configure:3466: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3477: $? = 1
configure:3466: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.

输入文件是怎么回事?还是说是别的错误引起的?
似乎是说configure 3466行 -V有问题。以下是configure文件3466行左右代码

3451 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3452 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3453 as_fn_error $? "no acceptable C compiler found in \$PATH
3454 See \`config.log' for more details" "$LINENO" 5; }
3455
3456 # Provide some information about the compiler.
3457 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3458 set X $ac_compile
3459 ac_compiler=$2
3460 for ac_option in --version -v -V -qversion; do
3461   { { ac_try="$ac_compiler $ac_option >&5"
3462 case "(($ac_try" in
3463   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3464   *) ac_try_echo=$ac_try;;
3465 esac
3466 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3467 $as_echo "$ac_try_echo"; } >&5
3468   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3469   ac_status=$?
3470   if test -s conftest.err; then
3471     sed '10a\
3472 ... rest of stderr output deleted ...
3473          10q' conftest.err >conftest.er1
3474     cat conftest.er1 >&5
3475   fi
3476   rm -f conftest.er1 conftest.err
3477   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3478   test $ac_status = 0; }
3479 done





欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3