24小时热门版块排行榜    

查看: 3220  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 在坚冰还盖着北海的时候,我看到了怒放的梅花。 +3 ziyangfang 2026-08-25 3/150 2026-08-25 13:14 by huagongfeihu
[基金申请] 如果此刻你正在为国基感到焦虑,不妨来听听这首《基金之外》 +8 scalable 2026-08-24 8/400 2026-08-25 12:52 by jnhyjjm
[基金申请] 没有任何消息-是不是就凉了 +9 图啦图啦 2026-08-24 10/500 2026-08-25 11:59 by 南海小哥
[基金申请] 人气不行了 +11 fansofjerry 2026-08-21 11/550 2026-08-25 11:04 by 孤独的英雄6
[基金申请] 2026国自然函评费到账 +19 羊腰板 2026-08-21 22/1100 2026-08-25 10:38 by popular289
[教师之家] 导师吐槽:我怎么摊上了这么个极品研究生! +3 苏东坡二世 2026-08-23 3/150 2026-08-25 10:35 by shisan1313
[基金申请] 2026年的国家社科基金项目通讯评审的新规则与新动向、新挑战 +5 process2012 2026-08-23 7/350 2026-08-25 09:42 by huixian257
[基金申请] 今天基金会出结果吗?20260819 +17 kkkl_v 2026-08-19 18/900 2026-08-25 09:41 by windflowerwy
[基金申请] 明天应该可查了!? +5 chengyan1220 2026-08-23 5/250 2026-08-24 23:28 by 我4大白菜
[基金申请] filecode,4个jtjc了 +14 ziyangfang 2026-08-19 17/850 2026-08-24 18:37 by 哈哈蛤?
[基金申请] 建议基金发布提前给出明确的时间点 +13 kulium 2026-08-21 16/800 2026-08-24 16:27 by superceng
[教师之家] 跳槽后在研项目怎么办? +5 简单化xn 2026-08-22 10/500 2026-08-23 12:38 by 简单化xn
[基金申请] 今天放榜吗? +15 布布和一二 2026-08-19 16/800 2026-08-23 09:55 by 张春生
[基金申请] 时间戳今天,20号变了 +5 archvillain 2026-08-20 5/250 2026-08-22 06:12 by hui_daxiao
[基金申请] 看来今天不会放榜了? +8 chengyan1220 2026-08-21 11/550 2026-08-21 17:52 by dcqxinyang
[基金申请] 应该是下周三26日公布了吧? +4 哈哈蛤? 2026-08-21 4/200 2026-08-21 10:58 by Vivilian
[基金申请] 今天放榜没戏了吧 +9 yuleib84 2026-08-19 11/550 2026-08-21 10:06 by gltch
[基金申请] 基金啊基金 +4 longfie172 2026-08-20 4/200 2026-08-21 08:58 by mark mao
[基金申请] 重要消息,中午系统在维护 +11 yuleib84 2026-08-18 12/600 2026-08-20 11:09 by xskun
[基金申请] 明天放榜? +5 Shxjjxjkx 2026-08-18 5/250 2026-08-18 18:14 by -大大大大大-
信息提示
请填处理意见