FVCOM在FVCOM_source文件夹内make失败

FVCOM在FVCOM_source文件夹内make失败

报错信息如下:

make: Circular mod_prec.o <- mod_prec.o dependency dropped.
make: Circular mod_prec.o <- mod_prec.o dependency dropped.
make: Circular mod_prec.o <- mod_prec.o dependency dropped.
/usr/bin/cpp -P -C -traditional  -DIFORT   -P -C -traditional    -DWET_DRY -DMULTIPROCESSOR    -DLIMITED_NO  -DGCN    -DRIVER_FLOAT                           -DOLD_PETSC         mod_prec.F > mod_prec.f90
mpif90  -c  -O3 -I/home/yzh/work/FVCOM3.2.1/FVCOM_source/libs/install/include        mod_prec.f90
mod_prec.f90(1): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...
/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
^
mod_prec.f90(16): error #5145: Invalid blank/tab
   <http://www.gnu.org/licenses/>.  */
----------------------------------^
mod_prec.f90(20): error #5145: Invalid blank/tab
   include it implicitly at the start of every compilation.  It must
-----------------------------------------------------------^
mod_prec.f90(27): error #5120: Unterminated character constant
/* glibc's intent is to support the IEC 559 math functionality, real
--------^
mod_prec.f90(27): error #5144: Invalid character_kind_parameter. No underscore
/* glibc's intent is to support the IEC 559 math functionality, real
--------------------------------------------------------------------^
mod_prec.f90(28): error #5145: Invalid blank/tab
   and complex.  If the GCC (4.9 and later) predefined macros
---------------^
mod_prec.f90(30): error #5277: Syntax error, found ',' following statement keyword
   whether the overall intent is to support these features; otherwise,
----------------------------------------------------------------------^
mod_prec.f90(32): error #5145: Invalid blank/tab
   define these macros by default.  */
----------------------------------^
mod_prec.f90(36): error #5145: Invalid blank/tab
/* wchar_t uses Unicode 8.0.0.  Version 8.0 of the Unicode Standard is
------------------------------^
mod_prec.f90(38): error #5276: Unbalanced parentheses
   2015-05-15).  */
-------------^
mod_prec.f90(38): error #5145: Invalid blank/tab
   2015-05-15).  */
---------------^
mod_prec.f90(40): error #5145: Invalid blank/tab
/* We do not support C11 <threads.h>.  */
-------------------------------------^
mod_prec.f90(1): catastrophic error: Could not recover from previous syntax error
compilation aborted for mod_prec.f90 (code 1)
makefile:42: recipe for target 'mod_prec.o' failed
make: *** [mod_prec.o] Error 1

检查后发现是因为mod_prec.f90文件开头有一段来自GNU C Library的注释。

解决方案

以 Invalid blank/tab 为关键词检索,发现在make.inc文件中DEF_FLAGS一行的末尾,添加 -nostdinc -E 参数。

进入libs文件重新编译

make CC=icc CXX=icpc FC=ifort
cd .. #回到FVCOM_source文件夹
make

即可。

来源:lib 中 make 失败后,source中make 结果 错误 怎么办

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值