24小时热门版块排行榜    

CyRhmU.jpeg
查看: 2965  |  回复: 5

tfydfred

新虫 (初入文坛)

[求助] 真诚求助vasp.5.lib编译时出错已有2人参与

希望版上有经验的朋友可以帮忙看看,错误信息是这样的

ifort -O0 -FI -FR  -c preclib.f
preclib.f(1): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE ...
/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
^
preclib.f(16): error #5145: Invalid blank/tab
   <http://www.gnu.org/licenses/>.  */
----------------------------------^
preclib.f(20): error #5145: Invalid blank/tab
   include it implicitly at the start of every compilation.  It must
-----------------------------------------------------------^
preclib.f(27): error #5120: Unterminated character constant
/* glibc's intent is to support the IEC 559 math functionality, real
--------^
preclib.f(27): error #5144: Invalid character_kind_parameter. No underscore
/* glibc's intent is to support the IEC 559 math functionality, real
--------------------------------------------------------------------^
preclib.f(28): error #5145: Invalid blank/tab
   and complex.  If the GCC (4.9 and later) predefined macros
---------------^
preclib.f(30): error #5277: Syntax error, found ',' following statement keyword
   whether the overall intent is to support these features; otherwise,
----------------------------------------------------------------------^
preclib.f(32): error #5145: Invalid blank/tab
   define these macros by default.  */
----------------------------------^
preclib.f(36): error #5145: Invalid blank/tab
/* wchar_t uses Unicode 8.0.0.  Version 8.0 of the Unicode Standard is
------------------------------^
preclib.f(38): error #5276: Unbalanced parentheses
   2015-05-15).  */
-------------^
preclib.f(38): error #5145: Invalid blank/tab
   2015-05-15).  */
---------------^
preclib.f(40): error #5145: Invalid blank/tab
/* We do not support C11 <threads.h>.  */
-------------------------------------^
preclib.f(1): catastrophic error: Could not recover from previous syntax error
compilation aborted for preclib.f (code 1)
Makefile:58: recipe for target 'preclib.o' failed
make: *** [preclib.o] Error 1
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

tfydfred

新虫 (初入文坛)

我的makefile文件是这样的

.SUFFIXES: .inc .f .F
#-----------------------------------------------------------------------
# Makefile for Portland Group F90/HPF compiler
# the makefile was tested only under Linux on Intel platforms
# however it might work on other platforms as well
#
# this release of vasp.4.lib contains lapack v2.0
# this can be compiled with pgf90 compiler if the option -O1 is used
#
# Mind: one user reported that he had to copy preclib.F diolib.F
#  dlexlib.F and drdatab.F to the directory vasp.4.4, compile the files
#  there and link them directly  into vasp
#  for no obvious reason these files could not be linked from the library
#
#-----------------------------------------------------------------------

# C-preprocessor
CPP     = icc -E -P -C $*.F >$*.f
FC=ifort

CFLAGS = -O
FFLAGS = -O0 -FI
FREE   =  -FR

DOBJ =  preclib.o timing_.o derrf_.o dclock_.o  diolib.o dlexlib.o drdatab.o


#-----------------------------------------------------------------------
# general rules
#-----------------------------------------------------------------------

libdmy.a: $(DOBJ) lapack_double.o linpack_double.o lapack_atlas.o
        -rm libdmy.a
        ar vq libdmy.a $(DOBJ)

# files which do not require autodouble
lapack_min.o: lapack_min.f
        $(FC) $(FFLAGS) $(NOFREE) -c lapack_min.f
lapack_double.o: lapack_double.f
        $(FC) $(FFLAGS) $(NOFREE) -c lapack_double.f
lapack_single.o: lapack_single.f
        $(FC) $(FFLAGS) $(NOFREE) -c lapack_single.f
lapack_atlas.o: lapack_atlas.f
        $(FC) $(FFLAGS) $(NOFREE) -c lapack_atlas.f
linpack_double.o: linpack_double.f
        $(FC) $(FFLAGS) $(NOFREE) -c linpack_double.f
linpack_single.o: linpack_single.f
        $(FC) $(FFLAGS) $(NOFREE) -c linpack_single.f

.c.o:
        $(CC) $(CFLAGS) -c $*.c
.F.o:
        $(CPP)
        $(FC) $(FFLAGS) $(FREE) $(INCS) -c $*.f
.F.f:
        $(CPP)
.f.o:
        $(FC) $(FFLAGS) $(FREE) $(INCS) -c $*.f
2楼2018-03-28 14:02:22
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

shqshq

木虫 (正式写手)

【答案】应助回帖

这是我的makefile里的内容,仅供参考

# C-preprocessor
CPP     = gcc -E -P -C $*.F >$*.f
FC=ifort

CFLAGS = -O2
FFLAGS = -O2 -FI
FREE   =  -FR
3楼2018-04-14 15:38:57
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dxcharlary

专家顾问 (职业作家)

【答案】应助回帖

你不会是在windows里面解压的吧。
4楼2018-05-27 22:26:46
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xyf9526

新虫 (小有名气)

我也遇到同样的错误,楼主解决了吗?
5楼2020-06-13 15:11:50
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yangxing0827

银虫 (小有名气)

引用回帖:
5楼: Originally posted by xyf9526 at 2020-06-13 15:11:50
我也遇到同样的错误,楼主解决了吗?

您好,请问你解决这个问题了吗
自信,理解
6楼2021-03-05 21:46:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 tfydfred 的主题更新
信息提示
请填处理意见