- 积分
- 41650
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-5-13
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
昨天在移植CESM1.2.2到另一个平台,build case到最后一步的时候报错,cesm.bldlog显示relocation truncated to fit: R_X86_64_PC32的错误信息,即已经成功完成了前面的 MCT、PIO、GPTL、组件库(atm/lnd/ice/ocn 等)编译,最终在链接阶段(link stage)失败。
- libifcoremt.a(for_diags_intel.o): In function `for__this_image_number_or_zero':
- for_diags_intel.c:(.text+0x18a): relocation truncated to fit: R_X86_64_PC32 against `icaf_check_done.1285.0.12'
- for_diags_intel.c:(.text+0x199): relocation truncated to fit: R_X86_64_PC32 against `ptr_to_THIS_IMAGE'
- for_diags_intel.c:(.text+0x1a0): relocation truncated to fit: R_X86_64_PC32 against `ptr_to_ICAF_ABORT'
- for_diags_intel.c:(.text+0x1ab): relocation truncated to fit: R_X86_64_PC32 against `ptr_to_ICAF_PROB'
- for_diags_intel.c:(.text+0x1ba): relocation truncated to fit: R_X86_64_PC32 against `is_icaf_application'
- for_diags_intel.c:(.text+0x1c9): relocation truncated to fit: R_X86_64_PC32 against `this_image_number'
- for_diags_intel.c:(.text+0x1d1): relocation truncated to fit: R_X86_64_PC32 against `this_image_number'
- for_diags_intel.c:(.text+0x1d7): relocation truncated to fit: R_X86_64_PC32 against `icaf_check_done.1285.0.12'
- for_diags_intel.c:(.text+0x1e3): relocation truncated to fit: R_X86_64_PC32 against `this_image_number'
复制代码 问题原因(参考GPT回答):这是一个链接器地址空间截断错误,即:目标文件和静态库之间的地址寻址范围不兼容。
解决办法:
1.在config_compilers.xml文件中的LDFLAGS添加"-shared-intel"某些机器默认静态链接 Intel runtime (libifcoremt.a),可以改成动态链接以避免 relocation 溢出:
2.替换pio和netcdf版本
之前好像有次安装的时候碰到类似的这个问题,通过替换netcdf和pio版本解决了,可以参考https://bb.cgd.ucar.edu/cesm/thr ... ntel-compiler.3389/
|
|