make vic_image 失败

make步骤如下:

cd VIC/vic/drivers/image
dnf install openmpi
dnf install openmpi-devel.x86_64
module load mpi/openmpi-x86_64
dnf install -y netcdf-devel
dnf install -y netcdf netcdf-devel

报错如下:

复制代码
/usr/bin/ld: /tmp/ccaypzjZ.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_log.h:61: multiple definition of `LOG_DEST'; /tmp/ccyuazMj.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_log.h:61: first defined here
/usr/bin/ld: /tmp/ccaypzjZ.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_def.h:76: multiple definition of `vic_run_ref_str'; /tmp/ccyuazMj.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_def.h:76: first defined here
/usr/bin/ld: /tmp/ccaypzjZ.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_run.h:157: multiple definition of `funcd'; /tmp/ccyuazMj.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_run.h:157: first defined here
/usr/bin/ld: /tmp/cczsSJD9.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_log.h:61: multiple definition of `LOG_DEST'; /tmp/ccyuazMj.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_log.h:61: first defined here
/usr/bin/ld: /tmp/cczsSJD9.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_def.h:76: multiple definition of `vic_run_ref_str'; /tmp/ccyuazMj.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_def.h:76: first defined here
/usr/bin/ld: /tmp/cczsSJD9.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_run.h:157: multiple definition of `funcd'; /tmp/ccyuazMj.o:/home/VIC/vic/drivers/image/../../vic_run/include/vic_run.h:157: first defined here
collect2: error: ld returned 1 exit status 
make[1]: *** [Makefile:126: model] Error 1
make[1]: Leaving directory '/home/VIC/vic/drivers/image'
make: *** [Makefile:109: all] Error 2
复制代码

修改Makefile后,再make就成功了:添加了一句话 CFLAGS += -fcommon

 

posted on   我和你并没有不同  阅读(19)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2023-08-16 harbor搭建镜像仓库
2023-08-16 如何用Nginx代理MySQL连接,并限制可访问IP 转载
2020-08-16 selenium
2018-08-16 python 冷知识
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示