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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 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 冷知识