【问题标题】:ubuntu12.04 netcdf compile error gcc: error: unrecognized option '-V'ubuntu12.04 netcdf 编译错误 gcc: error: unrecognized option '-V'
【发布时间】:2015-02-02 03:50:12
【问题描述】:

我正在尝试使用 gcc-4.6 在 Ubuntu-12.04 中安装 netcdf (pgi vervion)。但是,当我配置./configure FC=pgf90 CC=gcc CXX=g++ --prefix=$HOME/netcdf-pgi 时,错误显示如下:

configure:3986: $? = 0
configure:3993: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
configure:3997: $? = 0
configure:4004: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.

【问题讨论】:

    标签: gcc ubuntu-12.04


    【解决方案1】:

    如果你想用 PGI (Portland group) 编译器编译 netcdf,那么你应该使用这些工具: PGF77、PGFORTRAN、PGC++和PGCC

    在此链接中是正确构建和安装它的指南。 Portland Group NETCDF 4.11 Build guide

    【讨论】:

      猜你喜欢
      • 2011-08-27
      • 1970-01-01
      • 2020-01-15
      • 1970-01-01
      • 2017-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多