红联Linux门户
Linux帮助

怎么安装多版本的GCC编译器,又不冲突?如何设置?

发布时间:2010-07-20 20:26:30来源:红联作者:mazuju099
情况是这样的,我要安装一个软件(abinit 6.0.4),这个软件需要用GNU4.2以上版本编译才行。而我原来系统中的编译器是GNU4.1的。后来我问了系统管理员,他叫我安装新版本的编译器到自己目录上,后来我直接在网上下载了可以直接用的GNU4.4。
下面我的问题就是:
1,怎么设置,才能使得我能用GNU4.4去编译我要安装的软件。
2,在我要安装的软件的说明中有说到configure的几个选项:不知道有没有人知道该如何设置?选项如下:

# ---------------------------------------------------------------------------- #
# Fortran support #
# ---------------------------------------------------------------------------- #

# Fortran compiler
#
#FC="gfortran"

# Set debug flags for Fortran source files (overrides auto-detection)
#
#with_fc_dbgflags="-g"

# Set optimizations for Fortran source files (overrides auto-detection)
#
with_fc_optflags="-O2"

# Prepend debug link flags for Fortran binaries (default is unset)
#
#with_fc_ld_dbgflags=""

# Prepend optimization link flags for Fortran binaries (default is unset)
#
#with_fc_ld_optflags="-Bstatic"

# Append debug libraries to link Fortran binaries (default is unset)
#
#with_fc_ld_dbglibs=""

# Append optimization libraries to link Fortran binaries (default is unset)
#
#with_fc_ld_optlibs="-lsvml"

# Use C clock instead of Fortran clock for timings (default is no)
#
#enable_cclock="yes"

# Choose whether to read file lists from standard input or "ab.files"
# (default is yes = standard input)
#
#enable_stdin="no"

# Wrap Fortran compiler calls (default is auto-detected)
# Combine this option with enable_debug="yes" to keep preprocessed source
# files (they are removed by default, except if their build fails)
#
#enable_fc_wrapper="yes"
文章评论

共有 1 条评论

  1. pl_014 于 2010-07-21 06:53:47发表:

    如果是软件包安装,那么和软件包管理器有关,比如我以前用过的opensuse,就装过gcc4.2和4.3两个版本(如果没记错的话)
    如果是编译安装,可以先编译,正确编译而未进行安装的软件大多可以正常使用,所以可以只编译不安装,或放到/opt目录下,而后面要做的就是解决命令的问题。