gpt4 book ai didi

linux - 在 Linux CentOS 6.5 版上安装 R3.1.1 时出现问题(检查 LDFLAGS 以获取 Fortran 库的路径)

转载 作者:IT王子 更新时间:2023-10-29 01:26:43 26 4
gpt4 key购买 nike

我正在尝试从 CentOS 6.5 上的源代码安装 R3.1.1

.configure 引发了以下错误

(...)
checking whether we can compute C Make dependencies... yes, using $(CC) -MM
checking whether gcc -std=gnu99 supports -c -o FILE.lo... yes
checking for gcc -std=gnu99 option to support OpenMP... -fopenmp
checking how to get verbose linking output from gfortran... -v
checking for Fortran 77 libraries of gfortran... -L/usr/local/lib64 -L/cm/shared/apps/slurm/14.03.0/lib64/../lib64 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/cm/shared/apps/slurm/14.03.0/lib64/slurm -L/cm/shared/apps/slurm/14.03.0/lib64 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../.. -lgfortran -lm -lquadmath
checking how to get verbose linking output from gcc -std=gnu99... -v
checking for C libraries of gcc -std=gnu99... -L/usr/local/lib64 -L/cm/shared/apps/slurm/14.03.0/lib64/../lib64 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/cm/shared/apps/slurm/14.03.0/lib64/slurm -L/cm/shared/apps/slurm/14.03.0/lib64 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../.. -lgcc_s
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking whether gfortran appends underscores to external names... yes
checking whether gfortran appends extra underscores to external names... no
checking whether mixed C/Fortran code can be run... configure: WARNING: cannot run mixed C/Fortran code
configure: error: Maybe check LDFLAGS for paths to Fortran libraries?

gfortran 是使用 yum 安装的

 gfortran --version
GNU Fortran (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.

我不知道应该在 LDFLAGS 中放入什么来修复该错误。

更新:

# find / -name "libgfor*.so"
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgfortran.so
/cm/shared/apps/gcc/4.8.2/lib64/libgfortran.so
/cm/shared/apps/gcc/4.8.2/lib/libgfortran.so
/cm/images/default-image/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgfortran.so
/cm/images/default-image/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgfortran.so

.

# tail config.log 
#define SIZEOF_LONG_LONG 8
#define SIZEOF_DOUBLE 8
#define SIZEOF_SIZE_T 8
#define HAVE_LONG_DOUBLE 1
#define SIZEOF_LONG_DOUBLE 16
#define F77_FUNC(name,NAME) name ## _
#define F77_FUNC_(name,NAME) name ## _
#define HAVE_F77_UNDERSCORE 1

configure: exit 1

最佳答案

尝试在您的系统中找到 libgfortran.so 并提供路径 -Lthe_path -lgfortran 或设置相应的环境变量。如果这没有帮助,请尝试在 config.log(或类似的)文件中查找更多详细信息,以找出配置在该检查中实际尝试执行的操作。

您的 gfortran 报告它是 4.8.2 版本,但库来自 4.4.4 版本。尝试定位(通过 which)您运行的是哪个 gfortran 二进制文件以及它的库在哪里。尝试为 libgfortran 运行 locate 命令。

关于linux - 在 Linux CentOS 6.5 版上安装 R3.1.1 时出现问题(检查 LDFLAGS 以获取 Fortran 库的路径),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25033951/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com